function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


function SiamThaiShowCoupon(picURL,picWidth,picHeight,picTitle) {
newWindow=window.open(picURL,'CouponWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+picWidth+',height='+picHeight)
//newWindow=window.open(picURL,'CouponWindow','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=yes,width='+picWidth+',height='+picHeight)
//newWindow.document.write('<html><head><title>'+picTitle+'<\/title><\/head><body background="'+picURL+'"><\/body><\/html>')
newWindow.document.write('<html><head><title>'+picTitle+'<\/title><link href="SiamThai.css" rel="stylesheet" type="text\/css"><\/head><body LEFTMARGIN=10 TOPMARGIN=10 MARGINWIDTH=0 MARGINHEIGHT=0><center><a class="text11" href="javascript:window.print()">Print Coupon<\/a> &nbsp; - &nbsp; <a class="text11" href="javascript:window.close()">Close Window<\/a><br><img src="'+picURL+'" border=0><br><font class="text11">If the "Print Coupon" link does not work for you, <br>you may Right-Click on coupon then select "Print Picture".<\/font><\/center><\/body><\/html>')
newWindow.resizeBy(picWidth-newWindow.document.body.clientWidth,picHeight-newWindow.document.body.clientHeight)
newWindow.focus()
}


function SiamThaiFoodPic(picURL,picWidth,picHeight,picTitle) {
newWindow=window.open(picURL,'newWin','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width='+picWidth+',height='+picHeight)
//newWindow.document.write('<html><head><title>'+picTitle+'<\/title><\/head><body background="'+picURL+'"><\/body><\/html>')
newWindow.document.write('<html><head><title>'+picTitle+'<\/title><\/head><body LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0><img src="'+picURL+'" border=0><\/body><\/html>')
newWindow.resizeBy(picWidth-newWindow.document.body.clientWidth,picHeight-newWindow.document.body.clientHeight)
newWindow.focus()
}


function checkEmailAddress(field) {
	var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi);

	if (goodEmail)	{
   		return true
	} else {
   		alert('Please enter a valid e-mail address.')
   		field.focus()
   		field.select()
   		return false
   	}
}



function checkSiamThaiContactForm() {
	var err_msg;
	err_msg="";

	var vName = document.SiamThaiContactForm.custname;
	var vEmail = document.SiamThaiContactForm.custemail;
	var vComment = document.SiamThaiContactForm.custmesg;

	if (vName.value.length == 0){
		err_msg = err_msg + "-- Your Name \n";
	}
	if (vEmail.value.length == 0){
		err_msg = err_msg + "-- Your Email Address \n";
	}
	if (vComment.value.length == 0){
		err_msg = err_msg + "-- Message \n";
	}


	if (err_msg.length == 0){
		return checkEmailAddress(vEmail);
	} else {
		alert("Please provide the following information: \n\n" + err_msg);
		return false;
	}
}



function SiamThai_Test() {
//var SiteRoot = "http://www.MySiamThai.com/";
document.write('this is a test');
}


function SiamThai_BoiseContact() {
var ContactString = '';
ContactString = ContactString + '<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">';
ContactString = ContactString + '                    <tr> ';
ContactString = ContactString + '                      <td><div align="left" class="text11"><strong>';
ContactString = ContactString + '					  590 E. Boise Ave.';
ContactString = ContactString + '					  <br>';
ContactString = ContactString + '					  Boise, ID 83706';
ContactString = ContactString + '					  <br>';
ContactString = ContactString + '					  Tel: 208-383-9032';
ContactString = ContactString + '					  <br>';
ContactString = ContactString + '					  Fax: 208-319-0172';
ContactString = ContactString + '					  </strong></div></td>';
ContactString = ContactString + '                    </tr>';
ContactString = ContactString + '                 </table>';
document.write(ContactString);
}


function SiamThai_MeridianContact() {
var ContactString = '';
ContactString = ContactString + '<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">';
ContactString = ContactString + '                    <tr> ';
ContactString = ContactString + '                      <td><div align="left" class="text11"><strong>';
ContactString = ContactString + '					  2951 E. Overland Road,';
ContactString = ContactString + '					  <br>';
ContactString = ContactString + '					  Meridian, ID 83642';
ContactString = ContactString + '					  <br>';
ContactString = ContactString + '					  Tel: 208-898-8939';
ContactString = ContactString + '					  <br>';
ContactString = ContactString + '				  Fax: 208-898-8940';
ContactString = ContactString + '					  </strong></div></td>';
ContactString = ContactString + '                    </tr>';
ContactString = ContactString + '                  </table>';
document.write(ContactString);
}


function SiamThai_BoiseHours() {
var HoursString = '';
HoursString = HoursString + '<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">';
HoursString = HoursString + '             <tr> ';
HoursString = HoursString + '                <td><div align="center" class="text"><strong><font color="#777777">';
HoursString = HoursString + '				    Lunch: M-F 11AM - 3PM';
HoursString = HoursString + '                    <br>';
HoursString = HoursString + '                    Dinner: M-Th 5PM - 9:30PM';
HoursString = HoursString + '                    <br>';
HoursString = HoursString + '                    Dinner: Fri 5PM - 10:30PM';
HoursString = HoursString + '                    <br>';
HoursString = HoursString + '                   Saturday: 12PM - 10:30PM';
HoursString = HoursString + '					<br>';
HoursString = HoursString + '                    Sunday: 12PM - 9:30PM';
HoursString = HoursString + '					</font></strong></div></td>';
HoursString = HoursString + '              </tr>';
HoursString = HoursString + '            </table>';
document.write(HoursString);
}


function SiamThai_MeridianHours() {
var HoursString = '';
HoursString = HoursString + '<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">';
HoursString = HoursString + '              <tr> ';
HoursString = HoursString + '                <td><div align="center" class="text"><strong><font color="#777777">';
HoursString = HoursString + '				    Lunch: M-F 11AM - 3PM';
HoursString = HoursString + '                    <br>';
HoursString = HoursString + '                    Dinner: M-Th 5PM - 9:30PM';
HoursString = HoursString + '                    <br>';
HoursString = HoursString + '                    Dinner: Fri 5PM - 10:30PM';
HoursString = HoursString + '                    <br>';
HoursString = HoursString + '                    Saturday: 12PM - 10:30PM';
HoursString = HoursString + '					<br>';
 HoursString = HoursString + '                   Sunday: 12PM - 9:30PM';
HoursString = HoursString + '					</font></strong></div></td>';
HoursString = HoursString + '              </tr>';
HoursString = HoursString + '            </table>';
document.write(HoursString);
}


function SiamThai_InsertCoupon() {

/***** disabled 3/15/2010 ******/
return;

var CouponString = '';
CouponString = CouponString + 'Internet Coupon <a href="javascript:SiamThaiShowCoupon( \'images/SiamThai_WebCoupon_current.jpg\',\'450\',\'650\',\'Siam Thai Restaurant - Internet Special\');"><IMG align="middle" SRC="images/SiamThai_WebCoupon_20060726_icon_47x32.jpg" WIDTH=45 HEIGHT=30 border="0" ALT="Click to see Special Internet Coupon" TITLE="Click to see Special Internet Coupon" onmouseover="window.status=\'Siam Thai Restaurant - Click to see Internet Special\';return true" onmouseout="window.status=\'\';return true"></a> <IMG align="top" SRC="images/new_flashing.gif" WIDTH=28 HEIGHT=11 ALT="" TITLE="">';
document.write(CouponString);
}


function SiamThai_InsertCouponSide() {

/***** disabled 3/15/2010 ******/
return;

var CouponString = '';
CouponString = CouponString + '<center><br><hr><b>Internet Coupon</b> <IMG align="top" SRC="images/new_flashing.gif" WIDTH=28 HEIGHT=11 ALT="" TITLE=""> <br><br> <a href="javascript:SiamThaiShowCoupon( \'images/SiamThai_WebCoupon_current.jpg\',\'450\',\'650\',\'Siam Thai Restaurant - Internet Special\');"><IMG align="middle" SRC="images/SiamThai_WebCoupon_20060726_small_125x85.jpg" WIDTH=125 HEIGHT=85 border="0" ALT="Click to see Special Internet Coupon" TITLE="Click to see Special Internet Coupon" onmouseover="window.status=\'Siam Thai Restaurant - Click to see Internet Special\';return true" onmouseout="window.status=\'\';return true"></a></center>';
document.write(CouponString);
}



function SiamThaiMap(url) {
  newWindow=window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=600,height=400,screenX=150,screenY=150,top=150,left=150')
  newWindow.focus()
}


function SiamThaiAwards(picURL,picWidth,picHeight,picTitle) {
newWindow=window.open(picURL,'newWin','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width='+picWidth+',height='+picHeight)
//newWindow.document.write('<html><head><title>'+picTitle+'<\/title><\/head><body background="'+picURL+'"><\/body><\/html>')
newWindow.document.write('<html><head><title>'+picTitle+'<\/title><\/head><body LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0><img src="'+picURL+'" border=0><\/body><\/html>')
newWindow.resizeBy(picWidth-newWindow.document.body.clientWidth,picHeight-newWindow.document.body.clientHeight)
newWindow.focus()
}



function SiamThaiInterview(picURL,picWidth,picHeight,picTitle) {
newWindow=window.open(picURL,'newWin','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width='+picWidth+',height='+picHeight)
//newWindow.document.write('<html><head><title>'+picTitle+'<\/title><\/head><body background="'+picURL+'"><\/body><\/html>')
newWindow.document.write('<html><head><title>'+picTitle+'<\/title><\/head><body LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0><img src="'+picURL+'" border=0><\/body><\/html>')
newWindow.resizeBy(picWidth-newWindow.document.body.clientWidth,picHeight-newWindow.document.body.clientHeight)
newWindow.focus()
}


function SiamThai_BottomNav() {
var BottomNavString = '';
BottomNavString = BottomNavString + '<table width="780" height="30" border="0" align="center" cellpadding="0" cellspacing="0" background="images\/index_49.gif">';
BottomNavString = BottomNavString + '<tr>';
BottomNavString = BottomNavString + '<td valign="middle" align="center"class="text10">';
BottomNavString = BottomNavString + '<a href="http:\/\/www.MySiamThai.com\/index.html">Siam Thai Restaurant Home Page<\/a>';
BottomNavString = BottomNavString + '&nbsp; | &nbsp;';
BottomNavString = BottomNavString + '<a href="http:\/\/www.MySiamThai.com\/menu.html">Siam Thai Menu<\/a>';
BottomNavString = BottomNavString + '&nbsp; | &nbsp;';
BottomNavString = BottomNavString + '<a href="http:\/\/www.MySiamThai.com\/locations.html">Location Virtual Tour<\/a>';
BottomNavString = BottomNavString + '&nbsp; | &nbsp;';
BottomNavString = BottomNavString + '<a href="http:\/\/www.MySiamThai.com\/awards.html">Awards and Reviews<\/a>';
BottomNavString = BottomNavString + '<br>';
BottomNavString = BottomNavString + '<a href="http:\/\/www.MySiamThai.com\/interview.html">Interview with Mr. Twa<\/a>';
BottomNavString = BottomNavString + '&nbsp; | &nbsp;';
BottomNavString = BottomNavString + '<a href="http:\/\/www.MySiamThai.com\/aboutus.html">About Siam Thai Restaurant<\/a>';
BottomNavString = BottomNavString + '&nbsp; | &nbsp;';
BottomNavString = BottomNavString + '<a href="http:\/\/www.MySiamThai.com\/contactus.html">Contact Siam Thai Restaurant<\/a>';
BottomNavString = BottomNavString + '<\/td>';
BottomNavString = BottomNavString + '<\/tr>';
BottomNavString = BottomNavString + '<\/table>';
document.write(BottomNavString);
}


function SiamThai_Footer() {
var FooterString = '';
var ExtraYear = '&nbsp;';
var d=new Date();
yr=d.getFullYear();
if (yr > 2006) ExtraYear = '-' + yr + '&nbsp;' ;

FooterString = FooterString + '<table width="780" height="40" border="0" align="center" cellpadding="0" cellspacing="0" background="images/index_49.gif">';
FooterString = FooterString + '<font class="copyright">';
FooterString = FooterString + '<tr>';
FooterString = FooterString + '	<td valign="middle" align="left" rowSpan="3" background="images/index_49.gif">&nbsp;&nbsp;Disclaimer:';
FooterString = FooterString + '	&nbsp;&nbsp;Some photos are for illustrations and may not <br>';
FooterString = FooterString + '	&nbsp;&nbsp;represent actual dishes.';
FooterString = FooterString + '	&nbsp;&nbsp;Prices are subject to change.</td>';
FooterString = FooterString + '</tr>';
FooterString = FooterString + '  <tr> ';
FooterString = FooterString + '    <td align="right" valign="middle" background="images/index_49.gif"><strong>Copyright ';
FooterString = FooterString + '      &copy; 2006';
FooterString = FooterString + ExtraYear;
FooterString = FooterString + 'Siam Thai Restaurant. All Rights Reserved. &nbsp;&nbsp;</strong></td>';
FooterString = FooterString + '  </tr>';
FooterString = FooterString + '	<tr>';
FooterString = FooterString + '	      <td align="right" valign="top" background="images/index_49.gif"> ';
FooterString = FooterString + '      Powered by ';
FooterString = FooterString + '	  <a href="http://www.MetroLightHosting.com">Metro Light Web Design and Hosting Company</a> &nbsp;&nbsp;</td>';
FooterString = FooterString + '  </tr>';
FooterString = FooterString + '</font>';
FooterString = FooterString + '</table>';
document.write(FooterString);
}

