var xmlDoc;var actualduration;var themeselected;var duration_strt;var duration_end;var link;var xmlsource="/packagedata.xml";if(window.ActiveXObject)
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");else if(document.implementation&&document.implementation.createDocument)
xmlDoc=document.implementation.createDocument("","doc",null);if(typeof xmlDoc!="undefined"){xmlDoc.load(xmlsource)}
function findtour()
{if(document.myform.themes.selectedIndex==0)
{alert("Please select a theme of your visit to India");return false;}else
{themeselected=document.myform.themes.options[document.myform.themes.selectedIndex].value;}
if(document.myform.duration.selectedIndex==0)
{alert("Please select the approximate duration of your visit");return false;}else
{actualduration=document.myform.duration.options[document.myform.duration.selectedIndex].value;}
if(actualduration=="R1")
{duration_strt=2;duration_end=5;}
if(actualduration=="R2")
{duration_strt=6;duration_end=8;}
if(actualduration=="R3")
{duration_strt=9;duration_end=12;}
if(actualduration=="R4")
{duration_strt=13;duration_end=16;}
if(actualduration=="R5")
{duration_strt=17;duration_end=20;}
if(actualduration=="R6")
{duration_strt=21;duration_end=31;}
var xmlobj=xmlDoc.getElementsByTagName("xmlticker")[0];var xmlobj_len=xmlDoc.getElementsByTagName("xmlticker").length;var themeslen=xmlobj.childNodes.length;var messobj=xmlDoc.getElementsByTagName(themeselected)[0];var messlen=messobj.childNodes.length;var firstchildvalue;var pkg_shortlisted="";for(i=0;i<messlen;i++)
{if(window.ActiveXObject)
{actualduration=messobj.childNodes[i].getAttribute("duration");link=messobj.childNodes[i].getAttribute("url");firstchildvalue=messobj.childNodes[i].firstChild.nodeValue;if((actualduration>=duration_strt)&&(actualduration<=duration_end))
{pkg_shortlisted+="<A href=/holiday-packages-india/"+link+">"+firstchildvalue+"</A>"+"<BR>";}}else
{if(messobj.childNodes[i].nodeName=="message")
{actualduration=messobj.childNodes[i].getAttribute("duration");link=messobj.childNodes[i].getAttribute("url");firstchildvalue=messobj.childNodes[i].firstChild.nodeValue;if((actualduration>=duration_strt)&&(actualduration<=duration_end))
{pkg_shortlisted+="<A href=/holiday-packages-india/"+link+">"+firstchildvalue+"</A>"+"<BR>";}}}}
showpackage(pkg_shortlisted);return false;}
function showpackage(pkg)
{if(pkg!="")
{document.getElementById("container").innerHTML="Customized Tour(s) Found<BR>"+pkg+"<BR>";}else{document.getElementById("container").innerHTML="<B>Sorry ! No tour found</B><BR>Try changing your criteria<BR><BR>";}
return false;}
browserName=navigator.appName;browserName1=navigator.userAgent;browserVer=parseInt(navigator.appVersion);condition=!(((browserName.indexOf("Explorer")>=0)&&(browserVer<4))||((browserName.indexOf("Netscape")>=0)&&(browserVer<2))||((browserName1.indexOf("Firefox")!=-1)));if(condition==true)
CanAnimate=true;else
CanAnimate=false;function translator(pattern)
{var open_in_same_window=1;var my_location=unescape(document.location.toString());var new_location='';var new_pattern='';if(my_location.indexOf('translate_c?')!=-1){var indexof_u=my_location.indexOf('u=');if(indexof_u==-1){new_location=document.location;}
else{var subs=my_location.substring(indexof_u,my_location.length);var ss=subs.split('&');new_location=ss[0].substring(2,ss[0].length);}}
else{new_location=document.location;}
indexof_p=pattern.indexOf('|');var isen='';if(indexof_p==-1){indexof_p1=pattern.indexOf('><');if(indexof_p1==-1){new_pattern=pattern;if(pattern=='en'){isen=1;}}
else{var psplit=pattern.split('><');new_pattern=psplit[0]+'|'+psplit[1];if(psplit[1]=='en'){isen=1;}}}
else{var psplit=pattern.split('|');new_pattern=psplit[0]+'|'+psplit[1];if(psplit[1]=='en'){isen=1;}}
var thisurl='';if(isen==1){thisurl=new_location;}
else{thisurl='http://translate.google.com/translate_c?langpair='+new_pattern+"&u="+new_location;}
if(open_in_same_window==1){window.location.href=thisurl;}
else{if(CanAnimate){msgWindow=window.open('','subwindow','toolbar=yes,location=yes,directories=yes,status=yes,scrollbars=yes,menubar=yes,resizable=yes,left=0,top=0');msgWindow.focus();msgWindow.location.href=thisurl;}
else{msgWindow=window.open(thisurl,'subwindow','toolbar=yes,location=yes,directories=yes,status=yes,scrollbars=yes,menubar=yes,resizable=yes,left=0,top=0');}}}
var is_input = document.URL.indexOf('?');var tour_value = '';if (is_input != -1){addr_str = document.URL.substring(is_input+1, document.URL.length);strarr = addr_str.split("&");var param_name = unescape((strarr[0].split("="))[0]);if(param_name == "tour"){tour_value = unescape((strarr[0].split("="))[1]);tour_value = tour_value.replace(/\+/g," ");}}
