// JavaScript Document
var jplaceType 
var jplaceName
var feedPlaceID
var feedTot
var divPro
var jsarray;
var jsarraycount;
var jsarryNo;
var PACKfeed = new Array();
var jcountryName;

function initcity(){
	feedPlaceID = document.getElementById('IDplace').value;
	feddTot = document.getElementById('TOTfeed').value - 1; 
	pagNum = document.getElementById('pgNo').value;
	jplaceType = document.getElementById('IDtypeplace').value;
	jplaceName = document.getElementById('NAplace').value;
	jcountryName = document.getElementById('NAcountry').value;
	//if (feddTot > 0){
		//callFeedBacks(feedPlaceID,fedd[1])
	//}
	replaceChecks();
	
	if(pagNum == 2){
		//alert(pagNum+' = pagNum')
		callSPackInfo(1);
	}

}
function findObj(objID){
		var obj=false;
		if(document.all){
			obj=document.all(objID);
		}
		else{
			if(document.getElementById){
				obj=document.getElementById(objID);
			}
			else{
				if(document.layers){
					obj=document.layers[objID];
				}
			}
		}
		return obj;	
	}
	function displayObj(obj,display){
		var obj=typeof(obj)=="object"?obj:findObj(obj);
		if (display){
			obj.style['display'] = "";
		}
		else{
			obj.style['display'] = "none";
		}
	}
var inputs;
var imgFalse = '/images/false.png';
var imgTrue = '/images/true.png';

//this function runs when the page is loaded, put all your other onload stuff in here too.

function replaceChecks() {
	//alert(imgTrue)
	//get all the input fields on the page
	inputs = document.getElementsByTagName('input');

	//cycle trough the input fields
	for(var i=0; i < inputs.length; i++) {

		//check if the input is a checkbox
		if(inputs[i].getAttribute('type') == 'checkbox') {
			
			//create a new image
			var img = document.createElement('img');
			
			//check if the checkbox is checked
			if(inputs[i].checked) {
				img.src = imgTrue;
			} else {
				img.src = imgFalse;
			}

			//set image ID and onclick action
			img.id = 'checkImage'+i;
			//set image 
			img.onclick = new Function('checkChange('+i+')');
			//place image in front of the checkbox
			inputs[i].parentNode.insertBefore(img, inputs[i]);
			
			//hide the checkbox
			inputs[i].style.display='none';
		}
	}
}

//change the checkbox status and the replacement image
function checkChange(i) {

	if(inputs[i].checked) {
		inputs[i].checked = '';
		document.getElementById('checkImage'+i).src=imgFalse;
	} else {
		inputs[i].checked = 'checked';
		document.getElementById('checkImage'+i).src=imgTrue;
	}
}
function CombineCO(jthisCO,jplusCO,jURL){
	document.frmCombine.thisCO.value = jthisCO
	document.frmCombine.plusCO.value = jplusCO
	document.frmCombine.action = ''+ jURL +''
	document.frmCombine.submit()
}
function findPackNew(){
 	var checkbox_choices = 0;
	var checkbox_values = '';
	var strToURL
	var strcitysIDNA
	var citysID
	var citysNA
	var strIDNA
	var boxlength = document.frmFindPack.findPacks.length
	//alert(boxlength)
	if (boxlength == undefined){
		boxlength = 1
			//alert(boxlength)
			checkbox_values =  document.frmFindPack.findPacks.value;
			//alert(checkbox_values)
			strcitysIDNA = checkbox_values.split('|')
			//if (checkbox_choices == 1){
				citysID = strcitysIDNA[0]
				citysNA = strcitysIDNA[1]
			//checkbox_values =  frmFindPack.findPacks[counter].value;
			//}
	}
	else{
		for (counter = 0; counter < boxlength; counter++){
			if (document.frmFindPack.findPacks[counter].checked){ 
				checkbox_choices = checkbox_choices + 1;
				checkbox_values =  document.frmFindPack.findPacks[counter].value;
				//alert(checkbox_values)
				strcitysIDNA = checkbox_values.split('|')
				if (checkbox_choices == 1){
					citysID = strcitysIDNA[0]
					citysNA = strcitysIDNA[1]
					//checkbox_values =  frmFindPack.findPacks[counter].value;
				}
				if (checkbox_choices > 1){ 
					
					if (citysID.indexOf(strcitysIDNA[0]) > -1){
						//do nothin
					}
					else{
					citysID = citysID +','+ strcitysIDNA[0]
					citysNA = citysNA +'_'+ strcitysIDNA[1]
					//checkbox_values = checkbox_values +'@'+ frmFindPack.findPacks[counter].value;
					}
					
				}
			}
		}
	}
	//alert(checkbox_values +' = check')
	//alert(citysID +' ID')
	//alert(citysNA +' NA')
	if (citysID == undefined){
		alert('Please check at least one box. Thanks!');
		return;
	}
	else{
		document.frmFindPack.allID.value = citysID
		document.frmFindPack.allNA.value = citysNA
		document.frmFindPack.action = "/Find_Package_to_"+ citysNA +".aspx"
		//document.frmFindPack.action = "/AAA_Find_Packs_CO.asp" //"/Build_Package_to_"+ strToURL +".aspx"
		//document.frmBuildVac.action = "/Build_Itinerary.aspx"
		//alert(document.frmBuildVac.action)
		document.frmFindPack.submit()
	}
}
// ***** AJAX TO SHOW PLACE PACK FEEDBACKS *****
function callFeedBacks(IDplace,IDfeed){ 
    document.getElementById('eachFeed').innerHTML = '<img src="/images/wait.gif">';
	url = '/A_Get_PlaceFeedBack.aspx?PlaceID='+ IDplace +'&FeedID=' + IDfeed
	//alert(url)
	//http_request.onreadystatechange = FeedContents;
	Fhttp_request=FeedXmlHttpObject(FeedContents)
	Fhttp_request.open('GET', url, true); 
	Fhttp_request.send(null); 
} 

function FeedContents() { 
	if (Fhttp_request.readyState == 4) { 
	   if (Fhttp_request.status != '') { 
		 divFeedContent =  Fhttp_request.responseText;
		  setTimeout ("document.getElementById('eachFeed').innerHTML =  divFeedContent", 50 );
		  document.getElementById('linkSee').style.display = "block"
 } 
	   else { 
		   alert('There was a problem with the request.'); 
		   document.getElementById('eachFeed').innerHTML =  '';
		} 
	} 

}
function FeedXmlHttpObject(handler){
	if (navigator.userAgent.indexOf("Opera")>=0){
		alert("This City selector doesn't work in Opera")
		return
	}
	if (navigator.userAgent.indexOf("MSIE")>=0){
		var FstrName="Msxml2.XMLHTTP"
			if (navigator.appVersion.indexOf("MSIE 5.5")>=0){
				FstrName="Microsoft.XMLHTTP"
			}
			try{
				FobjXmlHttp=new ActiveXObject(FstrName)
				FobjXmlHttp.onreadystatechange=handler
				return FobjXmlHttp
			}
			catch(e){
				alert("Error. Scripting for ActiveX might be disabled")
				return
			}
	}
	if (navigator.userAgent.indexOf("Firefox")>=0){
	FobjXmlHttp=new XMLHttpRequest()
	FobjXmlHttp.onload=handler
	FobjXmlHttp.onerror=handler
	return FobjXmlHttp
	}
	if (navigator.userAgent.indexOf("Safari")>=0){
	FobjXmlHttp=new XMLHttpRequest()
	FobjXmlHttp.onload=handler
	FobjXmlHttp.onerror=handler
	return FobjXmlHttp
	}
}
// ***** FEEDBACKS NAAVEGATE 
function feedbackward(){
//alert(fnum)
	if (fnum>0){
		window.status=''
		fnum--
		if (fnum==0){
			fnum = 1
		}
		callFeedBacks(feedPlaceID,fedd[fnum])
		//var fcomm = FeedComm[fnum]
		//eval("document.getElementById('eachFeed').innerHTML=fcomm");
		eval("document.getElementById('feedNo').innerHTML=[fnum]+'/'+ feddTot");
		//eval("document.getElementById('feedNoUp').innerHTML=[fnum]+'/'+ feddTot");
	}
}
function feedforward(){
	//alert(fnum)
	if (fnum == 0){
		fnum = 1
	}
	if (fnum<fedd.length-1){
		fnum++
		callFeedBacks(feedPlaceID,fedd[fnum])
		//var comm = FeedComm[fnum]
		//eval("document.getElementById('eachFeed').innerHTML=comm");
		eval("document.getElementById('feedNo').innerHTML=[fnum]+'/'+ feddTot");
		//eval("document.getElementById('feedNoUp').innerHTML=[fnum]+'/'+ feddTot");
	}
	else window.status='End of Customer Feed backs'
}
function openInfo(proid,pic){
	if (pic == ''){
		var pic1 = document.getElementById('pic'+proid).src
		idxpic = pic1.indexOf('plus')
	}
	else{
		idxpic = pic.indexOf('plus')
	}
	divPro = 'divv'+proid
	thisimg = 'pic'+proid
	thisanch = 'anch'+proid
	//idxpic = pic.indexOf('Plus')
	if (idxpic > 0){
		
		if (document.getElementById(divPro) != null){
			document.getElementById(divPro).style.display = 'block'
			document.getElementById(thisimg).src = '/images/minus.gif' //id="pic<%=prodID%>" src="/images/Plus.jpg"
			document.getElementById(thisanch).className = 'Text_12_BlueBold'
			callPackInfo(proid)
		}
		else{
			alert("Not description available")
		}
	}
	else{
		document.getElementById(divPro).style.display = 'none'
		document.getElementById(thisimg).src = '/images/plus.gif'
		document.getElementById(divPro).innerHTML = ''
		document.getElementById(thisanch).className = 'Text_Arial12_navy'
	}

}
// ***** AJAX TO CALL PACK INFORMATION *****
var packID
var divPack
function callPackInfo(prodID){ 
//alert(prodID)
	packID = prodID
	divPack = 'divv'+prodID
    document.getElementById(divPack).innerHTML = '<img src="/images/wait.gif">';
	url = '/A_Get_PackInfo.aspx?PackID='+ packID +'&placeID='+ feedPlaceID +'&PlaceURL=Country&countryName='+jcountryName
	Phttp_request=PackXmlHttpObject(PackContents)
	Phttp_request.open('GET', url, true); 
	Phttp_request.send(null); 
} 

function PackContents() { 
	if (Phttp_request.readyState == 4) { 
	   if (Phttp_request.status != '') { 
		 divPackContent =  Phttp_request.responseText;
		  setTimeout ("document.getElementById('"+ divPack +"').innerHTML =  divPackContent", 50 );
 } 
	   else { 
		   alert('There was a problem with the request.'); 
		   document.getElementById(divPack).innerHTML =  '';
		} 
	} 

}
function PackXmlHttpObject(handler){
	if (navigator.userAgent.indexOf("Opera")>=0){
		alert("This City selector doesn't work in Opera")
		return
	}
	if (navigator.userAgent.indexOf("MSIE")>=0){
		var PstrName="Msxml2.XMLHTTP"
			if (navigator.appVersion.indexOf("MSIE 5.5")>=0){
				PstrName="Microsoft.XMLHTTP"
			}
			try{
				PobjXmlHttp=new ActiveXObject(PstrName)
				PobjXmlHttp.onreadystatechange=handler
				return PobjXmlHttp
			}
			catch(e){
				alert("Error. Scripting for ActiveX might be disabled")
				return
			}
	}
	if (navigator.userAgent.indexOf("Firefox")>=0){
	PobjXmlHttp=new XMLHttpRequest()
	PobjXmlHttp.onload=handler
	PobjXmlHttp.onerror=handler
	return PobjXmlHttp
	}
	if (navigator.userAgent.indexOf("Safari")>=0){
	PobjXmlHttp=new XMLHttpRequest()
	PobjXmlHttp.onload=handler
	PobjXmlHttp.onerror=handler
	return PobjXmlHttp
	}
}

// ***** AJAX TO SHOW PACK FEEDBACKS *****
var idpackshow
var totPfeed
var idsPfeed
var PACKfeed

function callfeed(packid,packna){
	idpackshow = packid
	nameanchor = 'anch'+packid
	//alert(nameanchor)
	//COgetAnchorPosition(nameanchor)
	//document.getElementById('feed'+ packid).style.display = 'block';
	//document.getElementById('feedControls'+ packid).style.display = 'block';
	callPackFeed(packid,0)
	
}

function hidePopup(hiddid){
	document.getElementById('feedControls'+ hiddid).style.display = 'none';
	document.getElementById('feed'+ hiddid).style.display = 'none';
	if (document.getElementById('cont'+idpackshow)!=null){
		document.getElementById('cont'+idpackshow).innerHTML = ""
	}
	
}

var Fpackval

function callPackFeed(IDpack,Fpack){ 
    //alert(IDpack+' | '+ Fpack)
	Fpackval = Fpack
	document.getElementById('cont'+idpackshow).innerHTML = '<img src="/images/wait.gif">';
	url = '/A_Get_FeedBack_for_Pack.aspx?packID='+ IDpack +'&packF='+ Fpack
	//http_request.onreadystatechange = FeedContents;
	Pshttp_request=PacksFeedXmlHttpObject(PacksFeedContents)
	Pshttp_request.open('GET', url, true); 
	Pshttp_request.send(null); 
} 

function PacksFeedContents() { 
	if (Pshttp_request.readyState == 4) { 
	   if (Pshttp_request.status != '') { 
		 divPsFeedContent =  Pshttp_request.responseText;
		  setTimeout ("document.getElementById('cont'+idpackshow).innerHTML =  divPsFeedContent", 0 );
		  if (Fpackval == 0){
		  	setTimeout ("Ppassval()", 100);
		  }
		  	  
 } 
	   else { 
		   alert('There was a problem with the request.'); 
		   document.getElementById('cont'+idpackshow).innerHTML =  '';
		} 
	} 

}
function PacksFeedXmlHttpObject(handler){
	if (navigator.userAgent.indexOf("Opera")>=0){
		alert("This City selector doesn't work in Opera")
		return
	}
	if (navigator.userAgent.indexOf("MSIE")>=0){
		var PsstrName="Msxml2.XMLHTTP"
			if (navigator.appVersion.indexOf("MSIE 5.5")>=0){
				PsstrName="Microsoft.XMLHTTP"
			}
			try{
				PsobjXmlHttp=new ActiveXObject(PsstrName)
				PsobjXmlHttp.onreadystatechange=handler
				return PsobjXmlHttp
			}
			catch(e){
				alert("Error. Scripting for ActiveX might be disabled")
				return
			}
	}
	if (navigator.userAgent.indexOf("Firefox")>=0){
	PsobjXmlHttp=new XMLHttpRequest()
	PsobjXmlHttp.onload=handler
	PsobjXmlHttp.onerror=handler
	return PsobjXmlHttp
	}
	if (navigator.userAgent.indexOf("Safari")>=0){
	PobjXmlHttp=new XMLHttpRequest()
	PobjXmlHttp.onload=handler
	PobjXmlHttp.onerror=handler
	return PobjXmlHttp
	}
}

/* ****************************  */
var idsPart
function Ppassval(){
		
	if (document.getElementById('totIDsFeed') != null){
		PACKnum = 0
		idsPfeed = document.getElementById('totIDsFeed').value;
		totPfeed = document.getElementById('totPackFeed').value;
		idsPart = idsPfeed.split('|');
		callPackFeed(idpackshow,idsPart[0])
		document.getElementById('feedTot'+ idpackshow).innerHTML = totPfeed
		document.getElementById('feed'+ idpackshow).style.display = 'block';
		document.getElementById('feedControls'+ idpackshow).style.display = 'block';
		
	}
}

function Hfeedbackward(){
	if (PACKnum>0){
		window.status=''
		PACKnum--
		callPackFeed(idpackshow,idsPart[PACKnum])
		PACKcount = PACKcount - 1
		eval("document.getElementById('HfeedNo'+idpackshow).innerHTML=PACKcount");
	}
}
function Hfeedforward(){
	
	if (PACKnum<totPfeed-1){
		PACKnum++
		callPackFeed(idpackshow,idsPart[PACKnum])
		PACKcount = PACKnum + 1
		eval("document.getElementById('HfeedNo'+idpackshow).innerHTML=PACKcount");
	}
	else window.status='End of Customer Feed backs'
}
function seeall(){
	test = location.pathname
	//alert(test)
	//document.getElementById('pgSEQ').value = 2
	window.location = '/All_Packages'+test
}
// ***** AJAX TO CALL SUGGESTED PACK INFORMATION *****
var spackID
var divsPack
var divsPackContent
function callSPackInfo(spgNo){ 
//alert(prodID)
	//spackID = sprodID
	sdivPack = 'divAllSpacks'
	scroll(0,0)
    document.getElementById(sdivPack).innerHTML = '<div style="padding:20px 2px;" align="center"><img src="/images/wait.gif"><br><img src="/images/NewLD/LD_BuildYourOwn.jpg"><div>';
		url = '/A_GET_Suggested_PackInfo.aspx?placeID='+ feedPlaceID +'&pageNo='+ spgNo +'&placeType='+ jplaceType +'&placeName='+ jplaceName+'&countryName='+jcountryName
	//alert(url)
	sPhttp_request=sPackXmlHttpObject(sPackContents)
	sPhttp_request.open('GET', url, true); 
	sPhttp_request.send(null); 
} 
function sPackContents() { 
	if (sPhttp_request.readyState == 4) { 
	   if (sPhttp_request.status != '') { 
		 divsPackContent =  sPhttp_request.responseText;
		  //setTimeout ("document.getElementById('"+ sdivPack +"').innerHTML =  divsPackContent", 50 );
		  document.getElementById(sdivPack).innerHTML =  divsPackContent;
		 
 } 
	   else { 
		   alert('There was a problem with the request.'); 
		   document.getElementById(divsPack).innerHTML =  '';
		} 
	} 

}
function sPackXmlHttpObject(handler){
	if (navigator.userAgent.indexOf("Opera")>=0){
		alert("This City selector doesn't work in Opera")
		return
	}
	if (navigator.userAgent.indexOf("MSIE")>=0){
		var PstrName="Msxml2.XMLHTTP"
			if (navigator.appVersion.indexOf("MSIE 5.5")>=0){
				sPstrName="Microsoft.XMLHTTP"
			}
			try{
				sPobjXmlHttp=new ActiveXObject(PstrName)
				sPobjXmlHttp.onreadystatechange=handler
				return sPobjXmlHttp
			}
			catch(e){
				alert("Error. Scripting for ActiveX might be disabled")
				return
			}
	}
	if (navigator.userAgent.indexOf("Firefox")>=0){
	sPobjXmlHttp=new XMLHttpRequest()
	sPobjXmlHttp.onload=handler
	sPobjXmlHttp.onerror=handler
	return sPobjXmlHttp
	}
	if (navigator.userAgent.indexOf("Safari")>=0){
	PobjXmlHttp=new XMLHttpRequest()
	PobjXmlHttp.onload=handler
	PobjXmlHttp.onerror=handler
	return PobjXmlHttp
	}
}
// **********************ANCHOR POSITION *************************

function COgetAnchorPosition(anchorname) {
	alert(anchorname)
	// This function will return an Object with x and y properties
	var useWindow=false;
	var coordinates=new Object();
	var x=0,y=0;
	// Browser capability sniffing
	var use_gebi=false, use_css=false, use_layers=false;
	if (document.getElementById) { use_gebi=true; }
	else if (document.all) { use_css=true; }
	else if (document.layers) { use_layers=true; }
	// Logic to find position
 	if (use_gebi && document.all) {
		x=COAnchorPosition_getPageOffsetLeft(document.all[anchorname]);
		y=COAnchorPosition_getWindowOffsetLeft(document.all[anchorname]);
		}
	else if (use_gebi) {
		var o=document.getElementById(anchorname);
		x=COAnchorPosition_getPageOffsetLeft(o);
		y=COAnchorPosition_getWindowOffsetLeft(o);
		}
 	else if (use_css) {
		x=COAnchorPosition_getPageOffsetLeft(document.all[anchorname]);
		y=COAnchorPosition_getWindowOffsetLeft(document.all[anchorname]);
		}
	else if (use_layers) {
		var found=0;
		for (var i=0; i<document.anchors.length; i++) {
			if (document.anchors[i].name==anchorname) { found=1; break; }
			}
		if (found==0) {
			coordinates.x=0; coordinates.y=0; return coordinates;
			}
		x=document.anchors[i].x;
		y=document.anchors[i].y;
		}
	else {
		coordinates.x=0; coordinates.y=0; return coordinates;
		}
	coordinates.x=x;
	coordinates.y=y;
	return coordinates;
	}

// COgetAnchorWindowPosition(anchorname)
//   This function returns an object having .x and .y properties which are the coordinates
//   of the named anchor, relative to the window
function COgetAnchorWindowPosition(anchorname) {
	var coordinates=COgetAnchorPosition(anchorname);
	var x=0;
	var y=0;
	if (document.getElementById) {
		if (isNaN(window.screenX)) {
			x=coordinates.x-document.body.scrollLeft+window.screenLeft;
			y=coordinates.y-document.body.scrollTop+window.screenTop;
			}
		else {
			x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
			y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
			}
		}
	else if (document.all) {
		x=coordinates.x-document.body.scrollLeft+window.screenLeft;
		y=coordinates.y-document.body.scrollTop+window.screenTop;
		}
	else if (document.layers) {
		x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
		y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
		}
	coordinates.x=x;
	coordinates.y=y;
	return coordinates;
	}

// Functions for IE to get position of an object
function COAnchorPosition_getPageOffsetLeft (el) {
	var ol=el.offsetLeft;
	while ((el=el.offsetParent) != null) { ol += el.offsetLeft; }
	return ol;
	}
function COAnchorPosition_getWindowOffsetLeft (el) {
	return COAnchorPosition_getPageOffsetLeft(el)-document.body.scrollLeft;
	}	
function COAnchorPosition_getWindowOffsetLeft (el) {
	var ot=el.offsetTop;
	while((el=el.offsetParent) != null) { ot += el.offsetTop; }
	return ot;
	}
function COAnchorPosition_getWindowOffsetTop (el) {
	return COAnchorPosition_getWindowOffsetLeft(el)-document.body.scrollTop;
	}
//***************
function highlight(field)
{
  field.focus();
  field.select();
}
function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Invalid E-mail ID")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Invalid E-mail ID")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }
		 return
	}
function ValidateForm(){
	var emailID=document.SiteEmialList.email
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Please Enter your Email ID")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}
	
	NewWindowLP('/E-Mails/RecordTableMail.asp','1','600','250','yes');return false
	//return true
 }
 var win = true;	
var winloc = window.location.href
function NewWindowLP(mypage,myname,w,h,scroll){
	
	if (myname !=1){
		
	mypage = '/Mail_Forms/SendPageFriend.asp?PageURL=' + winloc
	}
	
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
	win = window.open(mypage,myname,settings)
}
function typegateway(gate) {
	document.frmgateway.typeGetway.value = gate
	document.frmgateway.action = "/Design_Your_Own_Trip.aspx"
	document.frmgateway.submit()
}