var strTitle="";
 var LoadXml;
var countId="";
var cityId="";
 
		  function ReadXml(Id) 
{ 

	if( window.ActiveXObject && /Win/.test(navigator.userAgent) )
	{ 
		LoadXml = new ActiveXObject("Msxml.DOMDocument"); 
		LoadXml.async = false; 
		LoadXml.onreadystatechange = function () 
		{ 
		    if (LoadXml.readyState == 4) ManipulateXML(Id); 
		} 
		LoadXml.load("../../common_inc/link.xml"); 
	} 
	else if( document.implementation && document.implementation.createDocument ) 
	{ 
		LoadXml = document.implementation.createDocument("","",null); 
		LoadXml.async=false; 
		var loaded = LoadXml.load("../../common_inc/link.xml"); 
		moz=1;
		if (loaded) 
		{ 
			ManipulateXML(Id);
		} 
	} 
	else 
	{ 
		alert("Your browser can\'t handle this script"); 
		return; 
	} 
}
function ManipulateXML(resortid)
{

strTitle = LoadXml.getElementsByTagName("HotelLinks")[0]; 
if(strTitle.getElementsByTagName('Hotel').length>0)
{
for(var i=0; i<strTitle.getElementsByTagName('Hotel').length; i++) 
{
if(strTitle.getElementsByTagName('Hotel')[i].getAttribute("HotelId")==resortid)
{
countId=strTitle.getElementsByTagName('Hotel')[i].getAttribute("countryId");
cityId=strTitle.getElementsByTagName('Hotel')[i].getAttribute("CityId");
}
}
}
} 




var propertyId=document.getElementById('propId').value;
ReadXml(propertyId);
//alert(countId+ " " + cityId);
//document.write("<A href='https://www.trustinternational.com/mBooker/taj/2B?LANGUAGE=en&property=TXL-TJ-" + propertyId + "'><IMG id='IMG2' height=14 src='../images/checkrate.gif' width='164' border=0></A>");
//alert("https://beta.yourreservation.net/ibe/TajHolidays/main.html?ccpSelectCity=" +cityId +"&ccpSelectCountry="+countId+"&ccpSelectHotel=TJ%2D"+propertyId+"&language=EN&quick=page1");
document.write("<A href='https://www.yourreservation.net/ibe/TajHolidays/main.html?ccpSelectCity=" +cityId +"&ccpSelectCountry="+countId+"&ccpSelectHotel=TJ%2D"+propertyId+"&language=EN&quick=page1'><IMG id='IMG2' height=14 src='../images/checkrate_German.gif' width='164' border=0></A>");

