// JavaScript Document

function SingleImgOn (name, img) {
  document[name].src = eval(img + "_on.src");
}
function SingleImgOff (name, img) {
  document[name].src = eval(img + "_off.src");
}
function ImgOn (img){
  document[img].src = eval(img + "_on.src");
}
function ImgOff (img){
  document[img].src = eval(img + "_off.src");
}
function ChangeClass (element, class_name) {
  element.className = class_name;
}
function init_image(section) {
	if (section != 'home') { section = '../'; }
	else { section = ''; }
    image1_on = new Image();
	image1_on.src = section + "images/m_home_on.gif"
	image1_off = new Image();
	image1_off.src = section +"images/m_home_off.gif"
	
	image2_on = new Image();
	image2_on.src = section +"images/m_villa_on.gif"
	image2_off = new Image();
	image2_off.src = section +"images/m_villa_off.gif"
	
	image3_on = new Image();
	image3_on.src = section +"images/m_apartment_on.gif";
	image3_off = new Image();
	image3_off.src = section +"images/m_apartment_off.gif";
	
	image4_on = new Image();
	image4_on.src = section +"images/m_facility_on.gif";
	image4_off = new Image();
	image4_off.src = section +"images/m_facility_off.gif";
	
	image5_on = new Image();
	image5_on.src = section +"images/m_location_on.gif";
	image5_off = new Image();
	image5_off.src = section +"images/m_location_off.gif";
	
	image6_on = new Image();
	image6_on.src = section +"images/m_rate_on.gif";
	image6_off = new Image();
	image6_off.src = section +"images/m_rate_off.gif";
	
	image7_on = new Image();
	image7_on.src = section +"images/m_tour_on.gif";
	image7_off = new Image();
	image7_off.src = section +"images/m_tour_off.gif";
	
	image8_on = new Image();
	image8_on.src = section +"images/m_contact_on.gif";
	image8_off = new Image();
	image8_off.src = section +"images/m_contact_off.gif";
}
function nav(section){
	document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0" align="right"><tr><td align="left">');
	document.write('<tr><td align="left"><img src="images/c_E8E3D5.gif" width="150" height="1" border="0"></td></tr>');	
	document.write('<tr><td align="left" style="padding-left:12px; padding-top:3px; padding-bottom: 12px;">');
	document.write(''+ ((section=='home')?'':'<a href="' + ((section=='home')?'':'../')+'index.html" onMouseOver="SingleImgOn(\'contentTopNav+0\',\'image1\');return true;" onMouseOut="SingleImgOff(\'contentTopNav+0\',\'image1\');return true;">')+'<img src="' + ((section=='home')?'':'../')+'images/m_home' + ((section=='home')?'_on':'_off')+'.gif" alt="Home" width="38" height="11" border="0" name="contentTopNav+0"></a>');
	document.write('</td></tr>');	
	document.write('<tr><td align="left"><img src="images/c_E8E3D5.gif" width="150" height="1" border="0"></td></tr>');	
	document.write('<tr><td align="left" style="padding-left:12px; padding-top:3px; padding-bottom: 12px;">');
	document.write(''+ ((section=='villa')?'':'<a href="' + ((section=='home')?'':'../')+'villa/index.html" onMouseOver="SingleImgOn(\'contentTopNav+1\',\'image2\');return true;" onMouseOut="SingleImgOff(\'contentTopNav+1\',\'image2\');return true;">')+'<img src="' + ((section=='home')?'':'../')+'images/m_villa' + ((section=='villa')?'_on':'_off')+'.gif" alt="Villas" width="34" height="11" border="0" name="contentTopNav+1"></a>');
	document.write('</td></tr>');	
	document.write('<tr><td align="left"><img src="images/c_E8E3D5.gif" width="150" height="1" border="0"></td></tr>');	
	document.write('<tr><td align="left" style="padding-left:12px; padding-top:3px; padding-bottom: 12px;">');
	document.write(''+ ((section=='apartment')?'':'<a href="' + ((section=='home')?'':'../')+'apartment/index.html" onMouseOver="SingleImgOn(\'contentTopNav+2\',\'image3\');return true;" onMouseOut="SingleImgOff(\'contentTopNav+2\',\'image3\');return true;">')+'<img src="' + ((section=='home')?'':'../')+'images/m_apartment' + ((section=='apartment')?'_on':'_off')+'.gif" alt="Apartments" width="70" height="11" border="0" name="contentTopNav+2"></a>');
	document.write('</td></tr>');
	document.write('<tr><td align="left"><img src="images/c_E8E3D5.gif" width="150" height="1" border="0"></td></tr>');	
	document.write('<tr><td align="left" style="padding-left:12px; padding-top:3px; padding-bottom: 12px;">');
	document.write(''+ ((section=='facility')?'':'<a href="' + ((section=='home')?'':'../')+'facility/index.html" onMouseOver="SingleImgOn(\'contentTopNav+3\',\'image4\');return true;" onMouseOut="SingleImgOff(\'contentTopNav+3\',\'image4\');return true;">')+'<img src="' + ((section=='home')?'':'../')+'images/m_facility' + ((section=='facility')?'_on':'_off')+'.gif" alt="Facilities" width="54" height="11" border="0" name="contentTopNav+3"></a>');
	document.write('</td></tr>');
	document.write('<tr><td align="left"><img src="images/c_E8E3D5.gif" width="150" height="1" border="0"></td></tr>');	
	document.write('<tr><td align="left" style="padding-left:12px; padding-top:3px; padding-bottom: 12px;">');
	document.write(''+ ((section=='location')?'':'<a href="' + ((section=='home')?'':'../')+'location/index.html" onMouseOver="SingleImgOn(\'contentTopNav+4\',\'image5\');return true;" onMouseOut="SingleImgOff(\'contentTopNav+4\',\'image5\');return true;">')+'<img src="' + ((section=='home')?'':'../')+'images/m_location' + ((section=='location')?'_on':'_off')+'.gif" alt="Location" width="60" height="11" border="0" name="contentTopNav+4"></a>');
	document.write('</td></tr>');
	document.write('<tr><td align="left"><img src="images/c_E8E3D5.gif" width="150" height="1" border="0"></td></tr>');	
	document.write('<tr><td align="left" style="padding-left:12px; padding-top:3px; padding-bottom: 12px;">');
	document.write(''+ ((section=='rate')?'':'<a href="' + ((section=='home')?'':'../')+'rate/index.html" onMouseOver="SingleImgOn(\'contentTopNav+5\',\'image6\');return true;" onMouseOut="SingleImgOff(\'contentTopNav+5\',\'image6\');return true;">')+'<img src="' + ((section=='home')?'':'../')+'images/m_rate' + ((section=='rate')?'_on':'_off')+'.gif" alt="Room Rates" width="73" height="11" border="0" name="contentTopNav+5"></a>');
	document.write('</td></tr>');
	document.write('<tr><td align="left"><img src="images/c_E8E3D5.gif" width="150" height="1" border="0"></td></tr>');	
	document.write('<tr><td align="left" style="padding-left:12px; padding-top:3px; padding-bottom: 12px;">');
	document.write(''+ ((section=='tour')?'':'<a href="' + ((section=='home')?'':'../')+'tour/index.html" onMouseOver="SingleImgOn(\'contentTopNav+6\',\'image7\');return true;" onMouseOut="SingleImgOff(\'contentTopNav+6\',\'image7\');return true;">')+'<img src="' + ((section=='home')?'':'../')+'images/m_tour' + ((section=='tour')?'_on':'_off')+'.gif" alt="Photo Tour" width="76" height="11" border="0" name="contentTopNav+6"></a>');
	document.write('</td></tr>');
	document.write('<tr><td align="left"><img src="images/c_E8E3D5.gif" width="150" height="1" border="0"></td></tr>');	
	document.write('<tr><td align="left" style="padding-left:12px; padding-top:3px; padding-bottom: 12px;">');
	document.write(''+ ((section=='contact')?'':'<a href="' + ((section=='home')?'':'../')+'contact/index.html" onMouseOver="SingleImgOn(\'contentTopNav+7\',\'image8\');return true;" onMouseOut="SingleImgOff(\'contentTopNav+7\',\'image8\');return true;">')+'<img src="' + ((section=='home')?'':'../')+'images/m_contact' + ((section=='contact')?'_on':'_off')+'.gif" alt="Booking / Contact Us" width="74" height="11" border="0" name="contentTopNav+7"></a>');
	document.write('</td></tr>');
	document.write('<tr><td align="left"><img src="images/c_E8E3D5.gif" width="150" height="1" border="0"></td></tr>');	
	document.write('</table>');
}
function footer() {
	document.write('<img src="images/c_688319.gif" border="0" width="1000" height="3"></div><br>');
	document.write('<div class="comment" align="center">');
	document.write('<a href="http://www.samuibkjresort.com/contact/cancellation.html" class=comment  style="text-decoration: none">')
	document.write('<b>Cancellation &amp; No Show Policy</b>');
	document.write('&nbsp;&nbsp;|&nbsp;&nbsp;')
	document.write('<a href="http://www.samuibkjresort.com/contact/index.html" class=comment style="text-decoration: none">')
	document.write('<b>Contact Us</b></a><br><br>');
	document.write('&copy;2010 Baan Kao Hua Jook - All rights reserved<br>');
	document.write('83/46 Moo 2, Chaweng Beach, T.Bophut, Koh Samui, 84320 Suratthani - THAILAND<br>'); 
	document.write('Tel: 0066 77 414094 ** Tel: 0066 77 484740-1 ** Fax: 0066 77 484743<br>');
	document.write('Email: <a href="mailto:info@samuibkjresort.com" class="comment">info@samuibkjresort.com</a>');
	document.write('&nbsp;-&nbsp;<a href="mailto:booking@samuibkjresort.com" class="comment">booking@samuibkjresort.com</a><br><br><br>');
	document.write('</div>');
}

function footer2() {
	document.write('<img src="images/c_688319.gif" border="0" width="1000" height="3"></div>');
	document.write('<div class="comment" align="center">');
	document.write('&copy;2010 Baan Kao Hua Jook - All rights reserved<br>');
	document.write('</div>');
}



function openwin(url,w,h) {
	str = "";
	if (w!='') { str = str + "width=" + w + ", height=" + h + ","; }
	str = str + "toolbars=0,status=0,resizable=0,scrollbars=0";
	window.open(url,'',str);
}