//change pic for each page base on the file name
var fullpath = location.href;
var startIndex = fullpath.lastIndexOf("/")+1;
var lastIndex = fullpath.lastIndexOf(".");
var questionPos = fullpath.lastIndexOf("?");
var equalPos = fullpath.lastIndexOf("=");
var endIndex = fullpath.length;
var shortenString = fullpath.substring(0, startIndex-1);
var directoryName = shortenString.substring(shortenString.lastIndexOf("/")+1, shortenString.length);
var filename = "";
var curURL = fullpath.substring(startIndex,lastIndex);

if (curURL.substring(0,5) == 'event')
	curURL = 'event';
else if	(curURL == "medical_in" ||  curURL == "spa_in")
	curURL = "wellness";
else if (curURL == "festival" ||  curURL == "major_holiday")
	curURL = "event";
else if (curURL.substring(0,4)=="golf")
	curURL = "golf";
else if (curURL == "wedding_in" || curURL == "honeymoon_in")
	curURL = "weddinghoney";
else if (curURL == "aboutus" || curURL == "fastfact")
	curURL = "front";
else if (curURL.substring(0, 9)=="market_in")
	curURL = "market_in";
else if (curURL.substring(0, 10)=="bazaars_in")
	curURL = "bazaars_in";

if (fullpath.substring(startIndex,questionPos) == "cities_in.aspx")
{
	//filename = "img_" + curURL + "_0" + fullpath.substring(equalPos+1, endIndex)+".jpg";
	curURL = "cities";
	filename = "img_" + curURL +".jpg";
}
else
{
	filename = "img_" + curURL +".jpg";
}

/** code for testing only
var filename = fullpath.substring(startIndex,lastIndex);
var filename = fullpath.substring(lastIndex+1,lastIndex+5);

document.write('<div id="Layer2" style="position:absolute; left:0px; top:0px; height:204px; z-index:3">');
document.write(directoryName);
document.write('</div>');
*/

//start of side menu
document.write('<table width="170" height="100%" border="0" cellpadding="0" cellspacing="0">')
document.write('<tr>')
document.write('<td  valign="top"  width="170">')
document.write('<img src="../images/share/' + filename + '" width="170" height="220">')
document.write('</td>')
document.write('<td valign="top" rowspan="2" bgcolor="#FFFFFF">')
document.write('</td>')
document.write('</tr>')
document.write('<tr align="right">')
document.write('<td  valign="top"  width="170">')
document.write('<table width="100%"  border="0" cellspacing="0" cellpadding="0">')
document.write('<tr>')
document.write('<td  valign="top"  width="5" rowspan="27">')
document.write('<img src="../images/share/spacer.gif" width="5" height="50">')
document.write('</td>')
document.write('<td  valign="top"  valign="top">')
document.write('<table width="100%"  border="0" cellspacing="0" cellpadding="0">')
document.write('<tr>')
document.write('<td  valign="top"  width="60" valign="top">')
document.write('<img src="../images/share/btn_fastfact_pic.jpg" width="60" height="22">')
document.write('</td>')
document.write('<td  valign="top" >')
document.write('<table width="96" height="22" border="0" cellpadding="0" cellspacing="0">')
document.write('<tr>')
document.write('<td  valign="top"  align="right" bgcolor="#34B3D1">')
document.write('<a href="../other/fastfact.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image6\',\'\',\'../images/share/btn_fastfact_on.gif\',1)">')
document.write('<img src="../images/share/btn_fastfact_off.gif" name="Image6" width="82" height="15" border="0">')
document.write('</a>')
document.write('<img src="../images/share/spacer.gif" width="14" height="14" border="0">')
document.write('</td>')
document.write('</tr>')
document.write('</table>')
document.write('</td>')
document.write('</tr>')
document.write('</table>')
document.write('</td>')
document.write('</tr>')
document.write('<tr>')
document.write('<td  valign="top"  valign="top">')
document.write('<img src="../images/share/spacer.gif" width="100%" height="5">')
document.write('</td>')
document.write('</tr>')
document.write('<tr>')
document.write('<td  valign="top"  valign="top">')
document.write('<img src="../images/share/img_line_1x1.gif" width="100%" height="3">')
document.write('</td>')
document.write('</tr>')
document.write('<tr>')
document.write('<td  valign="top"  valign="top">')
document.write('<img src="../images/share/tit_left_menu_travel_attract_' + directoryName + '.jpg" width="78" height="20" vspace="2">')
document.write('</td>')
document.write('</tr>')
document.write('<tr>')
document.write('<td  valign="top"  valign="top">')
document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0">')
document.write('<tr>')
document.write('<td  valign="top"  width="60" valign="top">')
document.write('<img src="../images/share/btn_major_city_pic.jpg" width="60" height="53">')
document.write('</td>')
document.write('<td  valign="top"  valign="top">')
document.write('<table width="96" height="53" border="0" cellpadding="0" cellspacing="0">')
document.write('<tr>')
document.write('<td  valign="top"  height="14" bgcolor="#34B3D1">')
document.write('<img src="../images/share/spacer.gif" width="82" height="14">')
document.write('</td>')
document.write('<td  valign="top"  width="14" height="14" valign="top">')
document.write('<img src="../images/share/img_left_menu_angle_' + directoryName + '.jpg" width="14" height="14">')
document.write('</td>')
document.write('</tr>')
document.write('<tr>')
document.write('<td  valign="top"  colspan="2" valign="top" bgcolor="#34B3D1">')
document.write('<table width="96" border="0" cellspacing="0" cellpadding="0">')
document.write('<tr>')
document.write('<td  valign="top"  align="right">')
document.write('<a href="../attract/cities.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image11\',\'\',\'../images/share/btn_majorcities_on.gif\',1)">')
document.write('<img src="../images/share/btn_majorcities_off.gif" name="Image11" width="82" height="15" vspace="5" border="0">')
document.write('</a>')
document.write('<img src="../images/share/spacer.gif" width="8" height="28">')
document.write('</td>')
document.write('</tr>')
document.write('</table>')
document.write('</td>')
document.write('</tr>')
document.write('</table>')
document.write('</td>')
document.write('</tr>')
document.write('</table>')
document.write('</td>')
document.write('</tr>')
document.write('<tr>')
document.write('<td  valign="top"  valign="top">')
document.write('<img src="../images/share/spacer.gif" width="100%" height="5">')
document.write('</td>')
document.write('</tr>')
document.write('<tr>')
document.write('<td  valign="top"  valign="top">')
document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0">')
document.write('<tr>')
document.write('<td  valign="top"  width="60" valign="top">')
document.write('<img src="../images/share/btn_highresort_pic.jpg" width="60" height="53">')
document.write('</td>')
document.write('<td  valign="top"  valign="top">')
document.write('<table width="96" height="53" border="0" cellpadding="0" cellspacing="0">')
document.write('<tr>')
document.write('<td  valign="top"  height="14" bgcolor="#34B3D1">')
document.write('<img src="../images/share/spacer.gif" width="82" height="14">')
document.write('</td>')
document.write('<td  valign="top"  width="14" height="14" valign="top">')
document.write('<img src="../images/share/img_left_menu_angle_' + directoryName + '.jpg" width="14" height="14">')
document.write('</td>')
document.write('</tr>')
document.write('<tr>')
document.write('<td  valign="top"  colspan="2" valign="top" bgcolor="#34B3D1">')
document.write('<table width="96" border="0" cellspacing="0" cellpadding="0">')
document.write('<tr>')
document.write('<td  valign="top"  align="right">')
document.write('<a href="../attract/hillresort_in.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image111\',\'\',\'../images/share/btn_hillresort_on.gif\',1)">')
document.write('<img src="../images/share/btn_hillresort_off.gif" name="Image111" width="82" height="15" vspace="5" border="0" id="Image111">')
document.write('</a>')
document.write('<img src="../images/share/spacer.gif" width="8" height="28">')
document.write('</td>')
document.write('</tr>')
document.write('</table>')
document.write('</td>')
document.write('</tr>')
document.write('</table>')
document.write('</td>')
document.write('</tr>')
document.write('</table>')
document.write('</td>')
document.write('</tr>')
document.write('<tr>')
document.write('<td  valign="top"  valign="top">')
document.write('<img src="../images/share/spacer.gif" width="100%" height="5">')
document.write('</td>')
document.write('</tr>')
document.write('<tr>')
document.write('<td  valign="top"  valign="top">')
document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0">')
document.write('<tr>')
document.write('<td  valign="top"  width="60" valign="top">')
document.write('<img src="../images/share/btn_island_pic.jpg" width="60" height="53">')
document.write('</td>')
document.write('<td  valign="top"  valign="top">')
document.write('<table width="96" height="53" border="0" cellpadding="0" cellspacing="0">')
document.write('<tr>')
document.write('<td  valign="top"  height="14" bgcolor="#34B3D1">')
document.write('<img src="../images/share/spacer.gif" width="82" height="14">')
document.write('</td>')
document.write('<td  valign="top"  width="14" height="14" valign="top">')
document.write('<img src="../images/share/img_left_menu_angle_' + directoryName + '.jpg" width="14" height="14">')
document.write('</td>')
document.write('</tr>')
document.write('<tr align="right">')
document.write('<td  valign="top"  colspan="2" valign="top" bgcolor="#34B3D1">')
document.write('<a href="../attract/island_in.aspx" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image112\',\'\',\'../images/share/btn_island_on.gif\',1)">')
document.write('<img src="../images/share/btn_island_off.gif" name="Image112" width="82" height="15" vspace="5" border="0" id="Image112">')
document.write('</a>')
document.write('<img src="../images/share/spacer.gif" width="8" height="28">')
document.write('</td>')
document.write('</tr>')
document.write('</table>')
document.write('</td>')
document.write('</tr>')
document.write('</table>')
document.write('</td>')
document.write('</tr>')
document.write('<tr>')
document.write('<td  valign="top"  valign="top">')
document.write('<img src="../images/share/spacer.gif" width="100%" height="5">')
document.write('</td>')
document.write('</tr>')
document.write('<tr>')
document.write('<td  valign="top"  valign="top">')
document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0">')
document.write('<tr>')
document.write('<td  valign="top"  width="60" valign="top">')
document.write('<img src="../images/share/btn_nationalpark_pic.jpg" width="60" height="53">')
document.write('</td>')
document.write('<td  valign="top"  valign="top">')
document.write('<table width="96" height="53" border="0" cellpadding="0" cellspacing="0">')
document.write('<tr>')
document.write('<td  valign="top"  height="14" bgcolor="#34B3D1">')
document.write('<img src="../images/share/spacer.gif" width="82" height="14">')
document.write('</td>')
document.write('<td  valign="top"  width="14" height="14" valign="top">')
document.write('<img src="../images/share/img_left_menu_angle_' + directoryName + '.jpg" width="14" height="14">')
document.write('</td>')
document.write('</tr>')
document.write('<tr align="right">')
document.write('<td  valign="top"  colspan="2" valign="top" bgcolor="#34B3D1">')
document.write('<a href="../attract/national_park_in.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image113\',\'\',\'../images/share/btn_nationalpark_on.gif\',1)">')
document.write('<img src="../images/share/btn_nationalpark_off.gif" name="Image113" width="82" height="15" vspace="5" border="0" id="Image113">')
document.write('</a>')
document.write('<img src="../images/share/spacer.gif" width="8" height="28">')
document.write('</td>')
document.write('</tr>')
document.write('</table>')
document.write('</td>')
document.write('</tr>')
document.write('</table>')
document.write('</td>')
document.write('</tr>')
document.write('<tr>')
document.write('<td  valign="top"  valign="top">')
document.write('<img src="../images/share/spacer.gif" width="100%" height="5">')
document.write('</td>')
document.write('</tr>')
document.write('<tr>')
document.write('<td  valign="top"  valign="top">')
document.write('<img src="../images/share/img_line_1x1.gif" width="100%" height="3">')
document.write('</td>')
document.write('</tr>')
document.write('<tr>')
document.write('<td  valign="top"  valign="top">')
document.write('<img src="../images/share/spacer.gif" width="100%" height="5">')
document.write('</td>')
document.write('</tr>')
document.write('<tr>')
document.write('<td  valign="top"  valign="top">')
document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0">')
document.write('<tr>')
document.write('<td  valign="top"  width="60" valign="top">')
document.write('<img src="../images/share/btn_culture_pic.jpg" width="60" height="53">')
document.write('</td>')
document.write('<td  valign="top"  valign="top">')
document.write('<table width="96" height="53" border="0" cellpadding="0" cellspacing="0">')
document.write('<tr>')
document.write('<td  valign="top"  height="14" bgcolor="#34B3D1">')
document.write('<img src="../images/share/spacer.gif" width="82" height="14">')
document.write('</td>')
document.write('<td  valign="top"  width="14" height="14" valign="top">')
document.write('<img src="../images/share/img_left_menu_angle_' + directoryName + '.jpg" width="14" height="14">')
document.write('</td>')
document.write('</tr>')
document.write('<tr align="right" valign="top">')
document.write('<td  valign="top"  colspan="2" bgcolor="#34B3D1">')
document.write('<a href="../other/culture.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image114\',\'\',\'../images/share/btn_culture_on.gif\',1)">')
document.write('<img src="../images/share/btn_culture_off.gif" name="Image114" width="82" height="15" vspace="5" border="0" id="Image114">')
document.write('</a>')
document.write('<img src="../images/share/spacer.gif" width="8" height="28">')
document.write('</td>')
document.write('</tr>')
document.write('</table>')
document.write('</td>')
document.write('</tr>')
document.write('</table>')
document.write('</td>')
document.write('</tr>')
document.write('<tr>')
document.write('<td  valign="top"  valign="top">')
document.write('<img src="../images/share/spacer.gif" width="100%" height="5">')
document.write('</td>')
document.write('</tr>')
document.write('<tr>')
document.write('<td  valign="top"  valign="top">')
document.write('<img src="../images/share/img_line_1x1.gif" width="100%" height="3">')
document.write('</td>')
document.write('</tr>')
document.write('<tr>')
document.write('<td  valign="top"  valign="top">')
document.write('<img src="../images/share/spacer.gif" width="100%" height="5">')
document.write('</td>')
document.write('</tr>')
document.write('<tr>')
document.write('<td  valign="top"  valign="top">')
document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0">')
document.write('<tr>')
document.write('<td  valign="top"  width="60" valign="top">')
document.write('<img src="../images/share/btn_travelinfo_pic.jpg" width="60" height="53">')
document.write('</td>')
document.write('<td  valign="top"  valign="top">')
document.write('<table width="96" height="53" border="0" cellpadding="0" cellspacing="0">')
document.write('<tr>')
document.write('<td  valign="top"  height="14" bgcolor="#34B3D1">')
document.write('<img src="../images/share/spacer.gif" width="82" height="14">')
document.write('</td>')
document.write('<td  valign="top"  width="14" height="14" valign="top">')
document.write('<img src="../images/share/img_left_menu_angle_' + directoryName + '.jpg" width="14" height="14">')
document.write('</td>')
document.write('</tr>')
document.write('<tr>')
document.write('<td  valign="top"  colspan="2" align="right" valign="top" bgcolor="#34B3D1">')
document.write('<a href="../other/travelinfo.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image115\',\'\',\'../images/share/btn_travelinfo_on.gif\',1)">')
document.write('<img src="../images/share/btn_travelinfo_off.gif" name="Image115" width="82" height="15" vspace="5" border="0" id="Image115">')
document.write('</a>')
document.write('<img src="../images/share/spacer.gif" width="8" height="28">')
document.write('</td>')
document.write('</tr>')
document.write('</table>')
document.write('</td>')
document.write('</tr>')
document.write('</table>')
document.write('</td>')
document.write('</tr>')
document.write('<tr>')
document.write('<td  valign="top"  valign="top">')
document.write('<img src="../images/share/spacer.gif" width="100%" height="5">')
document.write('</td>')
document.write('</tr>')
document.write('<tr>')
document.write('<td  valign="top"  valign="top">')
document.write('<img src="../images/share/img_line_1x1.gif" width="100%" height="3">')
document.write('</td>')
document.write('</tr>')
document.write('<tr>')
document.write('<td  valign="top"  valign="top">')
document.write('<img src="../images/share/spacer.gif" width="100%" height="5">')
document.write('</td>')
document.write('</tr>')
document.write('<tr>')
document.write('<td  valign="top"  valign="top">')
document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0">')
document.write('<tr>')
document.write('<td  valign="top"  width="60" valign="top">')
document.write('<img src="../images/share/btn_other_pic.jpg" width="60" height="53">')
document.write('</td>')
document.write('<td  valign="top"  valign="top">')
document.write('<table width="96" height="53" border="0" cellpadding="0" cellspacing="0">')
document.write('<tr>')
document.write('<td  valign="top"  height="14" bgcolor="#34B3D1">')
document.write('<img src="../images/share/spacer.gif" width="82" height="14">')
document.write('</td>')
document.write('<td  valign="top"  width="14" height="14" valign="top">')
document.write('<img src="../images/share/img_left_menu_angle_' + directoryName + '.jpg" width="14" height="14">')
document.write('</td>')
document.write('</tr>')
document.write('<tr align="right">')
document.write('<td  valign="top"  colspan="2" valign="top" bgcolor="#34B3D1">')
document.write('<a href="../other/otherlink.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image116\',\'\',\'../images/share/btn_other_on.gif\',1)">')
document.write('<img src="../images/share/btn_other_off.gif" name="Image116" width="82" height="15" vspace="5" border="0" id="Image116">')
document.write('</a>')
document.write('<img src="../images/share/spacer.gif" width="8" height="28">')
document.write('</td>')
document.write('</tr>')
document.write('</table>')
document.write('</td>')
document.write('</tr>')
document.write('</table>')
document.write('</td>')
document.write('</tr>')
document.write('<tr>')
document.write('<td  valign="top"  valign="top">')
document.write('<img src="../images/share/spacer.gif" width="100%" height="5">')
document.write('</td>')
document.write('</tr>')
document.write('<tr>')
document.write('<td  valign="top"  valign="top">')
document.write('<img src="../images/share/img_line_1x1.gif" width="100%" height="3">')
document.write('</td>')
document.write('</tr>')
document.write('<tr>')
document.write('<td  valign="top"  valign="top">')
document.write('<img src="../images/share/spacer.gif" width="100%" height="5">')
document.write('</td>')
document.write('</tr>')
document.write('<tr>')
document.write('<td  valign="top"  valign="top">')
document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0">')
document.write('<tr>')
document.write('<td  valign="top"  width="60" valign="top">')
document.write('<a href="../ebook/index.html" target="_blank">')
document.write('<img src="../images/share/btn_book_pic.gif" width="60" height="53" border="0">')
document.write('</a>')
document.write('</td>')
document.write('<td  valign="top"  valign="top">')
document.write('<table width="96" height="53" border="0" cellpadding="0" cellspacing="0">')
document.write('<tr>')








document.write('<td  valign="top"  colspan="2" valign="top" >')
document.write('<a href="../ebook/index.html" target="_blank" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image117\',\'\',\'../images/share/btn_book_on.gif\',1)">')
document.write('<img src="../images/share/btn_book_off.gif" width="96" height="53" border="0">')
document.write('</a>')

document.write('</td>')
document.write('</tr>')
document.write('</table>')
document.write('</td>')
document.write('</tr>')
document.write('<tr><td><img src="../images/share/spacer.gif" width="8" height="30"></td></tr>')
document.write('</table>')
document.write('</td>')
document.write('</tr>')
document.write('</table>')
document.write('</table>')
document.write('</td>')
document.write('<td width="10" valign="top" bgcolor="#FFFFFF"><img src="../images/share/spacer.gif" width="10" height="8"></td>')