function oUPFile(tid,fmode)
{
		switch(fmode){
		case "File":
		 res = showModalDialog('/userupFile.asp', null, 'dialogWidth: 530px; dialogHeight: 435px; center: yes; resizable: no; scroll: no; status: no;');
 		break;
		default:
		 res = showModalDialog('/userupFile.asp', null, 'dialogWidth: 500px; dialogHeight: 435px; center: yes; resizable: no; scroll: no; status: no;');
		break;
		}
  if(res)
   document.all.item(tid).value=res;
}


function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function doPrint() {
	if (window.print != null) { 
		window.print();
	} else { 
		alert('您的浏览器不支持此项功能. 请从文件菜单中选择打印功能.'); 
	}
}
function IsDigit(){
  return ((event.keyCode >= 46) && (event.keyCode <= 57));
}
function IszDigit(){
  return ((event.keyCode >= 48) && (event.keyCode <= 57));
}

function openScript(url, width, height){
	var Win = window.open(url,"openScript",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=no' );
}

function fPopUpCalDlg(ctrlobj,lei)
{
	showx = event.screenX - event.offsetX - 4 - 10 ; // + deltaX;
	showy = event.screenY - event.offsetY -168; // + deltaY;
	newWINwidth = 210 + 4 + 18;
   if (lei==0){
	retval = window.showModalDialog("/js/Calendar.htm", "", "dialogWidth:197px; dialogHeight:210px; dialogLeft:"+showx+"px; dialogTop:"+showy+"px; status:no; directories:yes;scrollbars:no;Resizable=no; "  );
	if( retval != null ){
	//	alert(retval);
		ctrlobj.value = retval;
	}else{
		//alert("canceled");
	}
	}else{
	retval = window.showModalDialog("/js/Calendar1.htm", "", "dialogWidth:257px; dialogHeight:210px; dialogLeft:"+showx+"px; dialogTop:"+showy+"px; status:no; directories:yes;scrollbars:no;Resizable=no; "  );
	if( retval != null ){
	//	alert(retval);
		ctrlobj.value = retval;
	}else{
		//alert("canceled");
	}
	}
}

function fPopUpCalendarDlg(ctrlobj)
{
	showx = event.screenX - event.offsetX - 4 - 10 ; // + deltaX;
	showy = event.screenY - event.offsetY -168; // + deltaY;
	newWINwidth = 210 + 4 + 18;

	retval = window.showModalDialog("/js/Calendar.htm", "", "dialogWidth:197px; dialogHeight:210px; dialogLeft:"+showx+"px; dialogTop:"+showy+"px; status:no; directories:yes;scrollbars:no;Resizable=no; "  );
	if( retval != null ){
	//	alert(retval);
		ctrlobj.value = retval;
	}else{
		//alert("canceled");
	}
}
