// functions for popping up window for subscribe or renew button

var winHeight = parseInt(screen.availHeight / 2);
//var winWidth = parseInt(screen.availWidth / 2);
var winWidth = 680;
var winTop = parseInt((screen.availHeight - winHeight ) / 2);
var winLeft = parseInt((screen.availWidth - winWidth) / 2);

var winBars = 'directories=no,location=no,menubar=no,status,titlebar,toolbar=no,scrollbars,resizable';
var winSize = 'width=' + winWidth + ',height=' + winHeight;
var winLoc = 'screenX=' + winLeft + ',screenY=' + winTop + ',left=' + winLeft + ',top=' + winTop;

var winOpts = winBars + ',' + winSize + ',' + winLoc;

function open_popup(txtURL, txtName) {
	// open the popup window

	//return window.open(txtURL,txtName,winOpts,true);
	return window.open(txtURL,txtName,winOpts,true);
	// window.open(thePage, pageName,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=0,width=500,height=300,screenX=500,screenY=350');

}

function load_popup(txtUrl,txtName) {
	var pageWin = open_popup(txtUrl,txtName);
	if (pageWin) {
		pageWin.focus();
		return false;
	} else {
		return true;
	}
}
