
/* *******************************************************************************************
 *         BROWSER SNIFFER                                                                   *
 ******************************************************************************************* */

var platf = navigator.platform ;
var ua    = navigator.userAgent ;

var isNS  = (document.layers) ? 1 : 0 ;
var isIE  = (document.all) ? 1 : 0 ;
var isMoz = (document.getElementById) ? 1 : 0 ;

var isGecko   = inStr(ua,"Gecko") ;
var isOpera   = inStr(ua,"Opera") ;
var isWindows = inStr(platf,"Win32") ;
var isMac     = inStr(platf,"Mac") ;

function inStr(str,val,cas) {
	var ret ;
	if (cas) { /* Case sensitive */
		ret = (str.indexOf(val) != -1) ? true : false ;
	} else { /* Not Case sensitive */
		str = str.toUpperCase() ;
		val = val.toUpperCase() ;
		ret = (str.indexOf(val) != -1) ? true : false ;
	}
	return ret ;
}

/* *******************************************************************************************
 *         Functions                                                                         *
 ******************************************************************************************* */

function init() {
	try {
		if (parent.LeftFrame) {
			parent.LeftFrame.randomImage() ;
		}
	} catch (e) {}
}



function winStatus(str) {
	if (str.indexOf("/") != -1 || str.indexOf(".asp") != -1) {
		str = "http://" + location.host + str ;
	}
	window.status = str ;
}

function popWinOpen(winW,winH,sUrl,sName,iResize,iScroll) {
	if (screen) {
		if ((screen.height - winH) < 150) {
			var winX = (screen.width - winW) / 2;
			var winY = 0;
		} else {
			var winX = (screen.width - winW) / 2;
			var winY = (screen.height - winH) / 2;
		}
		var popWindow = window.open(sUrl,sName,"resizable=" + iResize + ",menubar=0,scrollbars=" + iScroll + ",width=" + winW + ",height=" + winH + ",top=" + winY + ",left=" + winX + "");
		if (popWindow) popWindow.focus();
	} else {
		window.open(sUrl,sName,"resizable=yes,menubar=0,scrollbars=" + iScroll + ",width=" + winW + ",height=" + winH);
	}
}



