//All scripts unless specified are copyright Poweraxis 2003-2006 - www.poweraxis.com

function doVoid()
{
}

function changeLinkTemp(linkName)
{
document.getElementById(linkName).style.backgroundColor="#FF0000";
document.getElementById(linkName).style.color="#FFFFFF";
}

function resetLinkTemp(linkName)
{
document.getElementById(linkName).style.backgroundColor="#DECE3E";
document.getElementById(linkName).style.color="#000000";
}

storeTours = new Array();
storeTours[0] = "";
storeTours[1] = "Magical Europe - 10 nights / 11 days";
storeTours[2] = "Grand Europe - 16 nights / 17 days";
storeTours[3] = "European Splendours - 14 nights / 15 days";
storeTours[4] = "Enchanting Switzerland - 6 nights / 7 days";
storeTours[5] = "Ultimate USA - 14 nights / 15 days";
storeTours[6] = "USA : Best of West Coast - 9 nights / 10 days";
storeTours[7] = "USA : Magical East Coast - 9 nights / 10 days";
storeTours[8] = "Amazing Australia - 9 nights / 10 days";
storeTours[9] = "Melbourne (add-on to Australia) - 3 nights / 4 days";
storeTours[10] = "Best of Australia & New Zealand - 16 nights / 17 days";
storeTours[11] = "New Zealand Self-Drive - 11 nights / 12 days";
storeTours[12] = "Vibrant South Africa - 9 nights / 10 days";
storeTours[13] = "Kenya Safari - 6 nights / 7 days";
storeTours[14] = "Tanzania - 3 nights / 4 days";
storeTours[15] = "Mystical China - 9 nights / 10 days";
storeTours[16] = "Best of Far East - 9 nights / 10 days";
storeTours[17] = "Magical Kashmir and Mystical Sikkim";
storeTours[18] = "Himachal Pradesh and Uttaranchal";
storeTours[19] = "Golden Triangle";
storeTours[20] = "Mumbai to Goa & Green Kerala";
storeTours[21] = "Palace on Wheels";

tourHtmlName = new Array();
tourHtmlName[0] = "";
tourHtmlName[1] = "europe_magical";
tourHtmlName[2] = "europe_grand";
tourHtmlName[3] = "europe_splendour";
tourHtmlName[4] = "switzerland_enchanting";
tourHtmlName[5] = "usa_ultimate";
tourHtmlName[6] = "usa_west_coast";
tourHtmlName[7] = "usa_east_coast";
tourHtmlName[8] = "australia_amazing";
tourHtmlName[9] = "melbourne";
tourHtmlName[10] = "australia_newzealand";
tourHtmlName[11] = "newzealand";
tourHtmlName[12] = "south_africa";
tourHtmlName[13] = "kenya";
tourHtmlName[14] = "tanzania";
tourHtmlName[15] = "china_mystical";
tourHtmlName[16] = "far_east";
tourHtmlName[17] = "kashmir_sikkim";
tourHtmlName[18] = "himachal_uttaranchal";
tourHtmlName[19] = "golden_triangle";
tourHtmlName[20] = "mumbai_goa_kerala";
tourHtmlName[21] = "palace_on_wheels";

function generateTourListing()
{
var a = 0;
var i = 0;
//var output = '<form name="jumpToTours">';
//var output = '<I CLASS="allWidgets">Choose a Tour</I>&nbsp;&nbsp;';
var output = '\n<br><select name="allTours" style="font-size: .9em" class="footnote" onChange=setTours(this.selectedIndex);>';
for (xx=0; i<storeTours.length; i++)
{
	var forAlternateColor = i % 2;
	//alert(forAlternateColor);
	if (forAlternateColor==0)
	output += '\n<option style="color: #999933">' + '&nbsp;' + storeTours[i] + '</option>';
	else
	output += '\n<option style="background-color: #EFEFEF">' + '&nbsp;' + storeTours[i] + '</option>';
	if (i==0)
	output += '\n<optgroup label="INTERNATIONAL DESTINATIONS">';
	if (i==16)
	output += '\n<optgroup label="INDIA DESTINATIONS">';
	if (i==21)
	output += '<\optgroup>';
}
output += '\n</select>';
output += '\n<\/form>';
document.writeln(output);
//document.jumpToTours.allTours.options[a].selected=true;
//document.jumpToTours.allTours.options[3].style.backgroundColor='efefef';
}

function setTours(num)
{
//var storeloc = self.location;
//var revisestore = "'" + storeloc + "'";
//var checkoccur = revisestore.indexOf(("insights" + num),1);
if (num==0 || num==22)
return false;
//else if (checkoccur>0)
//{
//alert("You are already on this page");
//return false;
//}
else
self.location=tourHtmlName[num] + ".html";
}

function launchBigPic()
{
picOpening = window.open('','mywin','left=20,top=20,width=500,height=500,toolbar=1,resizable=0');
}

var opwin;

function launchWindow(imgPath,imgW,imgH,tl)
{
if (opwin)
opwin.close();
setwinW=imgW + 10;
setwinH=imgH + 40;
var myBars = 'directories=no,location=no,menubar=no,status=no';
myBars += ',titlebar=yes,toolbar=no';
var myOptions = 'scrollbars=no,width=' + imgW + ',height=' + imgH + ',left=100,top=100;resizebar=no';
var myFeatures = myBars + ',' + myOptions;
opwin = window.open('', '', myFeatures);
opwin.document.writeln("<body bgcolor='#000000' marginheight='0' marginwidth='0' leftmargin='0' topmargin='0'>");
opwin.document.writeln("<center><a href='#' onClick='self.close()'><img src='",imgPath,"' width=",imgW," height=",imgH,"border='0'></a></center>");
opwin.document.writeln("<title>",captionForImages[tl],"</title>");
opwin.document.writeln("</body>");
opwin.document.close();
//opwin.window.resizeTo(setwinW,setwinH);
}


function showPhotoWindow(pWin,whichImage,imgTitle)
{
	document.getElementById(pWin).style.visibility="visible";
	resolutionWidth=document.body.clientWidth;
	resolutionHeight=document.body.clientHeight;
	photoWindowLeft=(resolutionWidth-500)/10;
	photoWindowTop=(resolutionHeight-500)/2;
	document.getElementById(pWin).style.display='block';
	//document.getElementById(pWin).style.left=photoWindowLeft + "px";
	//document.getElementById(pWin).style.top=photoWindowTop + "px";
	document.getElementById(pWin).innerHTML="<img src='./images/loading.gif'>";
	document.getElementById(pWin).innerHTML="<center><img src='./images/" + whichImage + "' width=360 height=360 vspace=0 hspace=0 border=0></center><div id='captionImg' style='position: relative; left 10px; bottom: 10px; width: 356px; background-color: #FFFFFF; color: #FF6600; padding: .2em; font-size: .8em; line-height: 1.4em; font-weight: bold'><br>" + captionForImages[imgTitle] + "</div>";
}

function showPhotoWindowClick(pWin,whichImage,imgTitle)
{
	//document.getElementById('blackBox').style.border="4px";
	document.getElementById('blackBox').style.display='block';
	document.getElementById('blackBox').style.visibility="visible";
	document.getElementById('closeBlackBox').style.visibility="visible";
	var ttt=setTimeout("delayShow();",100);
	resolutionWidth=document.body.clientWidth;
	resolutionHeight=document.body.clientHeight;
	photoWindowLeft=(resolutionWidth-500)/10;
	photoWindowTop=(resolutionHeight-500)/2;
	document.getElementById(pWin).style.display='block';
	//document.getElementById(pWin).style.left=photoWindowLeft + "px";
	//document.getElementById(pWin).style.top=photoWindowTop + "px";
	document.getElementById(pWin).innerHTML="<img src='./images/loading.gif'>";
	document.getElementById(pWin).innerHTML="<center><a href=javascript:furtherEnlarge('finalImage','resetButton')><img src='./images/" + whichImage + "' width=360 height=360 vspace=0 hspace=0 id='finalImage'></a><br clear='all'></center><div id='captionImg' style='position: relative; left 12px; bottom: -2px; width: 356px; background-color: #FFFFFF; color: #FF6600; padding: .2em; font-size: .8em; font-weight: bold; border-top: 1px groove #333333; border: 2px solid #EFEFEF'><br>" + captionForImages[imgTitle] + "</div><span id='resetButton' style='position: absolute; visibility: visible; top: 10px; left: 10px; background-color: #EECC00; padding: .2em; color: #000000; font-size: .7em; font-weight: bold'>CLICK IMAGE TO FURTHER ZOOM</span>";
}

function hidePhotoWindow(pWin)
{
	resolutionWidth=document.body.clientWidth;
	resolutionHeight=document.body.clientHeight;
	photoWindowLeft=(resolutionWidth-500)/10;
	photoWindowTop=(resolutionHeight-500)/2;
	document.getElementById(pWin).style.display='none';
	//document.getElementById(pWin).style.left="10px";
	//document.getElementById(pWin).style.top="10px";
}

function delayShow(imgToHighlight)
{
	document.getElementById('photoWindow').style.display="block";
	document.getElementById('photoWindow').style.visibility="visible";
}

function hidePhotoWindowClick(pWin)
{
	document.getElementById('blackBox').style.display='none';
	document.getElementById('blackBox').style.visibility="hidden";
	document.getElementById('closeBlackBox').style.visibility="hidden";
	document.getElementById(pWin).style.visibility="hidden";
	resolutionWidth=document.body.clientWidth;
	resolutionHeight=document.body.clientHeight;
	photoWindowLeft=(resolutionWidth-500)/10;
	photoWindowTop=(resolutionHeight-500)/2;
	document.getElementById(pWin).style.display='none';
	//document.getElementById(pWin).style.left="10px";
	//document.getElementById(pWin).style.top="10px";
	document.getElementById('photoWindow').style.width="360px";
	document.getElementById('photoWindow').style.height="390px";
	document.getElementById('captionImg').style.width="356px";
}

function delayResetImgSize(fImg,phoWin,capImg,rButton)
{
	document.getElementById(fImg).width=360;
	document.getElementById(fImg).height=360;
	document.getElementById(phoWin).style.width="360px";
	document.getElementById(phoWin).style.height="390px";
	document.getElementById(capImg).style.width="356px";
	document.getElementById(rButton).innerHTML="CLICK IMAGE TO FURTHER ZOOM";
}

//var tyty=0;

function furtherEnlarge(finImg,rButton)
{
	//alert("ok");
	tyty=document.getElementById(finImg).width;
	//alert(tyty);
	if (tyty==600)
	{
		//alert(tyty);
		delayResetImgSize('finalImage','photoWindow','captionImg','resetButton');
	}
	else
	{
	document.getElementById('photoWindow').style.width="600px";
	document.getElementById('photoWindow').style.height="630px";
	document.getElementById('captionImg').style.width="596px";
	document.getElementById(finImg).width=600;
	document.getElementById(finImg).height=600;
	document.getElementById(rButton).style.visibility="visible";
	document.getElementById(rButton).innerHTML="CLICK IMAGE TO RESET";
	}
}

function showInfoPop(popId)
{
	if (document.getElementById(popId).style.visibility=='visible')
	{
		document.getElementById(popId).style.visibility="hidden";
		document.getElementById(popId).style.display="none";
	} else
	{
		document.getElementById(popId).style.display="block";
		document.getElementById(popId).style.visibility="visible";
	}
}