//for popup windows
var winObj=null;		
//open popup window
function fnOpenWin(sURL,width,height,scr,res,shift){
	if(winObj!=null)winObj.close();
	var str='scrollbars=';
	if(scr==1){str+='1'}else{str+='0';}
		str+=',resizable='+res+',location=0,toolbar=0,directories=0,status=0,menubar=0';		
			if(arguments.length==5){
				str=str+',left='+(window.screen.availWidth/2-width/2)+',top='+
					(window.screen.availHeight/2-height/2)+',width='+width+',height='+height;
			}else{
				str=str+',left='+(window.screen.availWidth/2-width/2+shift)+',top='+
					(window.screen.availHeight/2-height/2+shift)+',width='+width+',height='+height;
			}
		
		winObj=window.open(sURL,"",str);
	}
	
// check picture name (required field)
function fnCheckFileName(){
	if(document.all.myfile.value==""){
	fileNameError.style.visibility="visible";
	event.returnValue = false;
	}
}
