// JavaScript Document
/*///////////////////////////////////////////////////////////////////////////*/

/*Get Name*/
function getURLParam(strParamName){
var strReturn = "";
var strHref = window.location.href;
if ( strHref.indexOf("?") > -1 ){
var strQueryString = strHref.substr(strHref.indexOf("?")).toLowerCase();
var aQueryString = strQueryString.split("&");
for ( var iParam = 0; iParam < aQueryString.length; iParam++ ){
if (aQueryString[iParam].indexOf(strParamName + "=") > -1 ){
var aParam = aQueryString[iParam].split("=");
strReturn = aParam[1];
break;}}}return strReturn;
}

function getURL() {
	var file_name = document.location.href;
	var end = (file_name.indexOf("?") == -1) ? file_name.length : file_name.indexOf("?");
	return file_name.substring(file_name.lastIndexOf("/")+1, file_name.lastIndexOf("."));
}

function getName() {
		var file_name = document.location.href;
		var end = (file_name.indexOf("?") == -1) ? file_name.length : file_name.indexOf("?");
	if (file_name.indexOf("_")<=0){
		return "index"				  
	}else{
		return file_name.substring(file_name.lastIndexOf("/")+1, file_name.indexOf("_"));
	}
}

function getLan() {
	var file_name = document.location.href;
    var end = (file_name.indexOf("?") == -1) ? file_name.length : file_name.indexOf("?");
	return file_name.substring(file_name.lastIndexOf(".html")+0, file_name.indexOf("_")+1);
}

/*///////////////////////////////////////////////////////////////////////////*/
var file_name=getName() ;
function header(lang,page) {
document.write("<table width=100% border=0 cellpadding='0' cellspacing='0'>");
document.write("<tr>");
document.write("  <td height=40 align='center' bgcolor='#000000'>");
document.write("<table width='995' border='0'><tr>");
document.write("<td align='left'>");
page_link_en="_en"
menu_en=""
if(page=="index"){page_link_en=""}
if (lang=="en"){
	menu_index_lang=""
document.write("<a href="+page+"_big5.html>");
document.write("<img src='images/lang_big5.gif' alt='' width='46' height='37' border=0 /></a>");
document.write("<a href="+page+page_link_en+".html>");
document.write("<img src='images/lang_en_over.gif' alt='' width='45' height='37' border=0 /></a>");
}
if (lang=="big5"){
	menu_index_lang="_big5"
document.write("<a href="+page+"_big5.html>");
document.write("<img src='images/lang_big5_over.gif' alt='' width='46' height='37' border=0 /></a>");
document.write("<a href="+page+page_link_en+".html>");
document.write("<img src='images/lang_en.gif' alt='' width='45' height='37' border=0 /></a>");
}
document.write("</td>");
document.write("<td align='right'>");
  document.write("<a href='index"+menu_index_lang+".html'><img src='images/about_"+lang+".gif' name='about' border=0/></a>");
document.about.onmouseover=about_over
document.about.onmouseout=about_out
function about_out(){ document.about.src="images/about_"+lang+".gif"}
function about_over(){ document.about.src="images/about_"+lang+"_over.gif"}

  document.write("<a href='product_"+lang+".html'><img src='images/product_"+lang+".gif' name='product' border=0/></a>");
document.product.onmouseover=product_over
document.product.onmouseout=product_out
function product_out(){ document.product.src="images/product_"+lang+".gif"}
function product_over(){ document.product.src="images/product_"+lang+"_over.gif"}

  document.write("<a href='retailer_"+lang+".html'><img src='images/retailer_"+lang+".gif' name='retailer' border=0/></a>");
document.retailer.onmouseover=retailer_over
document.retailer.onmouseout=retailer_out
function retailer_out(){ document.retailer.src="images/retailer_"+lang+".gif"}
function retailer_over(){ document.retailer.src="images/retailer_"+lang+"_over.gif"}

  document.write("<a href='contact_"+lang+".html'><img src='images/contact_"+lang+".gif' name='contact' border=0/></a>");
document.contact.onmouseover=contact_over
document.contact.onmouseout=contact_out
function contact_out(){ document.contact.src="images/contact_"+lang+".gif"}
function contact_over(){ document.contact.src="images/contact_"+lang+"_over.gif"}

document.write("</tr></table>");
document.write("</td></tr>");
document.write("<tr>");
document.write("  <td style='background:url(images/background.jpg) top center #000 no-repeat' align='center' valign='top'>");
document.write("        <table width='987' border='0'><tr>");
document.write("        <td width='188' align='center' valign=top>");
document.write("        <br />");
document.write("        <img src='images/img_1.gif' /><br />");
document.write("        <img src='images/img_2.gif' /><br />");
document.write("        <img src='images/img_3.gif' /><br />");
document.write("        <img src='images/img_4.gif' /><br />");
document.write("        <br /><a href=http://www.loutinapets.com><img src='images/tripett.gif' width='137' height='136' border=0 /><br />");
document.write("        <br />        <img src='images/petkind.gif' width='165' height='42' border=0 /><br />");
document.write("        <br />        <img src='images/loutina.gif' width='173' height='32' border=0 /><br /></a>");
document.write("        <br /></td>");
document.write("        <td width='789' align='center' valign='top'><br />");

document.write("        	<div style='width:750px' align='left'>");
}



function footer(){
document.write("            </div>");
document.write("        </td>");
document.write("        </tr>");
document.write("        </table>");
document.write("  </td>");
document.write("</tr>");
document.write("<tr><td height=40 align='center' bgcolor='#000000'>Copyright © Loutina Pets Co., Ltd.  All rights reserved.    Powered by <a href='http://www.communilink.net' target='_blank' style='color:#FFF'>CommuniLink.Net</a></td></tr>");
document.write("</table>");
}
