
function closeWin(){
	closeWin(false);
}

function closeWin(_refresh) {
	window.close();
	if(_refresh){
		opener.location.reload();
	}
	opener.focus();
}


function openWindow(url){
	_openWindow(url,"theWindow",520,565, "yes", "no");
}

function _openWindow(url, win, width, height, scroll, resize){
		var txt = "scrollbars="+scroll+",resizable="+resize+",status=no,width="+width+",height="+height;
		
        if(navigator.appName == "Netscape") {//moz
	        popWin = window.open(url,win,txt);
	        popWin.focus();
        }
        else{  //ie
	       if (navigator.userAgent.indexOf("MSIE 3") >= 0){ 
	           popWin = window.open(url,win,txt);
	           popWin.location.href = url;
	           //if (popWin.opener == null) popWin.opener = window; 
	           //popWin.opener.name = "opener";
			   popWin.focus();
	       }
	       else{
	           var popWin = window.open(url,win,txt);
			   popWin.focus();
	       }
       }       
}


function openWindow1(url){
	_openWindow1(url,"theWindow",520,630, "yes", "no");
}

function _openWindow1(url, win, width, height, scroll, resize){
		var txt = "scrollbars="+scroll+",resizable="+resize+",status=no,width="+width+",height="+height;
		
        if(navigator.appName == "Netscape") {//moz
	        popWin = window.open(url,win,txt);
	        popWin.focus();
        }
        else{  //ie
	       if (navigator.userAgent.indexOf("MSIE 3") >= 0){ 
	           popWin = window.open(url,win,txt);
	           popWin.location.href = url;
	           //if (popWin.opener == null) popWin.opener = window; 
	           //popWin.opener.name = "opener";
			   popWin.focus();
	       }
	       else{
	           var popWin = window.open(url,win,txt);
			   popWin.focus();
	       }
       }       
}
