function popUp(url, w, h){
	w = (w)? w:"600";
	h = (h)? h:"500";
	try {
		if($.browser.msie) {
			//if the browser is IE5.0 and above use the showModalDialog
				url = url.replace('&','%26');
				var retUrl = window.showModalDialog(url,"","dialogWidth:"+w+"px;dialogHeight:"+h+"px;resizable: No;scroll:Yes;edge: Raised; center: Yes;status: No;");
			if(retUrl != null && retUrl != '') {
				window.location.href = retUrl;
			}
			return;
		} else {
			CreateModalDialog(url, w, h);
			//else for all other browser, create a proxy modal dialog 
		}
	} catch(e) {
		window.alert("This page is unavailable. Please try again later. You can also try changing your pop-up blocker settings.");
	}
}

var win;
function CreateModalDialog(url, w, h){
	w = (w)? w:"550";
	h = (h)? h:"500";
	win = window.open(url,"","width="+w+",height="+h+",location=0,status=0,menubar=0,scrollbars=1,resizable=0");
} 

function CheckForWindow(){
    try {
	    if($.browser.msie) {
			//if the browser is IE5.0+, return
			return true;
		} else {
		    if(win != null) {
		        if(!win.closed) {
		            win.focus();
		            return false;
		        }
		    }
		    return true;
	    }
    } catch(e) { }
    return true;
}


function ProcessYes(url){
    //if browser is IE5+, then showModalDialog was used, 
    // so pass the url back
    if($.browser.msie) {
    	window.returnValue = url;
    	window.close();
    } else {
	    // its any other browser, do a parent redirect
	    window.opener.document.location = url;
	    window.close();
	}
}
function ProcessNo(){window.close();}


