//Popup Function
var popUpWin=0;
function popUpWindow(URLStr, left, top, width, height){
	if(popUpWin){
		if(!popUpWin.closed) popUpWin.close();
	}
	popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

// JavaScript Document
function Paging(CurPage){
	document.f.CurPage.value=CurPage		
	document.f.submit()
}

function GetObj(id){
return document.getElementById(id)
}

function chk_empty(form_obj){
	switch(form_obj.type){
		case "text" :
		case "textarea" :
		case "password" :
		case "hidden" :
		case "file" :
			return (replaceChar(form_obj.value," ","")=="")
		case "select-one" :	
			return (form_obj.options.selectedIndex==0)
		case "select-multiple" :
			return (form_obj.options.selectedIndex==-1)
	}
}
	
function replaceChar(str,from,to)
{
var tmp=str.split(from);
str="";
for (var i=0;i<tmp.length;i++){
str+=tmp[i]+to;
}
str = str.substring(0,str.length-to.length);
return  str
}