var newwin;
var javascript_version = 1.2;

function launchwin(winurl,winname,winfeatures)
{

	//This launches a new window and then
	//focuses it if window.focus() is supported.
	newwin = window.open(winurl,winname,winfeatures);
	setTimeout('newwin.focus();',250);
}

// ---------------------------------------------------------
//	GLOBAL VARIABLES
//----------------------------------------------------------
var popWin;
var popWinType;
var ie;

ie = (document.all) ? true : false;

/* -----------------------------------------------
FUNCTION: popWindow 
DESC: Opens a window and positions it on the screen

ARGS:
	hrefTarget - url to be opened
	name - name of popup window (becomes popupType)
	width - width of the pop up window
	height - height of the pop up window
-------------------------------------------------*/
function popWindow(hrefTarget,name,width,height) {
// Create offset
	if (document.all) {
		xMax = screen.width, yMax = screen.height;
	} else {
		if (document.layers) {
			xMax = window.outerWidth, yMax = window.outerHeight;
		} else {
			xMax = 640, yMax=480;
		}
	}
	var xOffset = (xMax - 586)/2, yOffset = (yMax - 700)/2;
	//Check if pop up exists	
	if (!popWin||popWin.closed) {
		// no pop up exists set the popWinType to the current type
		popWinType = name;
		// open pop up window
		popWin = window.open(hrefTarget,name,'width='+width+',height='+height+',screenX='+xOffset+',screenY='+yOffset+', top='+yOffset+',left='+xOffset+',scrollbars=yes,menubar=yes,resizable=yes');
	} else {
		// Check if the pop up is the same type
		if (popWinType != name) {
		// it is not the same type so close the current pop up
		popWin.close();
		// set the popWinType to the current type
		popWinType = name;
		// open pop up window
		popWin = window.open(hrefTarget,name,'width='+width+',height='+height+',screenX='+xOffset+',screenY='+yOffset+', top='+yOffset+',left='+xOffset+',scrollbars=yes,menubar=yes,resizable=yes');
		return;
		}
		// Bring pop up to the foreground
		popWin.focus();
		// Change the location of the pop up to the location being requested
		popWin.location = hrefTarget;
	}		
}

function footerWin(hrefTarget) {
	alert("test");
	//Set Variables
	var name, width, height;
	name = "helpModLvl";
	width="463";
	height="500";
	// Pop up the window
	popWindow(hrefTarget,name,width,height,resizable="yes");
}