function checkLoginform(){
	if(document.Login.UserName.value==""){alert("请填写用户名！");document.Login.UserName.focus();return false;}
	if(document.Login.PassWord.value==""){alert("请填写密码！");document.Login.PassWord.focus();return false;}
	if(document.Login.VNum.value==""){alert("请填写验证问题！");document.Login.VNum.focus();return false;}
	return true;
}
function reCode(){
	var a=document.getElementById('v1');
	a.innerHTML="<img src='../inc/VNum.asp' alt='问题太难换一个！' title='问题太难换一个！' onClick='reCode()' width='80' height='25' >";
	document.getElementById('VNum').value="";
}
function leftoc(){
	var b=document.getElementById('left');
	(b.className=='leftoc') ? b.className="" : b.className="leftoc";
}
function adminHeight_(){
	var Width_P=document.body.clientWidth;
	var Height_P=document.body.clientHeight;
	var Height_T=document.getElementById('top').offsetHeight;
	document.getElementById('left').style.height=(Height_P-Height_T+30);
	document.getElementById('leftoc').style.height=(Height_P-Height_T-1);
	document.getElementById('right').style.height=(Height_P-Height_T-1);
	document.getElementById('PageMain').style.height=(Height_P-Height_T-49);
	//alert(document.getElementById('PageMain').style.height)
	document.getElementById('nav').style.width=(Width_P-215);
}
function AdminNav_(j,jj,j1){
	for(i=0;i<=jj;i++){
		document.getElementById("AdminN_"+i).className="";
		document.getElementById("AdminM_"+i).className="HidContent";
	}
	for(i=1;i<=j1;i++){
		document.getElementById("AdminM_"+j+"_"+i).className="";
	}
	document.getElementById("AdminN_"+j).className="a";
	document.getElementById("AdminM_"+j).className="";
	document.getElementById('left').className="";
	
	document.getElementById("PageTitle").innerHTML="← 请选择左侧菜单";
	document.getElementById("PageMain").innerHTML="";
}
function AdminIs_(j,jj,j1,j2,j3){
	document.getElementById("PageTitle").innerHTML=jj;
	document.getElementById("PageMain").innerHTML="<iframe src="+j+" frameborder='0' id='iframeshow' name='iframeshow'  style='width:100%;' scrolling='no' onload='this.height=iframeshow.document.body.scrollHeight'></iframe>"
	for(i=1;i<=j3;i++){
		document.getElementById("AdminM_"+j1+"_"+i).className="";
	}
	document.getElementById("AdminM_"+j1+"_"+j2).className="a";
}
function delmsg(msgid,txt)
{
	if(confirm(txt))
		window.location.href="?Action=Del&ID="+msgid;
}

function onIs(thisdiv){
	thisdiv.style.borderColor=='#ff0000' ? thisdiv.style.borderColor='#ccc' : thisdiv.style.borderColor='#ff0000' ;
}




function ss(obj){
	isdiv=obj;
	var istop=parseInt(isdiv.style.marginTop);
	if(isNaN(istop)){istop=70;}
	if(istop==0 || istop==70){
		if(istop==0){
			m=70;
			toTop=0;
		}else{
			m=0;
			toTop=65;
		}
		setopen=setInterval(OpenSquick,10);
	}
}
function OpenSquick(){
	var istop=parseInt(isdiv.style.marginTop);
	if(isNaN(istop)){istop=70;}
	toTop+=(m-istop)/2;
	isdiv.style.marginTop=toTop;
	if(Math.abs(m-istop)<1){
		clearInterval(setopen);
		isdiv.style.marginTop=m;
		//alert("ok")
	}
}


function toscroll(isid){
	var s=document.getElementById("RightDetail");
	var h=s.scrollHeight;
	if(window.event.clientY-110>0 && window.event.clientY-110<=300){
		isid.style.marginTop=window.event.clientY-110;
		s.scrollTop=(h-380)*(window.event.clientY-110)/300;
	}
}
