var loadcheck;
loadcheck=0;
var address  ="./nimages";
var laddress ="http://www.viziohub.com";
var faddress ="www.viziohub.com";

//The checkbox should always be named as chkRoomType
function checkcheck(f)
{
/*
	if(f.chkRoomType)
	{		
		for (i=0;i<f.chkRoomType.length;i++)
		{
			if(f.chkRoomType[i].checked==true)
			{
				val = true;
				break; 
			}
			else
			{
			val = false;
			}
		}
		if (val==false)
		{
			alert("Please select at least one Room Type to proceed")
		}
	}
	else
	{
	val = false;
	}
	return val;
*/
return true
}


function emailthispage()
{
tryEmail = window.open("../../mailthispage/default.asp","Email","width=550,height=500,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes");
}

function callPop(e,f)
{
//alert (e.name);
tryWin = window.open("about:blank",'','location=no,toolbar=no,status=no,menubar=no,resizable=yes,titlebar=no')
	with (tryWin.document)
	{
	writeln ("<html><head><title>"+f+"</title>")
	writeln ("<scr"+"ipt>")
	writeln ("function resizerepos()")
	writeln ("{")
	writeln ("w = document.tryImg.width+13")
	writeln ("h = document.tryImg.height+29")
	writeln ("window.resizeTo (w,h)")
	writeln ("tryWidth = window.screen.width/2")
	writeln ("tryWidth2 = document.tryImg.width/2")
	writeln ("tryHeight = window.screen.height/2")
	writeln ("tryHeight2 = document.tryImg.height/2")
	writeln ("trySet1 = tryWidth-tryWidth2")
	writeln ("trySet2 = tryHeight-tryHeight2")
	writeln ("if (trySet1<0){trySet1=0}")
	writeln ("if (trySet2<0){trySet2=0}")
	writeln ("window.moveTo(trySet1,trySet2)")
	writeln ("}")
	writeln ("//send()")
	writeln ("</scr"+"ipt>")
	writeln ("</head><body marginwidth=0 marginheight=0 leftmargin=0 topmargin=0>")
	writeln ("<img src='"+laddress+"/PressRoom/PhotoLibrary/Images/"+e+"' name=tryImg border=1 bordercolor=#000000 align=center onLoad='javascript:resizerepos();'>")
	writeln ("<P>Trying Auto Pop</P>")
	writeln ("<scri"+"pt>")
	writeln ("//resizerepos()")
	writeln ("</scri"+"pt>")
	writeln ("</body></html>")
	}
}


function send()
{
//alert (FlashEnabled);
w = document.tajmap.width;// + 20;
h = document.tajmap.height;// + 20;
incW= parseInt(w) + 10;
incH= parseInt(h) + 25;
window.resizeTo (incW,incH)
tryWidth = window.screen.width/2
tryWidth2 = document.tajmap.width/2;
tryHeight = window.screen.height/2
tryHeight2 = document.tajmap.height/2;
trySet1 = tryWidth-tryWidth2
trySet2 = tryHeight-tryHeight2
if (trySet1<0)
	{
	alert ("Too Big!")
	trySet1=0
	}
window.moveTo(trySet1,trySet2)
}

function send2()
{
w = document.worldmap.width;// + 20;
h = document.worldmap.height;// + 20;
incW= parseInt(w) + 10;
incH= parseInt(h) + 25;
window.resizeTo (incW,incH)
tryWidth = window.screen.width/2
tryWidth2 = document.worldmap.width/2;
tryHeight = window.screen.height/2
tryHeight2 = document.worldmap.height/2;
trySet1 = tryWidth-tryWidth2
trySet2 = tryHeight-tryHeight2
if (trySet1<0)
	{
	alert ("Too Big!")
	trySet1=0
	}
window.moveTo(trySet1,trySet2)
}

function getCityMap()
{
	//alert("Opening Map");
	mapWin = window.open("Map.html","_blank","toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=410,height=420");
}
function getCityMap1()
{
	//alert("Opening Map");
	mapWin = window.open("Map1.html","_blank","toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=410,height=420");
}

function openHotel(v_hlink)
{
	
	var hlink= new String(v_hlink);  
    	var StoRep=new RegExp(',');  
	for(i=0;i<2;i++)
	{
	 hlink=hlink.replace(StoRep,'%2C');
	}
	v_hlink=hlink;
	window.opener.location.href=laddress+v_hlink;
}
function returnCurrencyType()
{
             if (document.cookie.indexOf("isIndia=")==-1)
	{
                   //cookie does not exists
	     curr = "USD"
	}
             else
	{
	     //cookie exists
                  idx = document.cookie.indexOf("isIndia=")
                  startIdx = document.cookie.indexOf("=", idx) + 1
                  endIdx = document.cookie.indexOf(";", idx);
	     var isIndia = document.cookie.substring(startIdx, endIdx);
                  if (isIndia ==1)
                   curr = "INR";
	    else
	     curr = "USD"
	}
	return curr;
}