//document.write('JS executed');
var agt=navigator.userAgent.toLowerCase();

// BROWSER VERSION
var is_major		= parseInt(navigator.appVersion);
var is_minor		= parseFloat(navigator.appVersion);
var is_nav  		= ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
					&& (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
					&& (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
var is_nav4			= (is_nav && (is_major == 4));
var is_nav4up		= (is_nav && (is_major >= 4));
var is_navonly 		= (is_nav && ((agt.indexOf(';nav') != -1) || (agt.indexOf(';nav') != -1)) );
var is_nav6			= (is_nav && (is_major == 5));
var is_nav6up		= (is_nav && (is_major >= 5));
var is_gecko		= (agt.indexOf('gecko') != -1);
var is_ie			= ((agt.indexOf('msie') != -1) && (agt.indexOf('opera') == -1));
var is_ie5			= (is_ie && (is_major == 4) && (agt.indexOf('msie 5.0')!=-1) );
var is_opera		= (agt.indexOf('opera') != -1);
var is_opera6or7	= (agt.indexOf('opera/6') != -1) || (agt.indexOf('opera/7') != -1);

// PLATFORM DETECTION
var is_win			= ( (agt.indexOf('win')!=-1) || (agt.indexOf('16bit')!=-1) );
var is_mac			= (agt.indexOf('mac')!=-1);

// STYLESHEET PATHBUILDING
var platform;
var browser;
var path 					= "/static/framework/skins/egov/css/prod/";
if (is_mac) platform		= "mac";
else if (is_win) platform	= "win";
else platform 				= "win";

// NOW SENDING 'M A C' STYLESHEET TO BROWSER
if ((is_win!=true) && (is_nav4))			document.write ('<link media="screen" rel="stylesheet" href="' + path + 'mac' + '_ns4.css' + '" type="text/css">');
if ((is_win!=true) && (is_nav4up))		document.write ('<link media="screen" rel="stylesheet" href="' + path + 'win' + '_ns.css' + '" type="text/css">');
if ((is_mac) && (is_ie))				document.write ('<link media="screen" rel="stylesheet" href="' + path + 'win' + '_ie.css' + '" type="text/css">');
if ((is_mac) && (is_opera))				document.write ('<link media="screen" rel="stylesheet" href="' + path + 'win' + '_ie.css' + '" type="text/css">');
// NOW SENDING 'P C' STYLESHEET TO BROWSER
if ((is_win) && (is_nav4))				document.write ('<link media="screen" rel="stylesheet" href="' + path + 'win' + '_ns.css' + '" type="text/css">');
if ((is_win) && (is_nav4up))			document.write ('<link media="screen" rel="stylesheet" href="' + path + 'win' + '_ns.css' + '" type="text/css">');
if ((is_win) && (is_ie))				document.write ('<link media="screen" rel="stylesheet" href="' + path + 'win' + '_ie.css' + '" type="text/css">');
if ((is_win) && (is_opera))				document.write ('<link media="screen" rel="stylesheet" href="' + path + 'win' + '_ie.css' + '" type="text/css">');
// IF PLATFORM IS DIFFERENT THAN MAC OR PC
if ((is_nav !=true) && (is_mac != true) && (is_win != true)) document.write ('<link media="screen" rel="stylesheet" href="' + path + 'win' + '_ie.css' + '" type="text/css">');
// REMOVE UNSUPPORTED FEATURES FOR SPECIFIC BROWSERS
if (is_ie5) 							document.write ('<link media="screen" rel="stylesheet" href="' + path + 'win' + '_ie5.css" type="text/css">');
if ((is_opera) && (is_opera6or7 != true)) document.write ('<link media="screen" rel="stylesheet" href="' + path + 'win' + '_ie5.css" type="text/css">');

function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}

function rld() {
document.location.reload()
}

function NewWindow(mypage, myname, w, h, scroll) {

winprops = 'height='+h+',width='+w+',scrollbars='+scroll+',resizable'

win = window.open(mypage, myname, winprops)

if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }

}

function printWindow()
	 {
			 bV = parseInt(navigator.appVersion);
			 if (bV >= 4) window.print();
	 }
/*document.write (' is_nav='+is_nav+' , ');
document.write (' is_nav4='+is_nav4+' , ');
document.write (' is_nav4up='+is_nav4up+' , ');
document.write (' is_navonly='+is_navonly+' , ');
document.write (' is_nav6='+is_nav6+' , ');
document.write (' is_ie='+is_ie+' , ');
document.write (' is_ie5='+is_ie5+' , ');
document.write (' is_opera='+is_opera+' , ');
document.write (' is_opera6or7='+is_opera6or7+' , ');
document.write (' platform='+platform+' , ');
document.write (' user agent='+agt+' , ');*/
