//$(document).ready(function(){
//	var oldKey = new Array();
//	for(var i=1; i<8; i++)
//	{
//		oldKey[i]=$("#nav_"+i).html();
//		$("#nav_"+i).mousemove(function () {
//			if(this.className!="current_nav_red")
//			{
//				var arr = this.id.split('_');
//				this.innerHTML="<img src=\"images/nav_bg04.png\" class=\"float\"/><p>"+oldKey[arr[1]]+"</p><img src=\"images/nav_bg03.png\" class=\"float\"/>";
//				this.className="current_nav_blue";
//			}
//		});
//		$("#nav_"+i).mouseout(function () {
//			var arr = this.id.split('_');
//			if(this.className!="current_nav_red")
//			{
//				this.innerHTML=oldKey[arr[1]];
//				this.className="";
//			}
//		});
//	}
//})

//$(document).ready(function(){
//	var oldKey = new Array();
//	for(var i=1; i<8; i++)
//	{
//		oldKey[i]=$("#nav_"+i).html();
//		$("#nav_"+i).bind("mousemove",function () {
//			if(this.className!="current_nav_red")
//			{
//				var arr = this.id.split('_');
//				this.innerHTML="<img src=\"images/nav_bg04.png\" class=\"float\"/><p>"+oldKey[arr[1]]+"</p><img src=\"images/nav_bg03.png\" class=\"float\"/>";
//				this.className="current_nav_blue";
//			}
//		});
//		$("#nav_"+i).bind("mouseleave",function () {
//			var arr = this.id.split('_');
//			if(this.className!="current_nav_red")
//			{
//				this.innerHTML=oldKey[arr[1]];
//				this.className="";
//			}
//		});
//	}
//})
//
//
//

function subForm1()
{
	if(document.getElementById("t2").value=="")
	{
		alert("Please input the Name！");
		document.getElementById("t2").focus();
		return false;
	}
	if(document.getElementById("t4").value=="")
	{
		alert("Please input the Company Name！");
		document.getElementById("t4").focus();
		return false;
	}
	if(document.getElementById("t1").value=="")
	{
		alert("Please input the Email！");
		document.getElementById("t1").focus();
		return false;
	}else{
		if(!(isEmail(document.getElementById("t1").value )))
		{
			alert("Please enter your correct Email!");
			document.getElementById("t1").focus();
			return false;
		}
	}
	if(document.getElementById("t7").value=="")
	{
		alert("Please input the Phone！");
		document.getElementById("t7").focus();
		return false;
	}
	
	if(document.getElementById("t3").value=="")
	{
		alert("Please input the Messege！");
		document.getElementById("t3").focus();
		return false;
	}

	document.getElementById("form_Message").action="http://www.1000v.cn/mail/utf-8_en.asp";
	var str="";
	str +="Name："+document.getElementById("t2").value+"<br>";
	str +="Company："+document.getElementById("t4").value+"<br>";
	str +="Address："+document.getElementById("t5").value+"<br>";
	str +="City, State, Zip："+document.getElementById("t6").value+"<br>";
	str +="Email："+document.getElementById("t1").value+"<br>";
	str +="Phone："+document.getElementById("t7").value+"<br>";
	str +="Fax："+document.getElementById("t8").value+"<br>";
	str +="Subject："+document.getElementById("t9").value+"<br>";
	str +="Message："+document.getElementById("t3").value+"<br>";
	str +="该邮件系纤维网络转发，请勿直接回复<br>";
	document.getElementById("tHtml").value=str;	
	return true;
}

function isEmail(vEMail)
{
	var regInvalid=/(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/;
	var regValid=/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/;
	return (!regInvalid.test(vEMail)&&regValid.test(vEMail));
}

function showMenu(l,n,Txt)
{
	for(var i=1;i<=n;i++)
	{
		if(i==l)
		{
			document.getElementById("li_span"+i).innerHTML=Txt;
			document.getElementById("menu_li_"+i).className="current_nav";
			document.getElementById("submenu_"+i).style.display="";
		}else{			
			var t = document.getElementById("li_span"+i).innerHTML;
			t=DelHtml(t);
			document.getElementById("menu_li_"+i).className="";
			
			document.getElementById("li_span"+i).innerHTML="<a href=\"###\" onmouseover=\"showMenu("+i+","+n+",'"+t+"')\">"+t+"</a>";
			document.getElementById("submenu_"+i).style.display="none";
		}
	}
}
//去除html标签
function DelHtml(Word){
	a = Word.indexOf("<");
	b = Word.indexOf(">");
	len = Word.length;
	c = Word.substring(0, a);
	if(b == -1)
		b = a;
	d = Word.substring((b + 1), len);
	Word = c + d;
	tagCheck = Word.indexOf("<");
	if(tagCheck != -1)
	Word = DelHtml(Word);
	return Word;
} 
function showDetails(l,n)
{
	for(var i=1; i<=n;i++)
	{
		if(i==l)
		{
			if(document.getElementById("details_"+l).style.display=="")
			{
				document.getElementById("details_"+l).style.display="none";
			}else{
				document.getElementById("details_"+l).style.display="";
			}
		}else{
			document.getElementById("details_"+i).style.display="none";
		}
	}
}

function F_flash(flashURL,flashWIDTH,flashHEIGHT)
{
document.writeln ('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase=" http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" WIDTH='+flashWIDTH+' HEIGHT='+flashHEIGHT+'>'); 
document.writeln ('<PARAM NAME=movie VALUE="'+flashURL+'">'); 
document.writeln ('<PARAM NAME=wmode VALUE=transparent>'); 
document.writeln ('<PARAM NAME=loop VALUE=true>'); 
document.writeln ('<PARAM NAME=quality VALUE=high>'); 
document.writeln ('<EMBED src="'+flashURL+'" loop=true wmode=opaque quality=high swLiveConnect=FALSE WIDTH='+flashWIDTH+' HEIGHT='+flashHEIGHT+' TYPE="application/x-shockwave-flash" PLUGINSPAGE=" http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>'); 
document.writeln ('</OBJECT>'); 
}


