// JavaScript Document

var now_sid=1;

document.write("<div style=\"position:absolute;\">");
document.write("<table width=\"980\" height=\"376\" border=\"0\" cellspacing=\"8\" cellpadding=\"0\" background=\"images/banner_bg.gif\"><tr><td width=\"690\" align=\"left\" valign=\"top\">");
document.write("<div style=\"width:690px;height:360px;position:absolute;overflow:hidden;\">");
for(i=0;i<4;i++) {
	document.write("<div id=\"banner_"+(i+1)+"\" style=\"width:690px;z-index:10;position:absolute;\"><a href=\""+LinkURL[i]+"\" target=\"_blank\"><img src=\""+PicURL[i]+"\" width=\"690\" height=\"360\" /></a></div>");
}
document.write("</div>");
//document.write("<div id=\"banner_k\" style=\"width:265px;height:68px;position:absolute;z-index:12;\"><img src=\"banner_k.png\" width=\"265\" height=\"68\" /></div>");
document.write("</td><td align=\"left\" background=\"images/banner_right.gif\"><div id=\"banner_k\" style=\"width:265px;height:68px;position:absolute;z-index:12;margin-left:4px;*margin-left:-12px;\"><img src=\"images/banner_k.png\" width=\"265\" height=\"68\" /></div><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"margin-left:16px;\">");          
for(i=0;i<4;i++) {
	document.write("<tr><td align=\"center\" height=\"60\"><img src=\""+sPic[i]+"\" width=\"241\" height=\"52\" onclick=\"huan_div("+(i+1)+");\" style=\"cursor:pointer;\" /></td></tr>");
}
document.write("<tr><td align=\"center\" height=\"60\"><a href=\"contact-default.html\" onmouseout=\"MM_swapImgRestore()\" onmouseover=\"MM_swapImage('Image2','','images/b_contact1.gif',1)\"><img src=\"images/b_contact.gif\" name=\"Image2\" width=\"241\" height=\"52\" border=\"0\" id=\"Image2\" /></a></td></tr><tr><td align=\"center\" height=\"60\"><a href=\"aboutus-default.html\" onmouseout=\"MM_swapImgRestore()\" onmouseover=\"MM_swapImage('Image1','','images/b_about1.gif',1)\"><img src=\"images/b_about.gif\" name=\"Image1\" width=\"241\" height=\"52\" border=\"0\" id=\"Image1\" /></a></td></tr></table></td></tr></table></div>");
document.getElementById("banner_1").style.marginTop="0px";
document.getElementById("banner_2").style.marginTop="-360px";
document.getElementById("banner_3").style.marginTop="-360px";
document.getElementById("banner_4").style.marginTop="-360px";
document.getElementById("banner_1").style.zIndex=11;

document.getElementById("banner_k").style.marginTop="-4px";

MM_preloadImages('images/b_about1.gif','images/b_contact1.gif');


function huan_div(sid){
	z=document.getElementById("banner_"+sid).style.zIndex;
	document.getElementById("banner_"+sid).style.zIndex=document.getElementById("banner_"+now_sid).style.zIndex;
	document.getElementById("banner_"+now_sid).style.zIndex=z;
	if((now_sid!=sid)&&(parseInt(document.getElementById("banner_"+now_sid).style.marginTop))%360==0){
		document.getElementById("banner_k").style.marginTop=((sid-1)*60-4)+"px";
		show_banner(sid);
	}
}

function show_banner(sid) {

	if(parseInt(document.getElementById("banner_"+sid).style.marginTop)!=0) { 
		document.getElementById("banner_"+sid).style.marginTop=(parseInt(document.getElementById("banner_"+sid).style.marginTop)+18)+"px";
		banner_timer=setTimeout("show_banner(\"" + sid +"\")", 1);
	}
	else
	{
		clearTimeout(banner_timer);
		document.getElementById("banner_"+now_sid).style.marginTop="-360px";
		now_sid=sid;
	}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
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 MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
