﻿<!--
//弹出窗口
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")
}

//脚本容错
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 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";
}
}
//TAB切换1
function swap_tab(n){
	for(var i=1;i<=3;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"
		}
	}
} 
//TAB切换2
function swap_tab2(n){
	for(var i=1;i<=3;i++){
		var curC=document.getElementById("tab2_"+i);
		var curB=document.getElementById("tab2_t"+i);
		if(n==i){
			curC.style.display="block";
			curB.className="active"
		}else{
			curC.style.display="none";
			curB.className="normal"
		}
	}
} 

//TAB切换3
function swap_tab3(n){
	for(var i=1;i<=3;i++){
		var curC=document.getElementById("tab3_"+i);
		var curB=document.getElementById("tab3_t"+i);
		if(n==i){
			curC.style.display="block";
			curB.className="active"
		}else{
			curC.style.display="none";
			curB.className="normal"
		}
	}
} 

//TAB切换4
function swap_tab4(n){
	for(var i=1;i<=3;i++){
		var curC=document.getElementById("tab4_"+i);
		var curB=document.getElementById("tab4_t"+i);
		if(n==i){
			curC.style.display="block";
			curB.className="active"
		}else{
			curC.style.display="none";
			curB.className="normal"
		}
	}
}

//TAB切换5
function swap_tab5(n){
	for(var i=1;i<=3;i++){
		var curC=document.getElementById("tab5_"+i);
		var curB=document.getElementById("tab5_t"+i);
		if(n==i){
			curC.style.display="block";
			curB.className="active"
		}else{
			curC.style.display="none";
			curB.className="normal"
		}
	}
}

//TAB切换6
function swap_tab6(n){
	for(var i=1;i<=3;i++){
		var curC=document.getElementById("tab6_"+i);
		var curB=document.getElementById("tab6_t"+i);
		if(n==i){
			curC.style.display="block";
			curB.className="active"
		}else{
			curC.style.display="none";
			curB.className="normal"
		}
	}
}

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;
}

 function reHeight(o){
  	 if (o.inFocus) {o.style.height = "80px";}
 }

 function focusMe(o){
 	 o.inFocus=true;
 	 o.style.border="1px solid #999";
 	 o.style.backgroundColor="transparent";
 	 o.style.cursor="text";
 	 o.style.overflowY="scroll";
	 reHeight(o);
 }
 
 function blurMe(o){
 	 o.inFocus=false;
	 o.style.border="1px #999 solid"
 	 o.style.padding="1px";
 	 o.style.backgroundColor="transparent";
 	 o.style.cursor="pointer";
 	 o.style.overflowY="hidden";
 	 o.style.height="30px";
 }
 function overMe(o){
 	 if (!o.inFocus) {
 	 	 o.style.border="1px solid #666";
 	 	 o.style.padding="1px";
 	 	 o.style.backgroundColor="transparent";
 	 }
 }
 
 function outMe(o){
 	 if (!o.inFocus) {
	 	 o.style.border="1px #999 solid"
 	 	 o.style.padding="1px";
 	 	 o.style.backgroundColor="transparent";
  	 }
 }

function jsQueryString(queryStringName){
var returnValue=""; 
var URLString=new String(document.location); 
var serachLocation=-1; 
var queryStringLength=queryStringName.length; 
do { serachLocation=URLString.indexOf(queryStringName+"\="); 
if (serachLocation!=-1) {
if ((URLString.charAt(serachLocation-1)=='?') || (URLString.charAt(serachLocation-1)=='&')) {
    URLString=URLString.substr(serachLocation);
    break; 
} URLString=URLString.substr(serachLocation+queryStringLength+1); 
}  
} while (serachLocation!=-1) if (serachLocation!=-1) { 
var seperatorLocation=URLString.indexOf("&"); 
if (seperatorLocation==-1) { 
   returnValue=URLString.substr(queryStringLength+1); 
} else { 
   returnValue=URLString.substring(queryStringLength+1,seperatorLocation); 
}  
  } 
return returnValue;
}

function addEvent(elm, evType, fn, useCapture)
   {
  if (elm.addEventListener)
  {
   elm.addEventListener(evType, fn, useCapture);
   return true;
  }
  else if (elm.attachEvent)
  {
   var r = elm.attachEvent('on' + evType, fn);
   return r;
  }
  else
  {
   elm['on' + evType] = fn;
  }
   }
