function loadXMLDoc(XmlFileName)
{
var xmlDoc;
// code for IE
if (window.ActiveXObject)
{
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
}
// code for Mozilla, Firefox, Opera, etc.
else if (document.implementation
&& document.implementation.createDocument)
{
xmlDoc=document.implementation.createDocument("","",null);
}
else
{
alert('Your browser cannot handle this script');
}
xmlDoc.async=false;
xmlDoc.load(XmlFileName);
return(xmlDoc);
}

function LoadXmlWithXsl(XmlFileName,xslFileName,DestinationDivName,PageNum)
{
//alert(PageNum);
return;
xml=loadXMLDoc(XmlFileName);
//alert(xml.getElementsByTagName("PAC_Menu/PAC_Menu_Paging/PAC_Menu_Index").xml);

if (PageNum>0)
    xml.getElementsByTagName("PAC_Menu/PAC_Menu_Paging/PAC_Menu_Index")[0].childNodes[0].nodeValue=PageNum;
//alert(PageNum);


xsl=loadXMLDoc(xslFileName);
// code for IE
if (window.ActiveXObject)
{
ex=xml.transformNode(xsl);
//alert(ex);
document.getElementById(DestinationDivName).innerHTML=ex;
}
// code for Mozilla, Firefox, Opera, etc.
else if (document.implementation
&& document.implementation.createDocument)
{
xsltProcessor=new xslTProcessor();
xsltProcessor.importStylesheet(xsl);
resultDocument = xsltProcessor.transformToFragment(xml,document);
//alert(resultDocument);
document.getElementById(DestinationDivName).appendChild(resultDocument);
}
}

//javascript:LoadXmlWithXsl("PAC_Menu_A.XML","PAC_Menu.xsl","first-class-tours-list",<xsl:value-of select="."/>)

function Itinerary_OnLoad()
{
   var PAC = GetQueryStringValue("PAC");
   //alert(PAC);
   LoadXmlWithXsl(PAC,"summary_tab.xsl","summary_tab",0);
   LoadXmlWithXsl(PAC,"itinerary_tab.xsl","itinerary_tab",0);
   LoadXmlWithXsl(PAC,"inclusions_tab.xsl","inclusions_tab",0);
   LoadXmlWithXsl(PAC,"hotels_tab.xsl","hotels_tab",0);
   LoadXmlWithXsl(PAC,"price_tab.xsl","price_tab",0);
   //LoadXmlWithXsl(PAC,"how_to_tab.xsl","how_to_tab",0);
   LoadXmlWithXsl(PAC,"photos_tab.xsl","photos_tab",0);
}



function GetQueryStringValue(QueryStringName)
{
   var querystring = location.search;
   //alert(querystring);
   //alert(querystring.substr(5));
   return querystring.substr(5);
}



