
 var winTime;
function SetCookie(name,value,Days)//两个参数，一个是cookie的名子，一个是值
{

var exp   = new Date(); //new Date("December 31, 9998");
exp.setTime(exp.getTime() + Days*24*60*60*1000);
document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString();

}


function getCookie(name)//取cookies函数 
{
       var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
    if(arr != null) return unescape(arr[2]); return null;

}


function delCookie(name)//删除cookie
{
var exp = new Date();
exp.setTime(exp.getTime() - 1);
var cval=getCookie(name);
if(cval!=null) document.cookie= name + "="+cval+";expires="+exp.toGMTString();
}

 function $(ids)
{
		if(document.getElementById(ids))
		return document.getElementById(ids);
	
	return ids;
}
    
function showGG(id)
{
	window.open("Seek.aspx?qid="+id, "ent"+id, "toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=920,height=650,left=" + (screen.width - 920) / 2 + ",top=" + (screen.height - 650) / 2);
}

	function over(obj,flag)
	{
		if(flag==0)
		{
			obj.className="item_out";
		}
		else
		{
			obj.className="item_over";
		}
	}
	
	function over2(obj,flag)
	{
		if(flag==0)
		{
			obj.className="item_list_off";
		}
		else
		{
			obj.className="item_list_on";
		}
	}
	
	function gotoUrl(url)
	{
		document.location.href=url;
	}
	
	
   function showOrHidden(childId,flag,obj,mlen)
   {
     
   	    if(flag=="0") 
   		{
   		obj.background="";
   		}
   		else
   		{
   		obj.background="images/menu_bg_1.jpg";
   		}	 	   
   	   
   	   
   	   if(childId=="0")
   	   {		  
   		  
   		  return;
   	   }
   	   
   	   var ele=$(childId);  
	   if(flag=="0") 	  
	   {
		   winTime=window.setTimeout(function cc(){ele.style.display='none'},200);		   
	   }
	   else
	   {  
	     //alert(mlen);
	     var yyy=(mlen/2*40-80)/2;
	      var wVal=mlen/2*40+"px";			
		  
		   
		  //ele.style.left=obj.style.left;		  
		  ele.style.top=120;
		  ele.style.width=wVal;
	   	  ele.style.display="";		
	   } 
	 
   }
   
    function moreLink(key)
	 {

		document.location.href="url.aspx?target="+escape(key);
	 }
