﻿<!--
//弹出窗口
function openWindow(url, name, width, height) {
window.open( url, name, 'toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=no,scrollbars=yes,width='+width+',height='+height+',top=30,left=230');
}

//打开新窗口
function popnew(url,title,width,height){
    var w = 1024;
    var h = 768;

    if (document.all || document.layers){
        w = screen.availWidth;
        h = screen.availHeight;
    }

    var leftPos = (w/2-width/2);
    var topPos = (h/2.3-height/2.3);

    window.open(url,title,"width="+width+",height="+height+",top="+topPos+",left="+leftPos+",scrollbars=no,resizable=no,status=no")
}

var message="";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")


//脚本容错
function stopError() {
return true;
          }
window.onerror = stopError;

function showbg(){
eval("select_list.style.display='';");
}
function showoutbg(){
eval("select_list.style.display='none';");
}

function doZoom(size){
	document.getElementById('zoom').style.fontSize=size+'px'
	}

//TAB切换
function swap_tab(n){
	for(var i=1;i<=2;i++){
		var curC=document.getElementById("tab_"+i);
		var curB=document.getElementById("tab_t"+i);
		if(n==i){
			curC.style.display="block";
			curB.className="active"
		}else{
			curC.style.display="none";
			curB.className="normal"
		}
	}
} 

function setTab(name,cursel,n){
for(i=1;i<=n;i++){
var menu=document.getElementById(name+i);
var con=document.getElementById("con_"+name+"_"+i);
menu.className=i==cursel?"hover":"";
con.style.display=i==cursel?"block":"none";
}
}

function getproname(){
var pronamestr=self.location.search.substr(1).split("?");
if (pronamestr!='')  myform.ProName.value=pronamestr;
}

window.attachEvent("onload", getproname);

function isEmail(str){
  var isEmail = (((((str.indexOf("@") != -1) && (str.indexOf(".") != -1)) && (((str.lastIndexOf("@")-str.lastIndexOf("."))<-1))) && str.indexOf("@")!=0) && (str.length-str.lastIndexOf(".")>1));
  if (isEmail){
	return (true);
  }else{
	return (false);
  }
}


function MailCheck(){
if(mailform.Email.value == "")
		{
			alert("请输入电子邮件地址！");
			mailform.Email.focus();
			return false;
		}
if (isEmail(mailform.Email.value) == false)
		{
			alert("请输入有效的电子邮件地址！");
			mailform.Email.focus();
			return false;
		}
return true;
}

