// JScript source code
function change_bgcolor(obj){
	obj.style.backgroundColor='#ccff66';
}
function restore_bgcolor(obj){
	obj.style.backgroundColor='#ffffff';
}

function addPageHeader(){
	
	document.writeln("		<table width=\"770\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\" ID=\"Table1\"  bgcolor=\"#FFFFFF\">")
	document.writeln("			<TBODY>")
	document.writeln("				<tr>")
	document.writeln("					<td>")
	document.writeln("						<TABLE id=\"Table2\" cellSpacing=\"2\" cellPadding=\"1\" width=\"100%\" border=\"0\">")
	document.writeln("							<TR>")
	document.writeln("								<TD rowspan=\"2\"><IMG src=\"logo.gif\" align=\"left\"></TD>")
	document.writeln("								<TD>")
	document.writeln("								</TD>")
	document.writeln("								<TD></TD>")
	document.writeln("							</TR>")
	document.writeln("							<TR>")
	document.writeln("								<TD><FONT face=\"新細明體\"></FONT></TD>")
	document.writeln("								<TD align=\"right\">")
	document.writeln("									<table border=\"0\" cellpadding=\"0\" cellspacing=\"2\" ID=\"Table3\">")
	document.writeln("										<tr height=\"26\" align=\"right\">")
	document.writeln("											<td id=\"main1\"><!--首頁-->")
	document.writeln("												<div id=\"Div4\" style=\"BACKGROUND-COLOR: #ffffff\" language=\"javascript\" onmouseover=\"change_bgcolor(this);\"")
	document.writeln("													onmouseout=\"restore_bgcolor(this);\"><img border=\"0\" src=\"icon\\main.gif\" style=\"CURSOR: hand\" onclick=\"changeInfo(\'index.html\',\'main\')\"></div>")
	document.writeln("											</td>")	
	document.writeln("											<td id=\"main2\">")
	document.writeln("												<img border=\"0\" src=\"icon\\div.gif\">")
	document.writeln("											</td>")

	document.writeln("											<td id=\"aboutus1\"><!--關於我們-->")
	document.writeln("												<div id=\"Div4\" style=\"BACKGROUND-COLOR: #ffffff\" language=\"javascript\" onmouseover=\"change_bgcolor(this);\"")
	document.writeln("													onmouseout=\"restore_bgcolor(this);\"><img border=\"0\" src=\"icon\\aboutus.gif\" style=\"CURSOR: hand\" onclick=\"changeInfo(\'aboutus.htm\',\'aboutus\')\"></div>")
	document.writeln("											</td>")	
	document.writeln("											<td id=\"aboutus2\">")
	document.writeln("												<img border=\"0\" src=\"icon\\div.gif\">")
	document.writeln("											</td>")	
	document.writeln("											<td id=\"intro1\"><!--客房介紹-->")
	document.writeln("												<div id=\"imgtitle1\" style=\"BACKGROUND-COLOR: #ffffff\" language=\"javascript\" onmouseover=\"change_bgcolor(this);\"")
	document.writeln("													onmouseout=\"restore_bgcolor(this);\"><img border=\"0\" src=\"icon\\zimmer.gif\" style=\"CURSOR: hand\" onclick=\"changeInfo(\'rooms.htm\',\'intro\')\"></div>")
	document.writeln("											</td>")
	document.writeln("											<td id=\"intro2\">")
	document.writeln("												<img border=\"0\" src=\"icon\\div.gif\">")
	document.writeln("											</td>")
	document.writeln("											<td id=\"special1\"><!--地方名產-->")
	document.writeln("												<div id=\"Div1\" style=\"BACKGROUND-COLOR: #ffffff\" language=\"javascript\" onmouseover=\"change_bgcolor(this);\"")
	document.writeln("													onmouseout=\"restore_bgcolor(this);\"><img border=\"0\" src=\"icon\\famousproduct.gif\" style=\"CURSOR: hand\"></div>")
	document.writeln("											</td>")
	document.writeln("											<td id=\"special2\">")
	document.writeln("												<img border=\"0\" src=\"icon\\div.gif\">")
	document.writeln("											</td>")
	document.writeln("											<td id=\"map1\"><!--位置地圖-->")
	document.writeln("												<div id=\"Div3\" style=\"BACKGROUND-COLOR: #ffffff\" language=\"javascript\" onmouseover=\"change_bgcolor(this);\"")
	document.writeln("													onmouseout=\"restore_bgcolor(this);\"><img border=\"0\" src=\"icon\\karte.gif\" style=\"CURSOR: hand\" onclick=\"changeInfo(\'karte.htm\',\'map\')\"></div>")
	document.writeln("											</td>")
	document.writeln("											<td id=\"map2\">")
	document.writeln("												<img border=\"0\" src=\"icon\\div.gif\">")
	document.writeln("											</td>")
	document.writeln("											<td id=\"tour1\"><!--觀光導覽-->")
	document.writeln("												<div id=\"Div2\" style=\"BACKGROUND-COLOR: #ffffff\" language=\"javascript\" onmouseover=\"change_bgcolor(this);\"")
	document.writeln("													onmouseout=\"restore_bgcolor(this);\"><img border=\"0\" src=\"icon\\introduction.gif\" style=\"CURSOR: hand\" onclick=\"changeInfo(\'tourguide.htm\',\'tour\')\"></div>")
	document.writeln("											</td>")
	document.writeln("											<td id=\"tour2\">")
	document.writeln("												<img border=\"0\" src=\"icon\\div.gif\">")
	document.writeln("											</td>")
	document.writeln("											<td id=\"relat1\"><!--相關網站-->")
	document.writeln("												<div id=\"Div5\" style=\"BACKGROUND-COLOR: #ffffff\" language=\"javascript\" onmouseover=\"change_bgcolor(this);\"")
	document.writeln("													onmouseout=\"restore_bgcolor(this);\"><img border=\"0\" src=\"icon\\relationsite.gif\" style=\"CURSOR: hand\" onclick=\"changeInfo(\'relationSite.htm\',\'relat\')\"></div>")
	document.writeln("											</td>")

	document.writeln("										</tr>")
	document.writeln("									</table>")
	document.writeln("								</TD>")
	document.writeln("							</TR>")
	document.writeln("						</TABLE>")
	document.writeln("					</td>")
	document.writeln("				</tr>")
	document.writeln("			</TBODY>")
	document.writeln("		</table>")
}

function addPageFoot(){
	document.writeln("<pre class=\"AddressInfo\">")
	document.writeln("笨港客棧•負責人：莊宏仁")
	document.writeln("服務專線：05-7832457•傳真：05-7731185")
	document.writeln("地址：651 雲林縣北港鎮仁和路七號")
	document.writeln("</pre>")
}

function addPageFoot2(){
	document.writeln("<pre class=\"AddressInfoWhite\">")
	document.writeln("笨港客棧•負責人：莊宏仁")
	document.writeln("服務專線：05-7832757•傳真：05-7731185")
	document.writeln("地址：651 雲林縣北港鎮仁和路七號")
	document.writeln("</pre>")
	
	//alert(hideTitle);
	var objHide1 = document.getElementById( hideTitle + '1' );
	objHide1.style.display="none";
	var objHide2 = document.getElementById( hideTitle + '2' );
	if (hideTitle == "relat")
	{
		objHide2 = document.getElementById( 'tour2' );	
	}
	if (objHide2 != null)
	{
		objHide2.style.display="none";
	} 
	
}
function navigatorRowHeight()
{
	if ( screen.width == 1024)
	{
		document.write( "<frameset rows=\"10%,*\" border=0>");	
	} else 
	{
		document.write( "<frameset rows=\"15%,*\" border=0>");	
	}
}
function changeInfo(assignPage,objHideName)
{
	location.href=assignPage;
}
function openNewSite(newSite)
{
	window.open(newSite,'_newWindow','left=300,width=800,toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,location=yes,status=yes');
}
function roomImage(imgName)
{
	roomphoto=window.open("","_roomPhoto","innerHeight=400,innerWidth=400");
	roomphoto.document.writeln("<html><head><title>笨港客棧-房間實景</title></head><body>");
	roomphoto.document.writeln("<IMG src=\"photo\\" + imgName + "\">");
	roomphoto.document.writeln("</html>");
}
function zoomInImage(imgName)
{
	inhtml = "<IMG border=0 align=center src=\"photo\\" + imgName + ".jpg\" onclick=\"closeImage();\" style=\"CURSOR: hand\">";
	inhtml += "<br>";
	inhtml += "<div style=\"CURSOR: hand; TEXT-ALIGN: center\" class=\"zoomPhoto\" onclick=\"closeImage();\">縮小</div>";
	document.getElementById('fullImg').innerHTML= inhtml;
}
function closeImage()
{
	document.getElementById('fullImg').innerHTML= "";
}

function popupnewpage(striUrl)
{
	var win = window.open (striUrl,'newPage','top=0,left=300,width=800')
}