var Popup,PopForum;

function closepops(){
alert("Closing");
if (Popup != ""){Popup.close()}
if (PopForum != ""){PopForum.close()}
}


function popupPage(page,width,height) {
var str = ",location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes";

if ( window.screen ) {
		if (Popup){Popup.close()}
		var ah = screen.availHeight - 30;
		var aw = screen.availWidth - 10;
		width = width || aw*.8;
		height= height|| ah*.9;
		var xc = Math.floor( ( aw - width ) / 2 );
		var yc = Math.floor( ( ah - height ) / 2 );

		str += ",left=" + xc + ",screenX=" + xc;
		str += ",top=" + yc + ",screenY=" + yc;
	}
str = "height="+height+",width="+width+str;
Popup=window.open(page, "Popup", str); 
if (Popup && window.focus){Popup.focus()
	}else{alert("Please turn off your PopUp Window blocker for this page \n e.g. if you are using the Google Toolbar just click 'Blocking popups'")}
}

function popForum(page) {

var str = ",location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes";

if (PopForum){PopForum.close()}
	var ah = screen.availHeight - 30;
	var aw = screen.availWidth - 10;
	width = Math.floor(aw*.8);
	height= Math.floor(ah*.9);
		
	var xc = ( aw - width ) / 2;
	var yc = ( ah - height ) / 2;

	str += ",left=" + xc + ",screenX=" + xc;
	str += ",top=" + yc + ",screenY=" + yc;

	str = "height="+height+",width="+width+str;
	//alert("46");
	PopForum=window.open(page, "PopForum", str); 
	if (PopForum && window.focus){PopForum.focus()
	}else{alert("Please turn off your PopUp Window blocker for this page \n e.g. if you are using the Google Toolbar just click 'Blocking popups'")}
}