	var gWindowCounter = Math.round(Math.random() * 10000);
	var winModalWindow
	function ShowUrl(xiUrl, xiCaption, xiWidth, xiHeight, xiAllowScroll)
	{
		var lLeft = 100;
		var lTop  = 100;
			
		if(screen)
		{
			lLeft = (screen.availWidth - xiWidth) / 2;
			lTop  = (screen.availHeight - xiHeight) / 2;
		}
			
		gWindowCounter++;
		var lAllowScroll = xiAllowScroll ? "yes" : "no";
		var windowName = "Popup" + gWindowCounter;
		var win = window.open(xiUrl, windowName, "width=" + xiWidth + ",height=" + xiHeight + ",left=" + lLeft + ",top=" + lTop + ",screenX=" + lLeft + ",screenY=" + lTop + ",location=no,status=no,toolbar=no,menubar=no,scrollbars=" + lAllowScroll + ",resizable=no");
		return;
	}
		
	function RadioVal(xiRegionName,xiRegionId)
	{
		var tmp = document.getElementById('search-destination');
		if (tmp)
		{
			var lRegionBoxObj = tmp.getElementsByTagName('INPUT');
			if(lRegionBoxObj != null)
			{
				lRegionBoxObj[0].value = xiRegionName;
			}
			var element = document.getElementById('CustomerPageLayout:Regionhidden');
			if (element)
			{	
				element.value = xiRegionId;
			}	
		}          
	}
	function SetCurser() 
	{ 
		var lButtonObject = document.getElementById('CheckAvailabilityButton');
		if (lButtonObject != null) 
		{
			lButtonObject.focus(); 
			lButtonObject.click();
		} 
	}
		
	function MM_openBrWindow(theURL,winName,features) 
	{ //v2.0
		window.open(theURL,winName,features);
	}

	function cl()
	{
		var lCountryIndex = document.getElementById('cmbother').selectedIndex;
		var lCountryObject = document.getElementById('cmbother').options[lCountryIndex];
		var lCountryObjecttext = lCountryObject.value;
		if (lCountryObjecttext == "ss")
		{
			alert("Select Other Recommended Site")
			return false;
		}
		else
		{
			window.open(lCountryObjecttext,"","width=600,height=435,status=yes,scrollbars=yes,resizable=yes,location=yes,menubar=yes,toolbar=yes,top=140,left=50")
			return true;
		}
	}

	/*function chk()
	{
		alert(1);
		ValidationForRoomType();
		var lBrowName   = (navigator.appName);
		var lBrowNo     = parseInt(navigator.appVersion);
		alert(lBrowNo);
		if (lBrowNo <= 4)
		{
			MM_showHideLayers('main','','hide','prel','','show');
		}
		else
		{
			MM_showHideLayers('main','','hide','prel1','','show');
			var lBrowserComButton = document.getElementById("<%= BrowserComButton.ClientID %>");
			lBrowserComButton.click();
		}
	}*/

	function MM_showHideLayers()
	{ //v6.0
		var i,p,v,obj,args = MM_showHideLayers.arguments;
		for (i=0; i<(args.length-2); i+=3) 
		{
			if ((obj=MM_findObj(args[i]))!=null) 
			{ 
				v = args[i+2];
				if (obj.style) 
				{ 
					obj = obj.style; v=(v=='show')?'':(v=='hide')?'none':v; 
				}
				obj.display = v; 
			}
		}
	}	

	function MM_findObj(n, d) 
	{ //v4.01
		var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
			d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
		if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
		for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
		if(!x && d.getElementById) x=d.getElementById(n); return x;
	}
	
	function Redirect(xiId)
	{
		alert(xiId);
	}
	
	function IsIe()
	{
		var ie = (document.all);
		if (ie)
		{
			return true;
		}
		else
		{
			return false;
		}
	}  

	function IsMac()
	{
		if (navigator.platform.toLowerCase().indexOf("mac") != -1)
		{
			return true;
		}
		else
		{
			return false;
		}
	}
	
	function Url2(xiCountryDropDown, xiCityDropDown, xiCityDistrictDropDown)
	{
		var lCountryDropDownIndex       = document.getElementById(xiCountryDropDown).selectedIndex;
		var lCityDropDownIndex          = document.getElementById(xiCityDropDown).selectedIndex;
		var lCityDistrictDropDownIndex  = document.getElementById(xiCityDistrictDropDown).selectedIndex;		
		var lCountryDropDownObject      = document.getElementById(xiCountryDropDown).options[lCountryDropDownIndex];
		var lCountryDropDownObjectValue = lCountryDropDownObject.value;
		
		if (lCityDistrictDropDownIndex > 0 )
		{
			var lCityDropDownObject      = document.getElementById(xiCityDropDown).options[lCityDropDownIndex];
			var lCityDropDownObjectValue = lCityDropDownObject.value;
			var lCityDistrictDropDownObject      = document.getElementById(xiCityDistrictDropDown).options[lCityDistrictDropDownIndex];
			var lCityDistrictDropDownObjectValue = lCityDistrictDropDownObject.value;
			var file4 = 'GenerateLink.aspx?varcountryname=' + escape(lCountryDropDownObject.text) + '&varcountrycode=' + lCountryDropDownObjectValue;
			var file4 = file4 + '&varcityname=' + escape(lCityDropDownObject.text) + '&varcitycode=' + lCityDropDownObjectValue;
			var file4 = file4 + '&varcitydistrictname=' + escape(lCityDistrictDropDownObject.text) + '&varcitydistrictcode=' + lCityDistrictDropDownObjectValue;
			var o=window.open(file4,"abc","width=400,height=100,status=yes,scrollbars=no,resizable=no,location=no,menubar=no,toolbar=no,top=5,left=10");
		}
		else if (lCityDropDownIndex > 0)
		{
			var lCityDropDownObject      = document.getElementById(xiCityDropDown).options[lCityDropDownIndex];
			var lCityDropDownObjectValue = lCityDropDownObject.value;
			var file4 = 'GenerateLink.aspx?varcountryname=' + escape(lCountryDropDownObject.text) + '&varcountrycode=' + lCountryDropDownObjectValue;
			var file4 = file4 + '&varcityname=' + escape(lCityDropDownObject.text) + '&varcitycode=' + lCityDropDownObjectValue;
			var o=window.open(file4,"abc","width=400,height=100,status=yes,scrollbars=no,resizable=no,location=no,menubar=no,toolbar=no,top=5,left=10");
		}
		else if (lCountryDropDownIndex > 0)
		{
			var lCountryDropDownObject      = document.getElementById(xiCountryDropDown).options[lCountryDropDownIndex];
			var lCountryDropDownObjectValue = lCountryDropDownObject.value;
			var file4 = 'GenerateLink.aspx?varcountryname=' + escape(lCountryDropDownObject.text) + '&varcountrycode=' + lCountryDropDownObjectValue;
			var file4 = file4 + '&varcityname=' + escape(lCountryDropDownObject.text) + '&varcitycode=' + lCountryDropDownObjectValue;
			//var o=window.open(file4,"abc","width=400,height=100,status=yes,scrollbars=no,resizable=no,location=no,menubar=no,toolbar=no,top=5,left=10");
			var lUrl = "";
			var lCountryCount  = 0;
			var lOptionCounter = 1;
			//alert(lCountryDropDownObjectValue);
			
			a = document.createElement('table');
			//alert(a);
			for (lCountryCount = 1 ; lCountryCount < country_town.length ; lCountryCount++ )
			{	
				r = a.insertRow(lCountryCount);
				c = r.insertCell(lCountryCount);				
				if(country_town[lCountryCount][2] == lCountryDropDownObjectValue && country_town[lCountryCount][1] != null &&  country_town[lCountryCount][1] != "")
				{
					lUrl =  lUrl + '/SouthTravels/Aspx/Customer/Availability/RegionDetails.aspx?RegionName=?' + country_town[lCountryCount][1] + '&RegionId=' + country_town[lCountryCount][0] + '<br>';
					c.innerHTML = '/SouthTravels/Aspx/Customer/Availability/RegionDetails.aspx?RegionName=?' + country_town[lCountryCount][1] + '&RegionId=' + country_town[lCountryCount][0];
					lOptionCounter++;
				}
			}
			alert(a.innerHTML);
			var lTextArea = document.getElementById('BackOfficePageLayout_LinkArea');
			lTextArea.innerText = a.innerHTML;
		}
	}
	
	//-->
