function Do_Article_Zoom(n)
{document.getElementById("NewsBox").style.fontSize=n+"px";}
function checkfrom(thisobj){if(thisobj.Keywords.value==''){alert('请输入内容');thisobj.Keywords.focus();return false;}else{return true;}}
function checkloginclass(){
	if(logform.username.value==""){
		alert ("用户名不能为空！");
		return false;
	}
	if(logform.psw.value==""){
		alert ("密码不能为空！");
		return false;
	}
	if(logform.rnd.value==""){
		alert ("验证码不能为空！");
		return false;
	}
}
function switchTag(tag,content,k,classty)
{
	for(var i=1; i <=4; i++)
	{
		if (i==k)
		{
			document.getElementById(tag+i).className="l1";
			document.getElementById(content+i).className="box_show";
		}else{
			document.getElementById(tag+i).className="l2";
			document.getElementById(content+i).className="box_none";
		}
	}
}
function get_Cookie_Key(N, K, V)
{
	N += '=';
　　N_len = N.length;
　　C_len = document.cookie.length;
　　i = 0;
　　while (i < C_len)
	{
		j = i + N_len;
		if (document.cookie.substring(i, j) == N)
		{
　　		var CookieVal = get_Cookie_Val(j);
			C_len = CookieVal.length;
			K_len = K.length;
			i = 0;
			while ( i < C_len)
			{
				j = i + K_len;
				if (CookieVal.substring(i, j) == K)
				{
					return get_Cookie_KeyVal(CookieVal,j+1);
				}
				i += 1;
			}
				
		}
		i = document.cookie.indexOf(' ', i) + 1;
		
　　	if (i == 0)
		{
			break;
		}
	}	
	return V;
}

//根据键地址获取COOKIE的值
function get_Cookie_Val(E)
{
　　end = document.cookie.indexOf(';', E);
　　
	if (end == -1)
	{
		end = document.cookie.length;
	}
　　return unescape(document.cookie.substring(E, end));
}

function get_Cookie_KeyVal(Cookievalue,E)
{
　　end = Cookievalue.indexOf('&', E);
　　
	if (end == -1)
	{
		end = Cookievalue.length;
	}
　　return unescape(Cookievalue.substring(E, end));
}

function mycode(){
	curl = window.parent.location.href;
	curl = curl.toLowerCase();
	cend = curl.indexOf(".html");
	if (cend == -1){
		cend = curl.length;
	}
	else{
		cend += 5;	
	}
	uid = get_Cookie_Key("Examw","userid",0);
	if (uid == 0){
		alert('您还没有登陆，所有没有附加推广标记！');
		window.clipboardData.setData("text",document.title+"\n"+curl.substring(0, cend));
	}
	else{
		window.clipboardData.setData("text",document.title+"\n"+curl.substring(0, cend)+"?"+uid);
		alert("您的宣传信息复制成功!");
	}
}
function OpenWindow(Url)
{
  var iWidth=760;                          //弹出窗口的宽度;
  var iHeight=560;                        //弹出窗口的高度;
  var iTop = (window.screen.availHeight-30-iHeight)/2;       //获得窗口的垂直位置;
  var iLeft = (window.screen.availWidth-10-iWidth)/2;           //获得窗口的水平位置;
  window.open(Url,'','toolbar=0,location=0,maximize=1,directories=0,status=1,menubar=0,scrollbars=0,resizable=1,top='+iTop+',left='+iLeft+',width='+iWidth+',height='+iHeight);
}
function MM_jumpMenu(selObj,restore){
  window.open(selObj.options[selObj.selectedIndex].value);
  if (restore) selObj.selectedIndex=0;
}
function switchTag2(tag,content,k)
{
    var aclass,bclass,i,n
	aclass = "sd01";
	bclass = "sd02";
	n = 5;
	for(i=1; i <=n; i++)
	{
		if (i==k)
		{
			document.getElementById(tag+i).className=aclass;
			document.getElementById(content+i).className="";
		}else{
			document.getElementById(tag+i).className=bclass;
			document.getElementById(content+i).className="hidden";
		}
	}
}
 