/// 新闻中心、外包政策滑动门
function scrollDoor(){
}
scrollDoor.prototype = {
sd : function(menus,divs,openClass,closeClass){
 var _this = this;
 if(menus.length != divs.length)
 {
 alert("菜单层数量和内容层数量不一样!");
 return false;
 } 
 for(var i = 0 ; i < menus.length ; i++)
 { 
 _this.$(menus[i]).value = i; 
 _this.$(menus[i]).onmouseover = function(){
 
 for(var j = 0 ; j < menus.length ; j++)
 { 
 _this.$(menus[j]).className = closeClass;
 _this.$(divs[j]).style.display = "none";
 }
 _this.$(menus[this.value]).className = openClass; 
 _this.$(divs[this.value]).style.display = "block"; 
 }
 }
 },
$ : function(oid){
 if(typeof(oid) == "string")
 return document.getElementById(oid);
 return oid;
}
}

function scrollDoor2(){
}
scrollDoor2.prototype = {
sd : function(menus,openClass,closeClass){
 var _this = this;
// if(menus.length != divs.length)
 //{
// alert("菜单层数量和内容层数量不一样!");
// return false;
 //} 
 for(var i = 0 ; i < menus.length ; i++)
 { 
 _this.$(menus[i]).value = i; 
 _this.$(menus[i]).onmouseover = function(){
 
 for(var j = 0 ; j < menus.length ; j++)
 { 
 _this.$(menus[j]).className = closeClass;
 //_this.$(divs[j]).style.display = "none";
 }
 _this.$(menus[this.value]).className = openClass; 
 //_this.$(divs[this.value]).style.display = "block"; 
 }
 }
 },
$ : function(oid){
 if(typeof(oid) == "string")
 return document.getElementById(oid);
 return oid;
}
}


function denglu() {
	var rmbUser = document.getElementById("rmbUser").checked;
	var user_id = document.getElementById("user_id").value;
	if (rmbUser != null && rmbUser) {
		writeCookie("loginUserName", user_id);
	} else {
		writeCookie("loginUserName", "");
	}
	document.form.submit();
}


function initUser() {
	var user_id = readCookie("loginUserName");
	if (user_id != null && user_id != "") {
		document.getElementById("user_id").value = user_id;
		document.getElementById("rmbUser").checked = "checked";
	}
}

function sousuo1() {
	document.form1.submit();
}
function sousuo2() {
	document.form2.submit();
}

function writeCookie(name, value) {
	var expire = "";
	expire = new Date((new Date()).getTime() + 365 * 24 * 3600000);
	expire = "; expires=" + expire.toGMTString();
	document.cookie = name + "=" + escape(value) + expire;
}

function readCookie(name) {
	var cookieValue = "";
	var search = name + "=";
	if (document.cookie.length > 0) {
		offset = document.cookie.indexOf(search);
		if (offset != -1) {
			offset += search.length;
			end = document.cookie.indexOf(";", offset);
			if (end == -1) {
				end = document.cookie.length;
			}
			cookieValue = unescape(document.cookie.substring(offset, end))
		}
	}
	return cookieValue;
}

function delCookie(name) {// 为了删除指定名称的cookie，可以将其过期时间设定为一个过去的时间
	var date = new Date();
	date.setTime(date.getTime() - 10000);
	document.cookie = name + "=a; expires=" + date.toGMTString();
}


//Flash 控件
function checknum(str) 
    { 
     for(var i=0;i<str.length;i++)
     {
    var a=str.substring(i,i+1);

	if("0123456789".indexOf(a)==-1)
	 return true;
    }
   return false;
   }
   function checkform()
   {
   if(checknum(form1.pictop.value))
   {
   alert("��¼��ֻ��������");
   return false;
    }
   }
    function pv(pics, links, texts) {	
     var focus_width=264 
     var focus_height=144 
     var text_height=18 
     var swf_height = focus_height+text_height	
    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">'); 
    document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="resources/PV/focus.swf"><param name="quality" value="high"><param name="bgcolor" value="#ECF5FA">'); 
    document.write('<param name="menu" value="false"><param name=wmode value="opaque">'); 
    document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">'); 
    document.write('<embed src="resources/PV/focus.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#F0F0F0" quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');   document.write('</object>');    }