/*
--------------------------------------------------------------------------------
POPUP WINDOWS
--------------------------------------------------------------------------------
*/

//var oboyWidth = 500;
//var oboyHeight = 400;
var oInfoWin;

function checkPopup(){
		if (!document.getElementByClassName) return false;
		var elements = document.getElementsByClassName("popup");
		document.write("test");
		for(i=0; i < elements.length; i++){
			
		}
}


function popup(sSrc, iWidth, iHeight) {
	if (!oInfoWin || oInfoWin.closed || oInfoWin.document.location != sSrc) {
		var i_y = parseInt((screen.availHeight - iHeight) / 2, 10);
		var i_x = parseInt((screen.availWidth - iWidth) / 2, 10);
		oModalWin = window.open(sSrc, "newWindow", "height=" + iHeight + ", width= " + iWidth + ",left=" + i_x + ", top=" + i_y + ", toolbar=0, menubar=0, scrollbars=yes, resizable=yes");
		oModalWin.focus();
	} else {
		// bring existing subwindow to the front
    oInfoWin.focus();
	}
}
