function mycode(){
	curl = window.parent.location.href;
	curl = curl.toLowerCase();
	cend = curl.indexOf(".html");
	if (cend == -1){
		cend = curl.length;
	}
	else{
		cend += 5;	
	}
	window.clipboardData.setData("text",document.title+"\n"+curl.substring(0, cend));
	alert("成功复制本页标题和网址!您可以直接发送给好友了!");
}
function Re_FontSize(n)
{document.getElementById("Content").style.fontSize=n+"px";}
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 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 selcheck(n){
	var chk=document.all("ids");
	for(i=0;i<4;i++){
		if(document.all("allcheck").checked==true){
			chk(i).checked=true;
		}else{
			chk(i).checked=false;
		}
		if (n==0) {chk(i).checked=false;}
	}	
}

function checkloginform(){
	if(logform.username.value==""){
		alert ("用户名不能为空！");
		return false;
	}
	if(logform.psw.value==""){
		alert ("密码不能为空！");
		return false;
	}
	if(logform.rnd.value==""){
		alert ("验证码不能为空！");
		return false;
	}
}
