function rn(){}
function $(n){return document.getElementById(n)}
function strnum(s,n){var str='';for(var i=0;i<n;i++)str+=s;return str}
function mc(o,n){window.frames[0].location=n?("Products.asp?ClassID="+o+"&ClassName="+n):o;frameset()}
function flash(url,h,w,obj){
	var urls=url.split(",")
	for(var i=0;i<urls.length;i++)$(obj).innerHTML+=('<span><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="'+w+'" height="'+h+'"><param name="movie" value="/images/'+urls[i]+'.swf"><param name="wmode" value="transparent" /><param name="quality" value="high"><embed src="/images/'+urls[i]+'.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'"></embed></object></span>')
}
function SearchCheck(){
	var x=document.forms[0].elements[1].selectedIndex;
	var T=(x==1)?"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-":"0123456789"
	var Str=document.forms[0].elements[0].value.replace(" ","")
	if(Str!=""){
		for(var i=0;i<Str.length;i++)
			if(T.indexOf(Str.toUpperCase().substr(i,1))==-1){
				alert("KeyWord Err");
				return false;
			}else
				window.frames[0].location="Products.asp?SearchKey="+Str+"&SearchC="+x;
	}
	return false;
}
function getCookie(str){
	var tmp,reg=new RegExp("(^| )"+str+"=([^;]*)(;|$)","gi");
	if(tmp=reg.exec(document.cookie))return(tmp[2]);
	return null;
}
function setwebinfo(){
	document.title=webinfo[0]+"-"+webinfo[1];
	document.keywords=webinfo[2];
	document.description=webinfo[3];
	$("copyinfo").innerHTML=webinfo[4];
	$("marquee").innerHTML=webinfo[5];
}
function viewlink(obj){
	var str=''
	for(var i=0;i<Link.length;i++)str+='<a title="'+Link[i][0]+'" href="'+Link[i][1]+'" target="_blank"><img src="'+Link[i][2]+'"></a> '
	$(obj).innerHTML=str
}
function returntime(){
	var today = new Date();
	var day=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
	return ("Today is " + (today.getMonth() + 1 ) + "/" + today.getDate() + "/" +today.getFullYear())+" " + day[today.getDay()];
}
function frameset(){
	document.cookie="iframeurl="+window.frames[0].location
	var h=window.frames[0].document.body.scrollHeight;
	var menuh	= $('vmenu').style.height;
	$("main").height=h
	//$("cc").style.height=h+30+"px";
	//alert($('vmenu').style.height);
}
function iframe(){
	var obj=$("main")
	window.frames[0].location=(getCookie("iframeurl")!=null)?getCookie("iframeurl"):"products.asp"
	if (obj.addEventListener)
		obj.addEventListener("load", frameset, false)
	else if (obj.attachEvent)
		obj.attachEvent("onload", frameset)
	else
		obj.onunload=frameset
}

function setwidth(){
	var div=document.getElementsByTagName("div")
	for(var i=0;i<div.length;i++)if(div[i].parentNode.nodeName=="BODY")div[i].style.width=document.body.clientWidth+'px'
	//var cch	= $('cc').style.height;
	//alert(cch)
}
function menuaction(){
	var obj=$("vmenu").getElementsByTagName("div");
	//var temp=0;
	for(var i=0;i<obj.length;i++)
	if(obj[i].parentNode.id=="vmenu"){
		//if(temp==0)obj[i].style.display="block";
		obj[i].previousSibling.onclick=new Function("hiden("+i+")")
		//temp++;
	}else{
		obj[i].previousSibling.onmouseover=function(){this.nextSibling.style.display="block"}
		obj[i].previousSibling.onmouseout=function(){this.nextSibling.style.display="none"}
		obj[i].onmouseover=function(){this.style.display="block"}
		obj[i].onmouseout=function(){this.style.display="none"}
	}
}

function width(){
	var bodycns	= document.body.childNodes;
	for(var i=0;i<bodycns.length;i++)bodycns[i].style.width='100%';
	
	bodycns	= document.getElementById('main');
	mainwidth	= document.getElementById('cc').clientWidth-436 + 'px';
	bodycns.style.width=mainwidth;
	bodycns.parentNode.style.width=mainwidth;
	
}
function hiden(n){
	var obj=$("vmenu").getElementsByTagName("div");
	for(var i=0;i<obj.length;i++)
	if(obj[i].parentNode.id=="vmenu"){
		obj[i].style.display=(i!=n)?'none':'block'
	}
}