<!--

var S_W = window.screen.width;
var S_H = window.screen.height;
var popupWin =null;

document.oncontextmenu=rc;
function rc() {
	return false;
}

function noError() 
{return true;}

window.onerror =noError;

function OpenWin(URL,WinName,W,H,Opt) {
	popupWin = window.open('about:blank', WinName, Opt);
	if (popupWin != null) {
		if (popupWin.opener == null) {
			popupWin.opener = self; 
		}
	popupWin.location.href = URL;
	popupWin.blur();
	window.focus();
	popupWin.resizeTo(W,H);
	popupWin.moveTo((S_W-W)/2, (S_H-H)/2);
	popupWin.focus();
	//window.setInterval("popupWin.focus()", Time);
	}
}

function OpenWinReturn(ReStr){
	Obj=eval('opener.document.'+TName);
	Obj.value = ReStr;
	window.close();
}

function numberornot(form,Str){
    if (isNaN(form.Page.value) || form.Page.value=="" ){
        alert("请填上数字！");
        form.Page.value="";		
        form.Page.focus();	
    }
    else{
    form.action=Str;
    form.target='_self'; 
    form.submit();
    }
}
 function GoPage(id,Str){
    var formobj;
    formobj=document.forms[0];
    formobj.Page.value =id;
    formobj.action=Str;
    formobj.target='_self'; 
    formobj.submit ();
}

function button_any(form,act,url,pass,msg){
	if (pass==0){
		for (var i=0;i<form.MaxNum.value;i++){
			var e = eval("form.selected_id_"+i);
			if (e.checked){
				pass=1;
				break;
			}
		}
	}
	if (pass==1){
		if (msg==''){
				form.act.value=act;
				form.action=url;
				form.target='_self';
				form.submit ();
		}
		else{
			if (confirm(msg)){
				form.act.value=act;
				form.action=url;
				form.target='_self';
				form.submit ();
			}
		}
    }
    else{
        alert("请先选择一个记录!");
    }
}

 function CheckAll(form){
    for (var i=0;i<form.MaxNum.value;i++){
        var e = eval("form.selected_id_"+i);
        e.checked = form.chkall.checked;
    }
}



function Curdate()
{
var today=new Date();
if ( today.getYear() <= 99 )
yearStr=today.getYear() + 1900;
else
yearStr=today.getYear();
monthStr=today.getMonth()+1;
dateStr=today.getDate();
weekVal=today.getDay();
msg="今天是："+yearStr+"年"+monthStr+"月"+dateStr+"日";
 return msg;
}
function mOvr(src,clrOver){
	if(!src.contains(event.fromElement)){
		src.style.cursor='hand';src.bgColor=clrOver;
	}
}
function mOut(src,clrIn){
	if(!src.contains(event.toElement)){
		src.style.cursor='default';src.bgColor=clrIn;
	}
}
function mClk(src){
	if(event.srcElement.tagName=='TD'){
		src.children.tags('A')[0].click();
	}
}
function swapPic() {
var imgnum = images.length - 1;
do {
var randnum = Math.random();
rand1 = Math.round((imgnum - 1) * randnum) + 1;
} while (rand1 == useRand && imgnum != 1);
useRand = rand1;
document.randimg.src = images[useRand].src;
setTimeout('swapPic()',100000);
}

function makevisible(which){
if (which==0)
document.randimg.filters.alpha.opacity=100
else
document.randimg.filters.alpha.opacity=60
}

function Mv(pic) {
	posx=window.event.x;
	posy=window.event.y;
	move.style.left=posx;
	//move.style.left=300;
	move.style.top=posy;
	document.swapimg.src="/uppictures/"+pic;
	move.style.visibility= "visible"; 
}
function Hv() {
	move.style.visibility="hidden"; 
}

function stat(){
var a = pageYOffset+window.innerHeight-document.bar.document.height+200
document.bar.top = a
setTimeout('stat()',2)
}
function fix(){
nome=navigator.appName
if(nome=='Netscape'){
stat()
}
else{
var a=document.body.scrollTop+document.body.clientHeight-document.all.bar.offsetHeight-200
bar.style.top = a
}}

		function y2k(number) { return (number < 1000) ? number + 1900 : number; }

		function dispdate(){
			 var now = new Date();
			 var dd = now.getDate() , mt = now.getMonth() + 1 , yy = y2k(now.getYear()) , weekVal = now.getDay();

				if (weekVal==0)
			   msg1="星期日";
			else if (weekVal==1)
				msg1="星期一"; 
			else if (weekVal==2)
				msg1="星期二"; 
			else if (weekVal==3)
					msg1="星期三"; 
			else if (weekVal==4)
					msg1="星期四"; 
			else if (weekVal==5)
					msg1="星期五"; 
			else if (weekVal==6)
					msg1="星期六"; 

		   document.write("<table width=70 border=0 cellspacing=1 cellpadding=1><tr bgcolor=#000000><td height=40>");
		   document.write("<table width=100% border=0 bgcolor=#FFFFFF align=center><tr align=center><td>");
		   document.write(yy+"年"+mt+"月<br>");
		   document.write('<font color=#FF0000><b><font face="Arial, Helvetica, sans-serif" size="+2" >');
		   document.write(dd+"</font></b></font><br>");
		   document.write(msg1+"</td></tr></table></td></tr></table>");
		}


function movstar(a,time){		
	movx=setInterval("mov("+a+")",time)		
	}		
function movover(){		
	clearInterval(movx)		
	}		
function mov(a){		
	scrollx=new_date.document.body.scrollLeft		
	scrolly=new_date.document.body.scrollTop		
	scrolly=scrolly+a		
	new_date.window.scroll(scrollx,scrolly)		
	}		
function o_down(theobject){		
object=theobject		
	while(object.filters.alpha.opacity>60){			 
		object.filters.alpha.opacity+=-10}			 
		}			 
function o_up(theobject){			 
object=theobject			 
	while(object.filters.alpha.opacity<100){			 
		object.filters.alpha.opacity+=10}			 
		}			 
function wback(){			 
	if(new_date.history.length==0){window.history.back()}			 
	else{new_date.history.back()}			 
	}			 




function forselect(URL,TName,W,H){
	var ReValue = showModalDialog(URL, '', 'dialogWidth:'+W+'em; dialogHeight:'+H+'em; status:0');
	//var ReValue = showModelessDialog(URL, '', 'dialogWidth:'+W+'em; dialogHeight:'+H+'em; status:0');
	Obj=eval('document.'+TName);
	if (ReValue==undefined)
		ReValue=Obj.value;
	Obj.value=ReValue;
}


function selectReturn(ReStr){
	window.returnValue = ReStr;
	window.close();
}

//-->
