<!--
function wrap(str,len){
    return str.replace(new RegExp("(.{"+len+"})","igm"),"$1<br/>").replace(/(\w<br\/>)(\w)/igm,'$1<font color=#00ff00>-<\/font>$2');
}
function Click_Img_QH(v){
	for(i=1;i<3;i++){
		if(i==v){
			document.getElementById("Index_TR_"+i).style.display='block';
		}
		else{
			document.getElementById("Index_TR_"+i).style.display='none';
		}
	}
	if(v==1){
		document.getElementById("Index_Left_Img_01").src="images/Now_index_left_01.jpg";
		document.getElementById("Index_Left_Img_02").src="images/index_left_02.jpg";
	}
	else{
		document.getElementById("Index_Left_Img_01").src="images/index_left_01.jpg";
		document.getElementById("Index_Left_Img_02").src="images/Now_index_left_02.jpg";
	}
}
function Click_Img_QH_en(v){
	for(i=1;i<3;i++){
		if(i==v){
			document.getElementById("Index_TR_"+i).style.display='block';
		}
		else{
			document.getElementById("Index_TR_"+i).style.display='none';
		}
	}
	if(v==1){
		document.getElementById("Index_Left_Img_01").src="images/Now_index_left_01_en.jpg";
		document.getElementById("Index_Left_Img_02").src="images/index_left_02_en.jpg";
	}
	else{
		document.getElementById("Index_Left_Img_01").src="images/index_left_01_en.jpg";
		document.getElementById("Index_Left_Img_02").src="images/Now_index_left_02_en.jpg";
	}
}
function Check_ZF(){
	with (document.all.FormCheck_ZF) {
		var radioVal="0"; //判断单选框选中哪个值
		for(i=0;i<r1_zf.length;i++) {   
			if(r1_zf[i].checked) {
				radioVal=r1_zf[i].value;
			}
		}
		if (radioVal=="2") {//支付宝
			action='alipay_01.asp';
		}
		if (radioVal=="3") {//网银
			action='alipay_02.asp';
		}
		if (radioVal=="1") {//支付宝
			action='alipay_03.asp';
		}
		return true;
	}
	return false;
}
function CheckSubmit(val){
	if(val!='0'){
		alert('对不起，只有未审核的信息才能修改，请与管理员联系。');
		return false;
	}
	return true;
}
function SHOW_TR_INFO(id){
	for(i=0;i<9;i++){
		if(i==id){
			document.getElementById("TR_INFO_"+i).style.display='block';
		}
		else{
			document.getElementById("TR_INFO_"+i).style.display='none';
		}
	}
}
function WhoShow(id){
	for(i=1;i<5;i++){
		if(i==id){
			document.getElementById("TAB_MAIN1_1_"+i).style.display='block';
			document.getElementById("IMG_MAIN_1_"+i).src='images/Now_img_main_1_'+i+'.jpg';
		}
		else{
			document.getElementById("TAB_MAIN1_1_"+i).style.display='none';
			document.getElementById("IMG_MAIN_1_"+i).src='images/img_main_1_'+i+'.jpg';
		}
	}
}
function WhoShow_02(id){
	for(i=1;i<5;i++){
		if(i==id){
			document.getElementById("TAB_MAIN1_2_"+i).style.display='block';
			document.getElementById("IMG_MAIN_2_"+i).src='images/Now_img_main_2_'+i+'.jpg';
		}
		else{
			document.getElementById("TAB_MAIN1_2_"+i).style.display='none';
			document.getElementById("IMG_MAIN_2_"+i).src='images/img_main_2_'+i+'.jpg';
		}
	}
}
function WhoShow_03(id){
	for(i=1;i<4;i++){
		if(i==id){
			document.getElementById("TAB_MAIN3_1_"+i).style.display='block';
			document.getElementById("IMG_MAIN_3_"+i).src='images/Now_img_main_3_'+i+'.jpg';
		}
		else{
			document.getElementById("TAB_MAIN3_1_"+i).style.display='none';
			document.getElementById("IMG_MAIN_3_"+i).src='images/img_main_3_'+i+'.jpg';
		}
	}
}
function WhoShow_04(id){
	for(i=1;i<5;i++){
		if(i==id){
			document.getElementById("TAB_INDEX1_1_"+i).style.display='block';
		}
		else{
			document.getElementById("TAB_INDEX1_1_"+i).style.display='none';
		}
	}
}
function WhoShow_04_02(id){
	for(i=1;i<5;i++){
		if(i==id){
			document.getElementById("TAB_INDEX1_2_"+i).style.display='block';
		}
		else{
			document.getElementById("TAB_INDEX1_2_"+i).style.display='none';
		}
	}
}
function WhoShow_04_03(id){
	for(i=1;i<5;i++){
		if(i==id){
			document.getElementById("TAB_INDEX1_3_"+i).style.display='block';
		}
		else{
			document.getElementById("TAB_INDEX1_3_"+i).style.display='none';
		}
	}
}
function WhoShow_04_04(id){
	for(i=1;i<5;i++){
		if(i==id){
			document.getElementById("TAB_INDEX1_4_"+i).style.display='block';
		}
		else{
			document.getElementById("TAB_INDEX1_4_"+i).style.display='none';
		}
	}
}
function WhoShow_04_05(id){
	for(i=1;i<5;i++){
		if(i==id){
			document.getElementById("TAB_INDEX1_5_"+i).style.display='block';
		}
		else{
			document.getElementById("TAB_INDEX1_5_"+i).style.display='none';
		}
	}
}
function WhoShow_04_06(id){
	for(i=1;i<5;i++){
		if(i==id){
			document.getElementById("TAB_INDEX1_6_"+i).style.display='block';
		}
		else{
			document.getElementById("TAB_INDEX1_6_"+i).style.display='none';
		}
	}
}
function WhoShow_04_07(id){
	for(i=1;i<5;i++){
		if(i==id){
			document.getElementById("TAB_INDEX1_7_"+i).style.display='block';
		}
		else{
			document.getElementById("TAB_INDEX1_7_"+i).style.display='none';
		}
	}
}
function WhoShow_04_08(id){
	for(i=1;i<5;i++){
		if(i==id){
			document.getElementById("TAB_INDEX1_8_"+i).style.display='block';
		}
		else{
			document.getElementById("TAB_INDEX1_8_"+i).style.display='none';
		}
	}
}
function WhoShow_04_09(id){
	for(i=1;i<5;i++){
		if(i==id){
			document.getElementById("TAB_INDEX1_9_"+i).style.display='block';
		}
		else{
			document.getElementById("TAB_INDEX1_9_"+i).style.display='none';
		}
	}
}
function OnMouseMoveTR_7_2(tr_one){
	document.getElementById(tr_one.id).style.backgroundColor='#FD897A';
}
function OnMouseOutTR_7_2(tr_one){
	document.getElementById(tr_one.id).style.backgroundColor='#FFFFFF';
}
function jstrim(s) { 
	return s.replace(/(^\s*)|(\s*$)/g,"");
}
function is_email(str) {
	if((str.indexOf("@")==-1)||(str.indexOf(".")==-1))
	{
		return false;
	}
	return true;
}
function CheckFormReg(){
	with(document.FormReg){
		if(jstrim(username.value).length<1){
			alert('请填写您要注册使用的用户名');
			username.focus();
			return false;	
		}
		if(jstrim(password.value).length<1){
			alert('请填写您要注册使用的密码');
			password.focus();
			return false;
		}
		if(jstrim(password2.value).length<1){
			alert('请再次填写您要使用的密码');
			password2.focus();
			return false;
		}
		if(password2.value!=password.value){
			alert('您两次填写的密码不一致，请重新填写');
			password2.select();
			password2.focus();
			return false;
		}
		if(jstrim(names.value).length<1){
			alert('请填写您的尊姓大名');
			names.focus();
			return false;
		}
		if(jstrim(company.value).length<1){
			alert('请填写您的公司名称');
			company.focus();
			return false;
		}
		if(jstrim(email.value).length<1){
			alert('请填写您的电子邮箱');
			email.focus();
			return false;
		}
		if(!is_email(email.value)) {
			alert('您填写的电子邮箱格式不正确，请重新填写');
			email.select();
			email.focus();
			return false;
		}
		/*if(jstrim(t6.value).length<1){
			alert('请填写您的手机号码');
			t6.focus();
			return false;
		}
		if(jstrim(t9.value).length<1){
			alert('请填写您的身份证号码');
			t9.focus();
			return false;
		}*/
		if(jstrim(yzCode.value).length<1){
			alert('请填写验证码');
			yzCode.focus();
			return false;
		}
	}
	return true;
}

function CheckFormLogin(){
	with(document.FormLogin){
		if(jstrim(username.value).length<1){
			alert('请输入用户名');
			username.focus();
			return false;	
		}
		if(jstrim(password.value).length<1){
			alert('请输入密码');
			password.focus();
			return false;	
		}
		if(jstrim(yzCode.value).length<1){
			alert('请输入验证码');
			yzCode.focus();
			return false;	
		}
	}
	return true;
}
function CheckFormLogin_TOP(){
	with(document.FormLogin_TOP){
		if(jstrim(username.value).length<1){
			alert('请输入用户名');
			username.focus();
			return false;	
		}
		if(jstrim(password.value).length<1){
			alert('请输入密码');
			password.focus();
			return false;	
		}
	}
	return true;
}
function CheckFormLogin_02(){
	with(document.FormLogin_02){
		if(jstrim(t1.value).length<1){
			alert('请输入用户名');
			t1.focus();
			return false;	
		}
		if(jstrim(t2.value).length<1){
			alert('请输入密码');
			t2.focus();
			return false;	
		}
	}
	return true;
}
function CheckFormOnlineOrder(){
	with(document.FormOnlineOrder){
		if(jstrim(t1.value).length<1){
			alert('请填写您的姓名');
			t1.focus();
			return false;
		}
		if(jstrim(t3.value).length<1){
			alert('请填写您的联系电话');
			t3.focus();
			return false;
		}
		if(jstrim(t7.value).length<1){
			alert('请填写交货地址');
			t7.focus();
			return false;
		}
		if(jstrim(t8.value).length<1){
			alert('请填写型号规格');
			t8.focus();
			return false;
		}
		if(jstrim(t9.value).length<1){
			alert('请填写订购数量');
			t9.focus();
			return false;
		}
/*		if(jstrim(t2.value).length<1){
			alert('请填写您的电子邮箱');
			t2.focus();
			return false;
		}
		if(!is_email(t2.value)) {
			alert('您填写的电子邮箱不正确，请重新填写。');
			t2.select();
			t2.focus();
			return false;
		}
		if(jstrim(t3.value).length<1){
			alert('请填写您的留言标题');
			t3.focus();
			return false;
		}
		if(jstrim(t4.value).length<1){
			alert('请填写您的留言内容');
			t4.focus();
			return false;
		}
		if(jstrim(yzCode.value).length<1){
			alert('请填写验证码');
			yzCode.focus();
			return false;
		}*/
	}
	return true;
}
function CheckFormMessage(){
	with(document.FormMessage){
		if(jstrim(t1.value).length<1){
			alert('请填写您的尊姓大名');
			t1.focus();
			return false;
		}
		if(jstrim(t2.value).length<1){
			alert('请填写您的电子邮箱');
			t2.focus();
			return false;
		}
		if(!is_email(t2.value)) {
			alert('您填写的电子邮箱不正确，请重新填写。');
			t2.select();
			t2.focus();
			return false;
		}
		if(jstrim(t3.value).length<1){
			alert('请填写您的留言标题');
			t3.focus();
			return false;
		}
		if(jstrim(t4.value).length<1){
			alert('请填写您的留言内容');
			t4.focus();
			return false;
		}
		if(jstrim(yzCode.value).length<1){
			alert('请填写验证码');
			yzCode.focus();
			return false;
		}
	}
	return true;
}
//播放视频
function writeVideo(src,w,h)
{
	var vtype= src.split(".");
	videotype=vtype[1];
	var videcode='';
	switch(videotype)
	{
		case "flv":
	
	videcode+='<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+'">';
	videcode+='<param name="movie" value="vcastr.swf">';
	videcode+='<param name="quality" value="high">';
	videcode+='<param name="allowFullScreen" value="true" />';
	videcode+='<param name="FlashVars" value="vcastr_file='+src+'&LogoUrl=&LogoText=" />';
	videcode+='<embed src="vcastr.swf" allowFullScreen="true" FlashVars="vcastr_file='+src+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+w+'" ></embed>';
	videcode+='</object>';
		break;
	}
	document.writeln(videcode);
}
function OnClickHidden(){
	document.getElementById("Id_Param").style.display='none';
	document.getElementById("ID_TR_01").style.display='none';
	document.getElementById("ID_TR_02").style.display='block';
}
function OnClickShow(){
	document.getElementById("Id_Param").style.display='block';
	document.getElementById("ID_TR_01").style.display='block';
	document.getElementById("ID_TR_02").style.display='none';
}
function CheckFormForgotFirst(){
	if(jstrim(document.FormForgotFirst.t1.value).length<1){
		alert('请填写您注册时使用的用户名');
		document.FormForgotFirst.t1.focus();
		return false;	
	}
}
function CheckFormForgotSecond(){
	with(document.FormForgotSecond){
		if(jstrim(t1.value).length<1){
			alert('请填写您注册时使用的手机号码');
			t1.focus();
			return false;
		}
		if(jstrim(t2.value).length<1){
			alert('请填写您注册时使用的电子邮箱');
			t2.focus();
			return false;
		}
	}
}
function CheckFormForgotThird(){
	with(document.FormForgotThird){
		if(jstrim(t1.value).length<1){
			alert('请填写您将使用的新密码');
			t1.focus();
			return false;
		}
		if(jstrim(t2.value).length<1){
			alert('请再次填写您将使用的新密码');
			t2.focus();
			return false;
		}
		if(t2.value!=t1.value){
			alert('您两次填写的新密码不一致，请重新填写');
			t2.select();
			t2.focus();
			return false;
		}
	}
}
//-->
