//Popup parameters
var CONST_POPUP_OPTIONS = "menubar=no,toolbar=no,directories=no,location=no";

//function to open a resizeable popup, with scroll, statusbar or not
function popupResizScrolStatus(pURL,pTarget,pResiz,pScrol,pStatus,w,h) {
	var vsOptions 	= CONST_POPUP_OPTIONS + ",width="+w+",height="+h+",resizable="+pResiz+",scrollbars="+pScrol+",status="+pStatus+"";
	var winopen		= window.open(pURL,pTarget,vsOptions);
	if (window.focus) winopen.focus();
	}


//function to open a centered popup, resizeable, with scroll, statusbar or not
function popupCentered(pURL,pTarget,pResiz,pScrol,pStatus,w,h) {
	var viLeft  	= (screen.availWidth-w)/2;
	var viTop 		= (screen.availHeight-h)/2;
	 popupXY(pURL,pTarget,pResiz,pScrol,pStatus,w,h,viLeft,viTop);
	}
	

//function to open a popup on the right, resizeable, with scroll, statusbar or not
function popupRight(pURL,pTarget,pResiz,pScrol,pStatus,w,h) {
	var viLeft 		= (screen.availWidth-w);	
    popupXY(pURL,pTarget,pResiz,pScrol,pStatus,w,h,viLeft,0);
    }
    

//function to open a popup placed on XY coords, resizeable, with scroll, statusbar or not
function popupXY(pURL,pTarget,pResiz,pScrol,pStatus,w,h, pX,pY)
{
	var vsOptions 	= CONST_POPUP_OPTIONS + ",width="+w+",height="+h+",resizable="+pResiz+",scrollbars="+pScrol+",status="+pStatus+",left="+pX+",top="+pY+"";
	var winopen		= window.open(pURL,pTarget,vsOptions);
	if (window.focus) winopen.focus();
}


function goToGlobalRowenta(psURL)
	{
	var RowentaTarget		 = "globalRowenta";
	var RowentaOptions		 = "toolbar=yes,resizable=yes,scrollbars=yes,location=yes,menubar=yes,status=yes,directories=yes,";
	var RowentaWidth		 = 795;
	var RowentaHeight		 = 590;
	var RowentaX			 = (screen.availWidth-RowentaWidth)/2;
	var RowentaY			 = (screen.availHeight-RowentaHeight)/2;
	
	var RowentaAllOptions = RowentaOptions + "width="+RowentaWidth+",height="+RowentaHeight+",left="+RowentaX+",top="+RowentaY+"";
	
	vsWinName = window.open(psURL,RowentaTarget,RowentaAllOptions);
	if (window.focus) vsWinName.focus();
	if (vsWinName) {
		//vsWinName.moveTo(RowentaX,RowentaY);
		//vsWinName.resizeTo(RowentaWidth,RowentaHeight);
		}
	}
