
/*
 * Popup Window Script
 * $Date:   Apr 01 2006 10:24:16  $
 * $Revision:   1.0  $
 *
 */

//Simple popup window
function popupwindow(theURL,winName,features) {
	  window.open(theURL,winName,features);
}
//Macromedia popup function
function MM_openBrWindow(theURL,winName,features) { 
	  //v2.0
  	  window.open(theURL,winName,features);
}

//popup window centered with focus
function popup_window(name, url_str, wid, hgt){
	
	if (arguments.length == 2) {
		var xscale = 0.8;
		var yscale = 0.8;
      	wid = screen.availWidth * xscale;
	
		if( screen.availWidth <= 800 )
			wid = screen.availWidth - 50;
		
      	hgt = screen.availHeight * yscale;
	}

	var left = '';
	var top = '';
	
	if( navigator.appName == 'Microsoft Internet Explorer' ){
		left = ',left=' + (( screen.availWidth - wid )/2 );
		top = ',top=' + (( screen.availHeight - hgt )/2 );
	}
	else if( navigator.appName == 'Netscape' ){
		left = ',screenX=' + (( screen.availWidth - wid )/2 );
		top = ',screenY=' + (( screen.availHeight - hgt)/2 );
	}
	
	var w = self.open( url_str, name, 'width=' + wid + ',height=' + hgt + ',status=no,toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,resizable=yes' + left + top );
	
	w.focus();
}
