unlock0 = 2494
unlock1 = 2091
unlock2 = 3207
unlock3 = 2579

function tmenudata0()
{


    /*---------------------------------------------
    Animation Settings
    ---------------------------------------------*/


	this.animation_jump = 20		//Measured in Milliseconds (1/1000s)
	this.animation_delay = 5		//Measured in pixels


    /*---------------------------------------------
    Image Settinngs (icons and plus minus symbols)
    ---------------------------------------------*/


	this.imgage_gap = 0			//The image gap is applied to the left and right of the folder and document icons.
						//In the absence of a folder or document icon the gap is applied between the
						//plus / minus symbols and the text only.


	this.plus_image = "Themes/_DefaultTemplates/_images/treemenu_main_icon_default.gif"	//specifies a custom plus image.
	this.minus_image = "Themes/_DefaultTemplates/_images/treemenu_main_icon_open.gif"		//specifies a custom minus image.
	this.pm_width_height = "16,16"					//Width & Height  - Note: Both images must be the same dimensions.


	//this.folder_image = "folder.gif"				//Automatically applies to all items which may be expanded.
	this.document_image = "Themes/_DefaultTemplates/_images/treemenu_sub_icon.gif"		//Automatically applies to all items which are not expandable.
	this.icon_width_height = "7,7"					//Width & Height  - Note: Both images must be the same dimensions.




    /*---------------------------------------------
    General Settings
    ---------------------------------------------*/


	this.indent = 0;			//The indent distance in pixels for each level of the tree.
	this.use_hand_cursor = true;		//Use a hand mouse cursor for expandable items, or the default arrow.


    /*---------------------------------------------
    Tree Menu Styles
    ---------------------------------------------*/


	this.main_item_styles =        "text-decoration:none; 			       		\
                                       font-weight:bold;			           	\
                                       font-family:Verdana;			           	\
                                       font-size:11px;			               		\
                                       color:#990000;			               		\
									   padding-bottom: 1px;                                \
                                       background-image:url(Themes/_DefaultTemplates/_images/treemenu_main_bg.gif); \
                                       "


   	 this.sub_item_styles =        "text-decoration:none;					\
                                       list-style: none;			\
									   padding:0;						\
                                       font-weight:normal;					\
                                       background-image:url(Themes/_DefaultTemplates/_images/treemenu_sub_bg.gif);	   \
                                       font-family:Arial;					\
                                       font-size:12px;						\
                                       color:#000066;								\
									   "



	/* Styles may be formatted as multi-line (seen above), or on a single line as shown below.
	   The expander_hover_styles apply to menu items which expand to show child menus.*/



	this.main_container_styles = ""
	this.sub_container_styles = "background-image:url(Themes/_DefaultTemplates/_images/treemenu_sub_bg.gif); padding-top:5px; padding-bottom:5px; background-color:#ffffff;"

	this.main_link_styles = "color:#000066; text-decoration:none; padding:2;"
	this.main_link_hover_styles = "padding:2; color:#1F5394; opacity: .7; filter: alpha(opacity=70); -moz-opacity: .7;"


	this.sub_link_styles = "color:#000066; font-size:11px;"
	this.sub_link_hover_styles = "padding:0;color:#1F5394; opacity: .7; filter: alpha(opacity=70); -moz-opacity: .7;"


	this.main_expander_hover_styles = "color:#990000;"

	this.sub_expander_hover_styles = "color:#990000; opacity: .7; -moz-opacity: .7;"


}

function DoGMap(PointA, PointB, ZoomRatio)
{
	var point = new GPoint(PointA, PointB)
	var marker = new GMarker(point);
	var map = new GMap(document.getElementById("GMap"));
	map.addControl(new GSmallMapControl());
	map.addControl(new GMapTypeControl());
	map.setMapType(G_HYBRID_MAP);
	map.centerAndZoom(point, 2);
	map.addOverlay(marker);
}

function show_chd()
	{
		var i=0;
		var i1=0;
		var child_test  = document.EngineForm.NumChd.value;
		var adult_test  = document.EngineForm.NumAdult.value;
		i=parseInt(document.EngineForm.NumChd.value);
		i1=parseInt(document.EngineForm.NumAdult.value);

		switch(i)
		{
			case 0 :
			document.EngineForm.ChdAge1.style.visibility="hidden";
			document.EngineForm.ChdAge2.style.visibility="hidden";
			document.EngineForm.ChdAge3.style.visibility="hidden";
			document.getElementById('ChildAgeStr').style.visibility="hidden";
			break;
			case 1 :
			document.EngineForm.ChdAge1.style.visibility="visible";
			document.EngineForm.ChdAge2.style.visibility="hidden";
			document.EngineForm.ChdAge3.style.visibility="hidden";
			document.getElementById('ChildAgeStr').style.visibility="visible";
			break;
			case 2 :
			document.EngineForm.ChdAge1.style.visibility="visible";
			document.EngineForm.ChdAge2.style.visibility="visible";
			document.EngineForm.ChdAge3.style.visibility="hidden";
			document.getElementById('ChildAgeStr').style.visibility="visible";
			break;
			case 3 :
			document.EngineForm.ChdAge1.style.visibility="visible";
			document.EngineForm.ChdAge2.style.visibility="visible";
			document.EngineForm.ChdAge3.style.visibility="visible";
			document.getElementById('ChildAgeStr').style.visibility="visible";
			break;
		}
	}
	

function loadprocessing() {
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById('hidepage').style.visibility = 'hidden';
	} else {
		if (document.layers) { // Netscape 4
			document.hidepage.visibility = 'hidden';
		} else { // IE 4
			document.all.hidepage.style.visibility = 'hidden';
		}
	}
} 

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function UpdateAdjPackPrice(curPrice, curComm, curNetDue, fMaxAmt, fRetainPerc){
		
		//get type
		j=document.frmQuote.rbAdjComm.length;
		for (i=0; i<j; i++){
			if(document.frmQuote.rbAdjComm[i].checked) var type = document.frmQuote.rbAdjComm[i].value;
		}
		//if(type == 'nothing') return false;
		//adjustments
		var fAdjCommDol = 0;
		var fAdjGross = 0;
		var fAdjNetDue = 0;
		
		//get insurnce item cost
		j=document.frmQuote.ins_data.length;
		for (i=0; i<j; i++){
			if(document.frmQuote.ins_data[i].checked) var ins_val = document.frmQuote.ins_data[i].value;
		}
		
		ins_val = str_replace(':', '', ins_val);
		ins_val = str_replace('-', '', ins_val);
		ins_val = str_replace('=', '', ins_val);
		sTemp = "var ins_dol = document.frmQuote." + ins_val + ".value";
		eval(sTemp);
		
		//add insurance to the curPrice
		curPrice = curPrice + Number(ins_dol);
		
		fComm = parseFloat(document.frmQuote.tbAdjCommPer.value);
		if(isNaN(fComm)){ fComm=0; }
		if(fComm<0){ fComm *= -1; }
		document.frmQuote.tbAdjCommPer.value = fComm;
		fCommFee = parseFloat(document.frmQuote.tbAdjCommDol.value);
		if(isNaN(fCommFee)){ fCommFee=0; }
		if(fCommFee<0){ fCommFee *= -1; }		
		document.frmQuote.tbAdjCommDol.value = fCommFee;
		
		document.frmQuote.hfAdjRtnAmt.value = 0;
		document.frmQuote.hfAdjCommDiff.value = 0;
		
		if(fComm>0 && fCommFee>0){
			alert("Commission Percentage AND/OR Dollar Amount must equal zero.");
			return false;
		}else if(fComm == 0 && fCommFee == 0 || type == 'nothing')
		{
			/* nothing occuring so add insurance amount to net due */
			curNetDue += Number(ins_dol);
			document.frmQuote.hfAdjCommDiff.value = 0;
			
			dvAdjPrice.innerHTML = "$"+formatCurrency(curPrice);			
			dvAdjNetDue.innerHTML = "$"+formatCurrency(curNetDue);
			dvAdjComm.innerHTML = "$"+formatCurrency(curComm);
			return false;
		}
		
		if(type == 'inc')
		{
			if(fComm>0)
			{
				fAdjCommDol = ((curPrice/100) * fComm) + curComm;
				fAdjGross = fAdjCommDol + curPrice;
				fAdjNetDue = fAdjGross - fAdjCommDol;
			}else if(fCommFee>0)
			{
				fAdjCommDol = fCommFee + curComm;
				fAdjGross = fCommFee + curPrice;
				fAdjNetDue = fAdjGross - fAdjCommDol;
			}
			//adj/retain
			if(fRetainPerc <=9)
			{
				fRetainPerc = fRetainPerc.toString();
				fRetainPerc = '0.0' + fRetainPerc;
				fRetainPerc = Number(fRetainPerc);
			}else
			{
				fRetainPerc = fRetainPerc.toString();
				fRetainPerc = '0.' + fRetainPerc;
				fRetainPerc = Number(fRetainPerc);
			}
				
			var fAdtRtnAmt = formatCurrency((fAdjCommDol - curComm) * fRetainPerc);
			fAdtRtnAmt = Number(fAdtRtnAmt);
			document.frmQuote.hfAdjRtnAmt.value = fAdtRtnAmt;
			document.frmQuote.hfAdjRtnPerc.value = fRetainPerc;
			
			fAdjCommDol = fAdjCommDol - fAdtRtnAmt;
			fAdjNetDue = fAdjNetDue + fAdtRtnAmt;
		}else
		{
			if(fComm>0)
			{
				fAdjCommDec = ((curPrice/100) * fComm);
				
				fAdjGross = curPrice - fAdjCommDec;
				fAdjCommDol = curComm - fAdjCommDec;
				fAdjNetDue = fAdjGross - fAdjCommDol;
			}else if(fCommFee>0)
			{
				fAdjCommDol = curComm - fCommFee;
				fAdjGross = curPrice - fCommFee;
				fAdjNetDue = fAdjGross - fAdjCommDol;
			}
		}
		
		if(fAdjCommDol<0)
		{
			alert('You cannot decrease commission amount to a value less than your total commission!');
			return false;	
		}
		
		//check for max val
		if((fAdjCommDol - curComm) > fMaxAmt)
		{
			alert("You cannot exceed the maximum increase of "+fMaxAmt+ " (requested:"+formatCurrency(fAdjCommDol - curComm)+")");
			return false;
		}
		
		//set hidden value amt to be used for increase/decrease
		document.frmQuote.hfAdjCommDiff.value = formatCurrency(fAdjCommDol - curComm);
		
		dvAdjPrice.innerHTML = "$"+formatCurrency(fAdjGross);			
		dvAdjNetDue.innerHTML = "$"+formatCurrency(fAdjNetDue);
		dvAdjComm.innerHTML = "$"+formatCurrency(fAdjCommDol);
		
		return true;			
	}
	function formatCurrency(num) {
		if(isNaN(num)) num = "0";
		num = num + 0.005;
		num = num.toString();
		var i;
		i=num.indexOf(".");
		return num.substring(0,i+3);
	}
	function checkAgFee(sFormName)
	{
		//integrator
		if(document.frmQuote.hfAdjCommDiff.value == "null") 
		{
			submitform(sFormName);
			return false;
		}
		var diff = document.frmQuote.hfAdjCommDiff.value;
		j=document.frmQuote.rbAdjComm.length;
		for (i=0; i<j; i++){
			if(document.frmQuote.rbAdjComm[i].checked) var type = document.frmQuote.rbAdjComm[i].value
		}
		if(type != 'nothing' && diff == 0)
		{
			alert('You have selected to increase/decrease your commission, however you did not click the Update Total button. You must do this first!');
		}else
		{
			submitform(sFormName);
		}
	}
	function str_replace(search_string, replace_string, string)
	{
		var result = '';
		var letter = '';
		for(var i=0; i < string.length; i++)
		{
			letter = string.charAt(i);
			if(letter == search_string)
			{
				letter = replace_string;
			}
			result = result + letter;
		}
		return result;
	}

function HighlightHotel()
{

}

function  GetCarrierOptions()
{
	var oList = document.forms['EngineForm'].Destination;
	var DestCode = oList.options[oList.selectedIndex].value;
	var URL = 'index.php?PageName=Index&Action=GetCarrierOptions&DestCode=' + DestCode;
	var ReturnStr = '';

	AjaxRequest.get(
	{
		'url':URL
		,'onSuccess':function(req)
					{ 
						/* Add to Option List*/
						eval(req.responseText);
						/* update dynamic option list */
						E.change(oList);
					}
	  }
	);
}