
/*
	Hand Crafted by Nevub -> [www.nevub.com || info@nevub.com]
	Copyright © 2002 Nevub.  All Rights Reserved.
--------------------------------------------------------------------------- */

var d = document;
var agt = navigator.userAgent.toLowerCase();
var w3c = (d.getElementById) ? true : false;
var xxx = ((agt.indexOf('opera') != -1) || (agt.indexOf('webtv') != -1) || (agt.indexOf('omniweb') != -1)) ? true : false;

var ieX = ((agt.indexOf('msie') != -1) && w3c && !xxx) ? true : false;
var ie4 = ((agt.indexOf('msie') != -1) && (d.all) && !w3c && !xxx) ? true : false;
var ns6 = ((agt.indexOf('gecko') != -1) && w3c && !xxx) ? true : false;
var ns4 = (d.layers && !w3c && !xxx) ? true : false;

var isWin = (navigator.appVersion.indexOf('Win') != -1) ? true : false;
var isMac = (navigator.appVersion.indexOf('Mac') != -1) ? true : false;

/*
if (ieX) d.write('<link rel="stylesheet" type="text/css" href="css/ieX.css" media="screen" />');
else if (ie4) d.write('<link rel="stylesheet" type="text/css" href="css/ie4.css" media="screen" />');
else if (ns6) d.write('<link rel="stylesheet" type="text/css" href="css/ns6.css" media="screen" />');
else if (ns4) d.write('<link rel="stylesheet" type="text/css" href="css/ns4.css" media="screen" />');
else d.write('<link rel="stylesheet" type="text/css" href="css/ie4.css" media="screen" />');
*/

if (d.layers) {
	origSelfWidth = innerWidth;
	origSelfHeight = innerHeight;
	onresize = function() { if (innerWidth != origSelfWidth || innerHeight != origSelfHeight) window.location.reload() };
}

function togClass(o, classElm) { o.className = classElm; }
function togValue(o, val, val2) { if (o.value == val) o.value = val2; }

function popWin(url, winName, w, h, scroll) {
	var sw = screen.width;
	var sh = screen.height;
	var cx = ( .5 * sw ) - ( w * .5 );
	var cy = ( .5 * sh ) - ( h * .5 );
	var values = 'toolbar=0,status=0,menubar=0,scrollbars=' + scroll + ',resizable=1,screenX=' + cx + ',screenY=' + cy + ',left=' + cx + ',top=' + cy + ',width=' + w + ',height=' + h;
	pop = window.open(url, winName, values);
}

function unpopWin() {
	if (window.opener) {
		self.close();
	}
	else {
		window.top.location.href = '/';
	}
}

function bookmark(url, title) {
	if (ieX && isWin) {
		window.external.AddFavorite(url, title);
	}
	else {
		alert('To bookmark the ' + title + ' site, press the CTRL (or Command) and D keys.');
	} 
}

function nixErr() { 
	return true; 
}

function globalInit() {
	
}

window.onload = globalInit;
//window.onerror = nixErr;

