var main=null;			
function hide()
{			
	var div=main.getElementsByTagName("div");	
	var ul=main.getElementsByTagName("ul");			
	for(var i=0;i<div.length;i++)
	{
		div[i].className='hlc';
		div[i].style.display="none";
	}
	for(var t=0;t<ul.length;t++)
	{	
		ul[t].childNodes[0].className="l1";	
		ul[t].childNodes[1].className="l2";	
		ul[t].childNodes[2].className="l1";
	}
}	
function show(obj,con)
{
	main=document.getElementById(con+'');
	hide();		
	obj.parentNode.nextSibling.className='lc';		
	obj.parentNode.nextSibling.style.display="";
	if(obj.nextSibling==null)
	{
		obj.className="l3";
		obj.previousSibling.previousSibling.className="l11";
		obj.previousSibling.className="l21";
		obj.parentNode.nextSibling.childNodes[1].innerHTML=obj.parentNode.nextSibling.nextSibling.nextSibling.innerHTML;
	}
	else
	{
		obj.className="l3";
		obj.nextSibling.className="l21";
		obj.nextSibling.nextSibling.className="l11";				
		obj.parentNode.nextSibling.childNodes[1].innerHTML=obj.parentNode.nextSibling.nextSibling.innerHTML;
		//sance
	}
}

function insertFlash(elm, url, w, h) {
if (!document.getElementById(elm)) return;
var str = '';
str += '<object width="'+ w +'" height="'+ h +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0">';
str += '<param name="movie" value="'+ url +'">';
str += '<param name="wmode" value="opaque">';
str += '<param name="quality" value="autohigh">';
str += '<embed width="'+ w +'" height="'+ h +'" src="'+ url +'" quality="autohigh" wmode="opaque" type="application/x-shockwave-flash" plugspace="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>';
str += '</object>';
document.getElementById(elm).innerHTML = str;
}

function insertadImage(elm, url, w, h) {
if (!document.getElementById(elm)) return;
var str = '';
str += '<img width="'+ w +'" height="'+ h +'" src="'+ url +'"/>';
document.getElementById(elm).innerHTML = str;
}


function chackA()
    {
    	this.MouseOver=function()
    	{
    		this.className="menuHost";	    		
    		window.status=this.lang;
    	}
    	this.MouseOut=function()
    	{
    		if(this.lang=="B")
    		{
	    		if(this.nextSibling.style.display=="none")
	    		{
	    			this.className="menuLink";
    			}
    		}
    		else
    		{
    			this.className="menuLink";
    		}
    		window.status="";  			
    	}
    	this.hMouseOver=function(){this.className="menuHostam";window.status=this.lang;}
    	this.hMouseOut=function(){this.className="menuHosta";window.status="";}
    	this.Click=function()
    	{
    		if(this.nextSibling.style.display=="none")
    		{
    			this.nextSibling.style.display="";
    		}
    		else
    		{
    			this.nextSibling.style.display="none";
    		}
    	}
    	this.link=function()
    	{
    		document.location.href=this.lang;
    	}
    	var la=document.getElementById('leftMenu').getElementsByTagName('div');
    	for(var i=0;i<la.length;i++)
    	{
    		if(la[i].className=="menuLink" & la[i].lang=="B")
    		{	    			
    			la[i].setAttribute('onmouseover',document.all ? eval(MouseOver) : 'javascript:MouseOver()');
    			la[i].setAttribute('onmouseout',document.all ? eval(MouseOut) : 'javascript:MouseOut()');
    			la[i].setAttribute('onclick',document.all ? eval(Click) : 'javascript:Click()');	    			
    		}
    		else if(la[i].lang=="S")
    		{
    			la[i].style.display="none";	    			
    		}
    		else if(la[i].className=="menuLink")
    		{
    			la[i].setAttribute('onmouseover',document.all ? eval(MouseOver) : 'javascript:MouseOver()');
    			la[i].setAttribute('onmouseout',document.all ? eval(MouseOut) : 'javascript:MouseOut()');
    			la[i].setAttribute('onclick',document.all ? eval(link) : 'javascript:link()');	    			
    		}
    		else if(la[i].className=="menuHosta")
    		{
    			la[i].setAttribute('onclick',document.all ? eval(link) : 'javascript:link()');
    			la[i].setAttribute('onmouseover',document.all ? eval(hMouseOver) : 'javascript:hMouseOver()');
    			la[i].setAttribute('onmouseout',document.all ? eval(hMouseOut) : 'javascript:hMouseOut()');
    		}
    	}
    }
	function Roll(room,m1,m2,width,height,speed,type)
    {
        var r=document.getElementById(room);
        var z1=document.getElementById(m1);
        var z2=document.getElementById(m2);        
        type=(type=="")?"u":type;//u:向上;d:向下;l:向左;r:向右        
        speed=(speed=="")?"50":speed;
		z2.innerHTML=z1.innerHTML;
		with(r)
		{
		    noWrap=true; //这句表内容区不自动换行
		    style.width=width; //于是我们可以将它的宽度设为0，因为它会被撑大
		    style.height=height;
		    style.overflowY="hidden"; //滚动条不可见			
		}
		function Marquee()
		{		
		    switch(type)
		    {
		        case "u":
			        if(z2.offsetHeight-r.scrollTop<=0)
			        {					
				        r.scrollTop-=z1.offsetHeight;
			        }
			        else
			        {					
				        r.scrollTop++;
			        }
			    break;
			    case "d":
			        if(r.scrollTop<=0)
			        {			            
				        r.scrollTop=z2.offsetHeight;				        
			        }
			        else
			        {					
				        r.scrollTop--;
			        }
			    break;
			    case "l":			        
			        if(z2.offsetWidth-r.scrollLeft<=4)
				    {
					    r.scrollLeft-=z1.offsetWidth+1
				    }
				    else
				    {
					    r.scrollLeft=r.scrollLeft+1;
				    }
			    break;
			    case "r":
			        if(z2.offsetWidth-r.scrollLeft<=4)
				    {
					    r.scrollLeft-=z1.offsetWidth
				    }
				    else
				    {
					    r.scrollLeft=r.scrollLeft+1;
				    }
			    break;			    
			}
		};
		var Time=setInterval(Marquee,speed);				
		r.onmouseover=function() 
		{		    
			clearInterval(Time);
		};
		r.onmouseout=function() 
		{
			Time=setInterval(Marquee,speed);
		}    
}/*
function Time()
{          
var time="";                                                                                                                                                      
tmpDate = new Date();                                                                                                                                                                         
date = tmpDate.getDate();                                                                                                                                                                         
month= tmpDate.getMonth() + 1 ;                                                                                                                                                                      
year= tmpDate.getFullYear();
myArray=new Array(6);                                                                                                                                                                         
myArray[0]="星期日"                                                                                                                                                                         
myArray[1]="星期一"                                                                                                                                                                         
myArray[2]="星期二"                                                                                                                                                                         
myArray[3]="星期三"                                                                                                                                                                         
myArray[4]="星期四"                                                                                                                                                                         
myArray[5]="星期五"                                                                                                                                                                         
myArray[6]="星期六"   
time=year+"年";
time+=month+"月";
time+=date+"日  ";                                                                                                                                                                      
weekday=tmpDate.getDay();                                                                                                                                                                         
if (weekday==0 | weekday==6)                                                                                                                                                                         
{                                                                                                                                                                         
time+=myArray[weekday];                                                                                                                                                                         
}                                                                                                                                                                         
else                                                                                                                                                                         
{
	time+=myArray[weekday];                                                                                                                                                                         
};   
document.write("今天是："+time); 
}*/ 
function fontZoom(size)
{
   document.getElementById('newscontent').style.fontSize=size+'px';
}
/*
function message(m)
        {
            var add=document.getElementById("addmess");
            var look=document.getElementById("lookmess");
            var btnfa=document.getElementById("fa");
            var btnkan=document.getElementById("kan");
            if(m)            
            {
                add.style.display="none";                
                look.style.display="";
                btnfa.className="mesa1";
                btnkan.className="mesa";
            }
            else
            {
                add.style.display="";                
                look.style.display="none";
                btnfa.className="mesa";
                btnkan.className="mesa1";
            }
        }*/
		/*
        var err="";		
		function check()
		{
			err="";					
			checkname();
			checktitle();
			if(err.length>0)
			{
				alert(err);
				return false;
			}
			return true;
		}
       
		function checkname()
		{
			if(document.getElementById('txtName').value.length<1)
			{
				document.getElementById('txtName').className="TXTBoxRedBorder";
				err+="请填写您的姓名！\r";	
			}
			else
			{
				document.getElementById('txtName').className="TXTBOX";
			}	
		}
		function checktitle()
		{
			if(document.getElementById('txtContent').value.length<1)
			{
				document.getElementById('txtContent').className="TXTBoxRedBorder";
				err+="请填写内容！\r";	
			}
			else
			{
				document.getElementById('txtContent').className="TXTBOX";
			}	
		}
		*/
		function secah()
        {
            var value=document.getElementById("txtSeach");
            if(value.value.length<=0)
            {
                alert("请输入搜索内容!");
            }
            else
            {
                document.location.href="Seach.aspx?str="+value.value;            
            }
        }
        function NewMove(did)
			{				
				var v=document.getElementById("news"+did);
				var a=document.getElementById("newa"+did);
				for(var i=1;i<=3;i++)
				{
					document.getElementById("news"+i).style.display="none";		
					//document.getElementById("newa"+i).style.width="82px";
					//document.getElementById("newa"+i).style.height="27px";
					document.getElementById("newa"+i).style.textIndent="0px";
					document.getElementById("newa"+i).style.backgroundImage="url(ntb1.gif)";
					document.getElementById("newa"+i).style.color="#525252";
				}
				v.style.display="block";
				//a.style.width="99px";
				//a.style.height="29px";
				a.style.textIndent="10px";
				a.style.backgroundImage="url(ntb.gif)";
				a.style.color="white";
			}
			
			
function ImageLoad(obj,url,w,h)
	{
		var m= new Load(obj,url,w,h);
		m.Star();	    
	}	
	function Load(obj,url,Width,Height) 
	{      
		var Img= new Object();		 
		var images=new Image(); 
		images.src=url;  			
		Img.o=obj;
		
		Img.w=Width;
		Img.h=Height;
		Img.stime=null;		
//		Img.o.width=1;
//		Img.o.height=1;
		Img.u=url;
		Img.Star=function()
		{			
//		    
//			var imgO=new Image();
//			imgO.src=Img.u;			
//			var x=imgO.width;
//			var y=imgO.height;
//			var ImgeProportion=x/y;
//			var FrameworkProportion=Img.w/Img.h;
//			if(FrameworkProportion>=ImgeProportion)
//			{			
//				x=Img.h*ImgeProportion;
//				y=Img.h;
//			}
//			else
//			{
//				x=Img.w;
//				y=Img.w/ImgeProportion;
//			}			
			
//			//show=function()
//			//{	
//			//	Img.o.width+=2;
//			//	Img.o.height+=2/ImgeProportion;		
//			//	Img.stime=setTimeout("show()",1);	
//			//	if(Img.o.width>=x | Img.o.height>=y)
//			//	{
//					Img.o.width=x;
//					Img.o.height=y;	
////					alert(x+':'+y);
//			//		clearTimeout(Img.stime);
//			//	}		
//			//}		
//			//Img.stime=setTimeout("show()",1);
		}	  
		return Img;  
	} 	
	function ShowImg(width,height)
	{
		var Images=document.getElementsByName("ShowImg");
	
		for(var i=0; i<Images.length;i++)
		{			
			ImageLoad(Images[i],Images[i].src,width,height);			
		}
	}
function getObject(objectId) {	
  if(document.getElementById && document.getElementById(objectId)) {return document.getElementById(objectId);} 
  else if (document.all && document.all(objectId)) {return document.all(objectId); } 
  else if (document.layers && document.layers[objectId]) {return document.layers[objectId]; } 
  else {return false;}	 
}	
function AsplpaShowHide(obj)
{
	var bb=obj.parentNode.getElementsByTagName("div");
	for(var i=0;i<bb.length;i++)
	{
		bb[i].style.display="none";
	}
	obj.getElementsByTagName("div")[0].style.display="";
}
             		

       
function addBookmark( sTitle)
{
var sURL=parent.location.href;
    try
    {
        window.external.addFavorite(sURL, sTitle);
    }
    catch (e)
    {
        try
        {
            window.sidebar.addPanel(sTitle, sURL, "");
        }
        catch (e)
        {
            alert("加入收藏失败，请使用Ctrl+D进行添加");
        }
    }
}
function SetHome(obj){
var vrl=window.location.href;
        try{
                obj.style.behavior='url(#default#homepage)';obj.setHomePage(vrl);
        }
        catch(e){
                if(window.netscape) {
                        try {
                                netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
                        }
                        catch (e) {
                                alert("此操作被浏览器拒绝！\n请在浏览器地址栏输入“about:config”并回车\n然后将 [signed.applets.codebase_principal_support]的值设置为'true',双击即可。");
                        }
                        var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
                        prefs.setCharPref('browser.startup.homepage',vrl);
                 }
        }
}
/*   
var menuStateId=0;   
function showTopMenu(m)
{
	if(m!=null)
	{
		menuStateId=m;
	}changNav(m);
}*/
function changNav(m)
{	
	if(timeMenu!=null)
	{
		ClearChangeNavT();
	}	
	for(var i=1;i<=10;i++)
	{				
		if(i==m)
		{			
			getObject("nav_"+m).className="hover";
			if(getObject("subnav_"+m).innerHTML!="")
			{
				getObject("subnav_"+m).parentNode.style.display="";
				getObject("subnav_"+m).className="";
			}
			else
			{
				if(window.location.pathname.indexOf('index.asp')>=0 | window.location.pathname.indexOf('index.html')>=0 | window.location.pathname.indexOf('.asp')<=0)
				{
					getObject("subnav_"+m).parentNode.style.display="none";
				}
			}
		}
		else
		{
			getObject("nav_"+i).className="";	
			getObject("subnav_"+i).className="hidden";				
		}  			
	}
}
var timeMenu=null;
function changNavT()
{	
		timeMenu=setTimeout(function(){changNav(menuStateId)},1000);
}
function ClearChangeNavT()
{
	if(timeMenu!=null)
	{
		clearTimeout(timeMenu);
	}
}



if(!Array.prototype.toSource) {
	function array_tosource(){
		st = "";
		for(var i=0;i<this.length;i++) {
			tEl = this[i];
			switch(typeof tEl){
				case "string":
					st+="\"" + tEl.replace(/"/g,"\\\"") + "\"";
					break;
				case "object":
					st+=tEl.toSource();
					break;			
		 		default:
	 				st+=tEl
			}
			if(i<this.length-1)st+=","
		}
		return "[" + st + "]"
	}
	Array.prototype.toSource = array_tosource;
}

if(!Array.prototype.shift) {
	function array_shift() {
		firstElement = this[0];
		this.reverse();
		this.length = Math.max(this.length-1,0);
		this.reverse();
		return firstElement;
	}

	Array.prototype.shift = array_shift;
}

if(!Array.prototype.unshift) {
	function array_unshift() {
		this.reverse();
		for(var i=arguments.length-1;i>=0;i--){
			this[this.length]=arguments[i]
		}
		this.reverse();
		return this.length
	}
	Array.prototype.unshift = array_unshift;
}

if(Array.prototype.push && ([0].push(true)==true))Array.prototype.push = null;
if(Array.prototype.splice && typeof([0].splice(0))=="number")Array.prototype.splice = null;

if(!Array.prototype.push) {

	function array_push() {
		for(i=0;i<arguments.length;i++){
			this[this.length]=arguments[i]
		};
		return this.length;
	}
	Array.prototype.push = array_push;

}

if(!Array.prototype.pop) {

	function array_pop(){
	    lastElement = this[this.length-1];
		this.length = Math.max(this.length-1,0);
	    return lastElement;
	}

	Array.prototype.pop = array_pop;

}

if(!Array.prototype.splice) {

	function array_splice(ind){
		if(ind==null) return ind;
		if(ind<0) ind = this.length + ind;
		if(ind > this.length) {
			if(arguments.length>2) ind = this.length;
			else return [];
		}
		cnt = arguments[1] ? arguments[1] : this.length-ind;

		firstArray = [];
		secondArray = [];
		thirdArray = [];

		for(var i=0;i<this.length;i++){
			tEl = this[i];
			if(i<ind) firstArray.push(tEl);
			else if(i<ind+cnt) secondArray.push(tEl);
			else thirdArray.push(tEl);
		}

		this.length = firstArray.length;
		for(i=2;i<arguments.length;i++){
			this.push(arguments[i]);
		}
		this.concat(thirdArray);
		return secondArray;
	}

	Array.prototype.splice = array_splice;

}


function trim(str)
{
 while(str.charAt(0)==" ") 
 {
  str=str.substr(1);
 }
 while(str.charAt(str.length-1)==" ") 
 {
  str=str.substring(0,str.length-1);
 }
 return str; 
 
}
function onSubmit()
{
	var username = document.forms[0].username.value;
	username = trim(username);
	if(username == "")
	{
		alert("邮箱地址不能为空，请输入邮箱地址!")
		document.forms[0].username.focus();
		return false;
	}

	var domainname = document.forms[0].domainname.value;
	domainname = trim(domainname);
	if(domainname == "")
	{
		alert("邮箱域名不能为空，请输入邮箱域名!")
		document.forms[0].domainname.focus();
		return false;
	}

	if(domainname.indexOf(".") == -1)
		domainname += ".sina.net";
	
	var psw = document.forms[0].psw.value;
	if(psw == "")
	{
		alert("密码不能为空，请输入密码！");
		document.forms[0].psw.focus();
		return false;
	}
document.forms[0].action="http://mailo.sina.net/cgi-bin/websso/login.cgi";
	//document.loginform.curdomain.value = document.location;
	document.forms[0].user.value = username + '@' + domainname;
	do_sha1();
	document.forms[0].psw.value = "";	
	//alert("sessid: "+ssid);
	//alert("psw hash: "+document.loginform.pass.value);
	//alert(document.loginform.curdomain.value);

	var acton_str = new String(document.forms[0].action);
	var tmp_str1;
	var cur_action_domain;

	var re1 = /\/cgi-bin\/websso\/login.cgi/g;
	var re2 = /http:\/\//g;

	tmp_str1 = acton_str.replace(re1, "");
	cur_action_domain = tmp_str1.replace(re2, "");

	//alert(cur_web_domain);
	var is_sina_domain;
	var search_ptr = /\.sina\.net/i;
	var cur_location = new String(document.location);

	is_sina_domain = cur_location.search(search_ptr);

	if(is_sina_domain == -1)
	{
		//非从sina.net web登录用户
		//直接读取action url数据
		document.forms[0].outurl.value = cur_location;//login out url
		document.forms[0].curdomain.value = cur_action_domain;//mail serv
	}
	else
	{
		//从sina web服务器登录
		
		document.forms[0].outurl.value = cur_action_domain;
		document.forms[0].curdomain.value = cur_action_domain;
	}
document.forms[0].submit();
	//alert(document.loginform.curdomain.value);
	//alert(document.loginform.outurl.value);
}

function wc(name,value){
        var e = new Date ();
        e.setTime (e.getTime() + (365*24*60*60*1000));
        e = e.toGMTString()
        document.cookie=name+"="+value+";path=/;expires="+e+";domain=mail.sina.net;"
        //alert(document.cookie);
}

// convert a 32-bit value to a 8-char hex string
function cvt_hex( val )
{
   var str="";
   var i;
   var v;

   for( i=7; i>=0; i-- )
   {
      v = (val>>>(i*4))&0x0f;
      str += v.toString(16);
   }
   return str;
}

// return a hex value LSB first
function lsb_hex( val )
{
   var str="";
   var i;
   var vh;
   var vl;

   for( i=0; i<=6; i+=2 )
   {
      vh = (val>>>(i*4+4))&0x0f;
      vl = (val>>>(i*4))&0x0f;
      str += vh.toString(16) + vl.toString(16);
   }
   return str;
}

// rotate left circular
function rotate_left( n, s )
{
   var t4 = ( n<<s ) | (n>>>(32-s));
   return t4;
}

// calculate the hash
function do_sha1()
{
   var blockstart;			// which block of words from the dataare we using now?
   var i, j;
   var W = new Array(80);
   // initial constants
   var H0 = 0x67452301;
   var H1 = 0xEFCDAB89;
   var H2 = 0x98BADCFE;
   var H3 = 0x10325476;
   var H4 = 0xC3D2E1F0;
   // working variables
   var A, B, C, D, E;
   var temp;

   // get message to hash
   var msg = document.forms[0].psw.value;

   // note current length
   var msg_len = msg.length;

   // convert to a 32-bit word array
   var word_array = new Array();
   for( i=0; i<msg_len-3; i+=4 )
   {
      // convert 4 bytes to a word
      j = msg.charCodeAt(i)<<24 | msg.charCodeAt(i+1)<<16 |
		msg.charCodeAt(i+2)<<8 | msg.charCodeAt(i+3);
      word_array.push( j );
   }

   // handle final bits, add beginning of padding: 1 bit, then 0 bits
   switch( msg_len % 4 )
   {
      case 0:
         // text length was a multiple of 4 bytes, start padding
         i = 0x080000000;				// 4 bytes padding
         break;

      case 1:
         // one byte of text left
         i = msg.charCodeAt(msg_len-1)<<24 | 0x0800000;	// 3 bytes padding
         break;

      case 2:
         // two bytes of text left
         i = msg.charCodeAt(msg_len-2)<<24 | msg.charCodeAt(msg_len-1)<<16
		| 0x08000;				// 2 bytes padding
         break;

      case 3:
         // three bytes of text left
         i = msg.charCodeAt(msg_len-3)<<24 | msg.charCodeAt(msg_len-2)<<16
		| msg.charCodeAt(msg_len-1)<<8	| 0x80;	// 1 byte padding
         break;

      default:
         window.alert("Something went weird in the switch!")
         return;
   }

   // handle the end of the text and beginning of the padding
   word_array.push( i );

   // pad to 448 bits (mod 512 bits) = 14 words (mod 16 words)
   while( (word_array.length % 16) != 14 )
      word_array.push( 0 );

   // add 64-bit message length (in bits)
   word_array.push( msg_len>>>29 );
   word_array.push( (msg_len<<3)&0x0ffffffff );

   // Process each 16-word block.
   for ( blockstart=0; blockstart<word_array.length; blockstart+=16 )
   {
      // create entries in W array
      for( i=0; i<16; i++ )
         W[i] = word_array[blockstart+i];
      for( i=16; i<=79; i++ )
         W[i] = rotate_left(W[i-3] ^ W[i-8] ^ W[i-14] ^ W[i-16], 1);

      // copy state
      A = H0;
      B = H1;
      C = H2;
      D = H3;
      E = H4;

      // update state variables
      for( i= 0; i<=19; i++ )
      {
         temp = (rotate_left(A,5) + ((B&C) | (~B&D)) + E + W[i] + 0x5A827999) & 0x0ffffffff;

         // update state
         E = D;
         D = C;
         C = rotate_left(B,30);
         B = A;
         A = temp;
      }

      for( i=20; i<=39; i++ )
      {
         temp = (rotate_left(A,5) + (B ^ C ^ D) + E + W[i] + 0x6ED9EBA1) & 0x0ffffffff;

         // update state
         E = D;
         D = C;
         C = rotate_left(B,30);
         B = A;
         A = temp;
      }

      for( i=40; i<=59; i++ )
      {
         temp = (rotate_left(A,5) + ((B&C) | (B&D) | (C&D)) + E + W[i] + 0x8F1BBCDC) & 0x0ffffffff;

         // update state
         E = D;
         D = C;
         C = rotate_left(B,30);
         B = A;
         A = temp;
      }

      for( i=60; i<=79; i++ )
      {
        temp = (rotate_left(A,5) + (B ^ C ^ D) + E + W[i] + 0x6CA62C1D6) & 0x0ffffffff;

         // update state
         E = D;
         D = C;
         C = rotate_left(B,30);
         B = A;
         A = temp;
      }

      H0 = (H0 + A) & 0x0ffffffff;
      H1 = (H1 + B) & 0x0ffffffff;
      H2 = (H2 + C) & 0x0ffffffff;
      H3 = (H3 + D) & 0x0ffffffff;
      H4 = (H4 + E) & 0x0ffffffff;

   } // of loop on i

   // process output
   document.forms[0].pass.value = cvt_hex(H0) + cvt_hex(H1) + cvt_hex(H2)
		+ cvt_hex(H3) + cvt_hex(H4);
}

function search_bt()
{
    var val= document.getElementById("txtSeach");
    if(val.value.length<=0)
    {
         alert("请输入搜索内容!");
    }
    else
    {
    	window.open("search.asp?keyword="+val.value);
    }
}
function openQQ(qqcode)
	{
		var qqwindow=window.open('tencent://message/?Menu=yes&uin='+qqcode+'&Site=&Service=200');
		
		setTimeout(function(){qqwindow.close()},2000);

	}
/*
function checkdata()
{
    code1 =document.getElementById('codestr').value;  
    
     if ((code1=="")||(code1.length!=20))
     {
         alert("请输入正确格式的防伪码");
         document.forms[0].fwSeach.focus();         
      }
      else
      {       
          if (code1.substring(0,1)=="9")
         {           
            //document.forms[0].action="http://www.zjj315.com/checkcode.aspx?codestr="+code1;
            //document.forms[0].submit();                                 
            window.open("http://www.zjj315.com/checkcode.aspx?codestr="+code1);  
            document.getElementById('codestr').value="";   
            document.getElementById('codestr').blur();
         }
        else
        {     
            window.open("http://61.242.89.116/webfc/wlcodecheck.aspx?userid=&pwd=&code="+code1+"&sysfs=");
            document.getElementById('codestr').value="";          
        }       
      }
   
   
}
*/
