// JavaScript Document

//---------------------------------------------------------
//	PAGE STYLE 01: DISPLAY IN CENTER OF SCREEN
//---------------------------------------------------------
var pwidth=460;		//page width
var pheight=520;	//page height
var wleft=(screen.width - pwidth)/2;
var wtop=(screen.height - pheight)/2;	
function openpopwin(url,offsetLeft,offsetTop)
{
	var ol=offsetLeft;
	var ot=offsetTop;
	if (ol==""|| ol==null) ol =parseInt(ol);
	if (ot==""|| ot==null) ot =parseInt(ot);
	var winfeature="toolbars=0, scrollbars=1, location=0, statusbars=0, menubars=0, resizable=0, width="+pwidth+", height="+pheight+", left = "+(wleft+ol)+", top = "+(wtop+ot)+"";
	var popw=window.open(url, '',winfeature);
	popw.focus();
}

//--------------------------------------------------------------------
//	PAGE STYLE 02: DISPLAY IN CENTER OF SCREEN WITH WIDTH AND HEIGHT
//--------------------------------------------------------------------
function openLearnMore(url,pWidth,pHeight)
{
	var pwidth02;
	var pheight02;
	pwidth02=pWidth;
	pheight02=pHeight;
	var wleft02=(screen.width - pwidth02)/2;
	var wtop02=(screen.height - pheight02)/2;
	var winfeature="toolbars=0, scrollbars=0, location=0, statusbars=0, menubars=0, resizable=0, width="+pwidth02+", height="+pheight02+", left="+wleft02+", top="+wtop02+"";
	var popw02=window.open(url, '',winfeature);
	popw02.focus();
}

function openPopWindow(url,xWidth,xHeight,xLeft,xTop)
{//Function: open window Width=xWidth, Height=xHeight at position: left=xLeft, top=xTop
//if left=0,top=0 then window position at screen Center
	var goURL,w,h,left,top;
	goURL=url;
	try{w=parseInt(xWidth,10);}catch(e){};
	try{h=parseInt(xHeight,10);}catch(e){};
	if((xLeft!=0) && (xLeft.toLowerCase()=="mc"))
		left = (screen.width-w)/2;		
	else
		try{left=parseInt(xLeft,10);}catch(e){};
	if((xTop!=0) && (xTop.toLowerCase()=="mc"))
		top =(screen.height-h)/2;
	else
		try{top=parseInt(xTop,10);}catch(e){};
	if (w==""|| w==null) w =400;
	if (h==""|| h==null) h =550;
	//if (left==""|| left==null||left=="NaN") top =(screen.width-w)/2;
	//if (top==""|| top==null||top=="NaN") top =(screen.height-h)/2;
	var winfeature="toolbars=0, scrollbars=1, location=0, statusbars=0, menubars=0, resizable=0, width="+w+", height="+h+", left = "+left+", top = "+top;
	var popwx=window.open(url, '',winfeature);
	popwx.focus();
	
}

