<!-- // hide from non-Javascript browsers
/*****************************************
 *   WINDOW FUNCTIONS LIBRARY            *
 ****************************************/

function winOpen(url, name, w, h, drawToCenter, fullScreen, titlebar, menubar, toolbar, locbar, statusbar, scrollable, resizable) {

	var xPos,yPos;
	var strWidth, strHeight, strUrl, strName, strXPos, strYPos, strStatusbar, strMenubar, strToolbar, strTitlebar, strLocbar, strScroll, strResize, strProps;

	if (!url.length) {
		return false;
	} else {	
		strUrl = url;
	}
	
	if (!name.length) {
		strName = url;
	} else {
		strName = name;
	}
	
			
	if (!fullScreen) {
		strWidth = "width=" + w;
		strHeight = "height=" + h;
		if (drawToCenter) {
			xPos = screen.width/2 - w/2;
			yPos = screen.height/2 - h/2;
		}
	} else {
		w = screen.width - 10;
		h = screen.height - 30;
		strWidth = "width=" + w;
		strHeight = "height=" + h;
		xPos = 0;
		yPos = 0;
	}
	

	if (document.all) {
		strXPos = "left=" + xPos;
		strYPos = "top=" + yPos;
	} else {
		strXPos = "screenX=" + xPos;
		strYPos = "screenY=" + yPos;
	}

	(titlebar) ? strTitlebar = "titlebar=yes" : strTitlebar = "titlebar=no";
	(menubar) ? strMenubar = "menubar=yes" : strMenubar = "menubar=no";
	(toolbar) ? strToolbar = "toolbar=yes" : strToolbar = "toolbar=no";
	(locbar) ? strLocbar = "location=yes" : strLocbar = "location=no";
	(statusbar) ? strStatusbar = "status=yes" : strStatusbar = "status=no";
	(scrollable) ? strScroll = "scrollbars=yes" : strScroll = "scrollbars=no";
	(resizable) ? strResize = "resizable=yes" : strResize = "resizable=no";
		
	strProps = strWidth + "," + strHeight + "," + strXPos + "," + strYPos + "," + strTitlebar + "," + strMenubar + "," + strToolbar + "," + strLocbar + "," + strStatusbar + "," + strScroll + "," + strResize;
		
	window.open(strUrl, strName, strProps);

}


function winResize(w, h, drawToCenter) {

	window.resizeTo(w, h);

	if (drawToCenter) {
		var xPos=0, yPos=0;
		xPos = screen.width/2 - w/2;
		yPos = screen.height/2 - h/2;
		window.moveTo(xPos,yPos);
	}

}


function winCrushFrames() {
    if (window != top)
		top.location.href = location.href;
}

//-->
