////////////////////////////////////////////////////////////////////////////////////////////////////
//	popupFullScreen (95%x90%)
//	Launches a new full screen popup window, centered in the screen.
////////////////////////////////////////////////////////////////////////////////////////////////////

fullWidth = 800; // sets a default width for browsers who do not understand screen.width below
fullheight = 520; // sets a default width for browsers who do not understand screen.height below

if (screen){ // weeds out older browsers who do not understand screen.width/screen.height
   fullWidth = ((screen.width)*.95);
   fullHeight = ((screen.height)*.90);
}

function popupFullScreen(win){

	var fullLeft = (screen.width-fullWidth)/2;
	var fullTop = 15;
	//Windows status bar messes this function up so it is commented out for now.
	//var fullTop = (screen.height-fullHeight)/2;

	newWindow = window.open(win,'PopupFullScreen','toolbar=no,location=no,status=yes,scrollbars=yes,resizable=yes,width='+fullWidth+',height='+fullHeight+',left='+fullLeft+',top='+fullTop);
	newWindow.focus();
}

function popupFullScreenWYSIWYG(win){

	var fullLeft = (screen.width-fullWidth)/2;
	var fullTop = 15;
	//Windows status bar messes this function up so it is commented out for now.
	//var fullTop = (screen.height-fullHeight)/2;

	newWindow = window.open(win,'popupFullScreenWYSIWYG','toolbar=no,location=no,status=yes,scrollbars=yes,resizable=yes,width='+fullWidth+',height='+fullHeight+',left='+fullLeft+',top='+fullTop);
	newWindow.focus();
}
////////////////////////////////////////////////////////////////////////////////////////////////////
//	popupSmall (500x400)
//	Launches a small popup window, centered in the screen.
////////////////////////////////////////////////////////////////////////////////////////////////////

var smallLeft = (screen.width-500)/2;
var smallTop = (screen.height-450)/2;

function popupSmall(win){

	newWindow = window.open(win,'PopupSmall','toolbar=no,location=no,status=yes,scrollbars=yes,resizable=yes,width=500,height=450,left='+smallLeft+',top='+smallTop);
	newWindow.focus();
}

////////////////////////////////////////////////////////////////////////////////////////////////////
//	popupMedium(750x470)
//	Launches a popup window, centered in the screen. 
////////////////////////////////////////////////////////////////////////////////////////////////////

var FooterLeft = (screen.width-750)/2;
var FooterTop = (screen.height-550)/2;

function popupMedium(win){
		
	newWindow = window.open(win,'PopupFooter','toolbar=no,location=no,status=yes,scrollbars=yes,resizable=yes,width=700,height=650,left='+FooterLeft+',top='+FooterTop);
	newWindow.focus();
}


////////////////////////////////////////////////////////////////////////////////////////////////////
//	popupFileManager (600x500)
//	Launches a meduim sized popup window, centered in the screen.
////////////////////////////////////////////////////////////////////////////////////////////////////

var FileManagerLeft = (screen.width-600)/2;
var FileManagerTop = (screen.height-500)/2;

function popupFileManager(win){
		
	newWindow = window.open(win,'PopupFileManager','toolbar=no,location=no,status=yes,scrollbars=no,resizable=yes,width=600,height=500,left='+FileManagerLeft+',top='+FileManagerTop);
	newWindow.focus();
}

////////////////////////////////////////////////////////////////////////////////////////////////////
//	popupWYSIWYG (750x600)
//	Launches a popup window, centered in the screen. only for use with the WYSIWYG Editor
////////////////////////////////////////////////////////////////////////////////////////////////////

var WYSIWYGLeft = (screen.width-750)/2;
var WYSIWYGTop = (screen.height-500)/2;

function popupWYSIWYG(win){
		
	newWindow = window.open(win,'PopupWYSIWYG','toolbar=no,location=no,status=yes,scrollbars=no,resizable=no,width=750,height=500,left='+WYSIWYGLeft+',top='+WYSIWYGTop);
	newWindow.focus();
}

////////////////////////////////////////////////////////////////////////////////////////////////////
//	popupFooter (750x470)
//	Launches a popup window, centered in the screen. only for use with the Footer Links (Discliamer, Copyright, Termsofuse, Privacy)
////////////////////////////////////////////////////////////////////////////////////////////////////

var FooterLeft = (screen.width-800)/2;
var FooterTop = (screen.height-600)/2;

function popupFooter(win, zwidth,zheight){

	if ((zwidth == "" || zwidth == null || zwidth == undefined)){
			zwidth=500;
			zheight=550;
		} else {
			zheight=zwidth;
			zheight=zheight;
		}	
		
	newWindow = window.open(win,'PopupFooter','toolbar=no,location=no,status=yes,scrollbars=yes,resizable=yes,width='+zwidth+',height='+zheight+',left='+FooterLeft+',top='+FooterTop);
	// newWindow = window.open(win,'PopupFooter','toolbar=no,location=no,status=yes,scrollbars=yes,resizable=yes,width=300,height=450,left='+FooterLeft+',top='+FooterTop);
	newWindow.focus();
}

////////////////////////////////////////////////////////////////////////////////////////////////////
//	popupProperties (VariablexVariable)
//	Launches a popup window, centered in the screen. only for use with the Property editors.  Width and Height will be passed via javscript
////////////////////////////////////////////////////////////////////////////////////////////////////


function popupProperties(win, w, h){
	
	var PropertiesLeft = (screen.width-w)/2;
	var PropertiesTop = (screen.height-h)/2;
		
	newWindow = window.open(win,'PopupProperties','toolbar=no,location=no,status=no,scrollbars=no,resizable=no,width='+w+',height='+h+',left='+PropertiesLeft+',top='+PropertiesTop);
	newWindow.focus();
}

////////////////////////////////////////////////////////////////////////////////////////////////////
