year_now=2008;

function menu(subLevel) {
	//subLevel is the folder level,root is 0,next is 1,and so on
	var pathHome='';
    var pathLink='';

    if(subLevel<1) {
		pathLink='en/';
		pathHome='';
		}
	else {
		pathLink='';
		pathHome='../';
	}

	for(i=1;i<subLevel;i++) {
       pathLink='../'+pathLink;
       pathHome='../'+pathHome;
	}

document.writeln(" <TR HEIGHT=38>");
document.writeln(" <TD WIDTH=100%>");
document.writeln("  <table width=780><tr><td ALIGN=RIGHT><A HREF=",pathHome,"china/index.html>ÖÐÎÄ°æ</a></td></table>");
document.writeln(" </TD>");
document.writeln(" </TR>");
document.writeln(" <TR>");
document.writeln("  <TD WIDTH=100%>");
document.writeln("   <table>");
document.writeln("   <tr height=38>");
document.writeln("   <td width=18> </td>");
document.writeln("   <td width=200><img src=",pathHome,"images/orivend-logo.gif width=148 height=38 alt='orivend logo'></td>");
document.writeln("   <td width=80 valign=bottom><a Class=Amenu href=",pathLink,"about.html>About us</a></td>");
document.writeln("   <td width=80 valign=bottom><a Class=Amenu href=",pathLink,"products.html>Products</a></td>");
document.writeln("   <td width=100 valign=bottom><a Class=Amenu href=",pathLink,"newpro.html>New products</a></td>");
document.writeln("   <td width=100 valign=bottom><a Class=Amenu href=",pathLink,"factory.html>Factory tour</a></td>");
document.writeln("   <td width=80 valign=bottom><a Class=Amenu href=",pathLink,"contact.html>Contact us</a></td>");
if(subLevel>0) {
document.writeln("   <td width=85 valign=bottom><a Class=Amenu href=",pathHome,"index.html>Home</a></td>");
}
document.writeln("   <td > </td>");
document.writeln("   </tr>");
document.writeln("   </table>");
document.writeln("  </TD>");
document.writeln(" </TR>");
}


function copyright_reg() {
document.writeln("<table width=100% style=\"background-color: #cfe6f9\">");
document.writeln("<tr height=30>");
document.writeln("<td width=50%></td>");
document.writeln("<td width=35%><a class=Areg>Copyright &copy; 2003-",year_now,"</a></td>");
document.writeln("<td><A class=Areg href=HTTP://www.miibeian.gov.cn TARGET=_BLANK>ÔÁICP±¸07001854ºÅ</A></td>");
document.writeln("</tr>");
document.writeln("</table>");
}

function copyright() {
document.writeln("<table width=100% style=\"background-color: #cfe6f9\">");
document.writeln("<tr height=30>");
document.writeln("<td width=50%></td>");
document.writeln("<td width=50%><a>Copyright &copy; 2003-",year_now,"</a></td>");
document.writeln("</tr>");
document.writeln("</table>");
}

function windowOpen(url,winname,width,height) {
 winString= "width="+width+",height="+height+",scrollbars=1,status=0,top=20,left=100";
 popupwin = window.open(url, winname , winString);
 popupwin.focus();
}

function printit(){ 
 window.print();
}   

function winOpener_fresh(url) {
 var winOpener=window.opener;
 winOpener.document.location.href=url;
 winOpener.focus();
}

 function setFlash(flashFile,flashWidth,flashHeight){   
	  //flashFile=path+file name(without ext '.swf';
    var flashUrl=flashFile+".swf" 

    document.write("    <object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='",flashWidth,"' height='",flashHeight,"'>")
    document.write("     <param name=movie ")
    document.write("value='",flashUrl,"'>")
    document.write("     <param name=quality value=high>")
    document.write("     <embed src='",flashUrl,"'")
    document.write("     quality=high pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='",flashWidth,"' height='",flashHeight,"'>")
    document.write("     </embed> ")
    document.write("     </object>")
   }


function setScrWidthFlash(flashFile,flashHeight){   
	  //flashFile=path+file name(without ext '.swf';
    var scrW=window.screen.availWidth;
	var flashUrl=flashFile;
	if(scrW<=1024) { flashUrl=flashFile+"1024" }
    else if(scrW>=1600) { flashUrl=flashFile+"1600" }
    else { flashUrl=flashFile+"1280" }

    setFlash(flashUrl,scrW,flashHeight)
   }

function setScrWidthBg(bgPath,bgFile,bgHeight,vAlign){   
    var scrW=window.screen.availWidth;
	if(scrW<=1024) { bgUrl=bgPath+"images/bgpic/"
		bgUrl=bgUrl+bgFile+'1024'+".jpg";
	}
    else if(scrW>=1600) { bgUrl=bgPath+"images/bgpic/"
	bgUrl=bgUrl+bgFile+'1600'+".jpg";
	}
    else { bgUrl=bgPath+"images/bgpic/"
		bgUrl=bgUrl+bgFile+'1280'+".jpg";
	}

    document.write("  <TD WIDTH=100% background='",bgUrl,"', height='",bgHeight,"' valign='",vAlign,"'>")
   }