	function getArray()
	{
		try
		{
			myVDir=window.location.toString();
			myVDir=myVDir.split("/")
			
			myStr=window.location.toString();
			slash=myStr.lastIndexOf("/");
			myStr=myStr.substr(slash+1);//myStr wil now have the actual .asp or .html file name			
			arrLiveSites=strLiveSites.toString().split(",");
			localMachines=localMachines.split(",");
		}
		catch(er)
		{
		}
	}

function bookVilla(sts)	
{
	getArray()
	if(sts)
	{
		if(myStr.toLowerCase()=="bookvilla.asp" || myStr.toLowerCase().indexOf("bookvilla.asp")>=0)
		{
			alert("You are already viewing the clicked page.")
			return;
		}
		else
		{
			for(localMachinesCtr=0;localMachinesCtr<localMachines.length;localMachinesCtr++)
			{			
				if(window.location.hostname.toLowerCase()==localMachines[localMachinesCtr].toLowerCase())
				{
					path="http://"+window.location.hostname + "/" + myVDir[3] + "/code/tobook/bookvilla.asp";
					window.parent.location.replace(path);
					return;
				}
			}
			
			for(liveSitesCtr=0;liveSitesCtr<arrLiveSites.length;liveSitesCtr++)
			{
				if(window.location.hostname==arrLiveSites[liveSitesCtr])
				{
					path="http://"+window.location.hostname+"/code/tobook/bookvilla.asp";						
					window.parent.location.replace(path);
					return;
				}
			}
		}
	}
}

