function code()  //Set lang
	{
	document.write('<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />');
	}

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];
			}
	}

function dispflash(flashname,flashwidth,flashheight,flashtransparent)  //show Flash
	{
	document.writeln('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="' + flashwidth + '" height="' + flashheight + '">');
	document.writeln('   <param name="movie" value="'+ flashname + '" />');
	document.writeln('   <param name="quality" value="high" />');
	if(flashtransparent==1)
		document.writeln('   <param name="wmode" value="transparent" />');
	document.writeln('   <embed src="'+ flashname +'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + flashwidth + '" height="' + flashheight + '"></embed>');
	document.writeln('</object>');
	}


function dispcode(codetype,codelen,codenum)  //show code(type,len,number) note:number<64
	{
	document.write("<img src=\"inc/verify.php?type="+codetype+"&amp;len="+codelen+"&amp;num="+codenum+"\" border=\"0\" alt=\"click updata code\" style=\"cursor:pointer;\" onClick=\"this.src='inc/verify.php?type="+codetype+"&amp;len="+codelen+"&amp;num="+codenum+"'\" />");
	}
	
function initArray()  //time array
	{
	this.length=initArray.arguments.length;
	for(var i=0;i<this.length;i++)
		this[i+1]=initArray.arguments[i];
	}

function showday()  //show date
	{
	today=new Date();
	var d=new initArray("SUN","MON","TUE","WED","THU","FRI","SAT");
	document.write ("",today.getYear(),"-",today.getMonth()+1,"-",today.getDate(),"&nbsp;",d[today.getDay()+1],"" );
	}

function dispcount()  //count
	{
	document.write("<script src='http://s40.cnzz.com/stat.php?id=141493&web_id=141493&show=pic1' language='JavaScript' charset='gb2312'></script>");
	}

function showonline()  //online server
	{
	document.write("<div class=\"index_online1\" align=\"center\">");
	document.write("Alibaba:");
	document.write("<a target=\"_blank\" href=\"http://scs1.sh1.china.alibaba.com/msg.atc?v=1&uid=pigute\"><img border=0 src=\"http://scs1.sh1.china.alibaba.com/online.atc?v=1&uid=pigute&s=101\" alt=\"Call Me\" align=\"absmiddle\"></a><br />");
	document.write("Yahoo:");
	document.write("<a href=\"http://cn.pingme.messenger.yahoo.com/webchat/ajax_webchat.php?yid=pigutecn&amp;sig=d6715871e33dce2d6f4dbaa0bc72e223cc288b72\" target=\"blank\"><img alt=\"Call Me\" src=\"http://opi.yahoo.com/online?u=pigutecn&amp;t=1&amp;l=cn\" border=\"0\"></a><br />");
	document.write("QQ:");
	document.write("<a target=\"blank\" href=\"http://wpa.qq.com/msgrd?V=1&Uin=455855366&Site=www.pigute.com&Menu=yes\"><img border=\"0\" SRC=\"http://wpa.qq.com/pa?p=1:455855366:5\" alt=\"Call Me\"></a><br />");
	document.write("MSN:");
	document.write("<span style=\"cursor:hand\"  onclick=\"javascript:window.open('http://www.365groups.com/ChatWin.aspx?chatIDs=mw7N6mXm0mNb0mmz3AiYdviKjH6mmbP&ServiceTag=0','mw7N6mXm0mNb0mmz3AiYdviKjH6mmbP0','width=560,height=490, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no,center=yes')\" ><img border=\"0\"  alt=\"Call Me\" src=\"http://www.365groups.com/msn_status.aspx?chatIDs=mw7N6mXm0mNb0mmz3AiYdviKjH6mmbP&style=3\"/></span><br />");
	document.write("Tel:(86)20-83291392<br />");
	document.write("FAX:(86)20-22895535<br />");
	document.write("Other Product:<br /><a href=\"http://www.gz-jiali.com\" titile=\"JiaLi\" target=\"blank\">www.gz-jiali.com</a><br />");
	document.write("</div>");
	}

function chkbook() //check book
	{
	if (document.book.bookcode.value=="")
		alert("Please input code!");
	else if (document.book.username.value=="")
			alert("Please input name!");
		else if (document.book.coname.value=="")
				alert("Please input company!");
			else if (document.book.cotel.value=="")
					alert("Please input tel!");
				else if (document.book.cotitle.value=="")
						alert("Please input titel!");
					else if (document.book.conr.value=="")
							alert("Please input Content!");
						else
							{
							document.book.bookpost.value="Ok";
							return true;
							}
	return false;
	}

function chklogin()  //login check
	{
	if (document.userlogin.username.value=="")
		alert("用户名不能为空！");
	else if (document.userlogin.userpass.value=="")
			alert("密码不能为空！");
		else if (document.userlogin.code.value=="")
				alert("校验码不能为空！");
			else
				document.userlogin.submit();
	return false;
	}

function DrawImage(ImgD)  //auto img size
	{
	var image=new Image(); 
	image.src=ImgD.src; 
	if(image.width>0 && image.height>0){ 
		flag=true; 
		if(image.width>=500){ 
			ImgD.width=500; 
			ImgD.height=(image.height*500)/image.width; 
		}else{ 
			ImgD.width=image.width; 
			ImgD.height=image.height; 
		}
	}
	}