var agt=navigator.userAgent.toLowerCase();
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_nav2 = (is_nav && (is_major == 2));
var is_nav3 = (is_nav && (is_major == 3));
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_ie3    = (is_ie && (is_major < 4));
var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
var is_ie4up  = (is_ie && (is_major >= 4));
var is_ie5    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
var is_ie5_5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
var is_ie6    = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );
var is_ie6up  = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5);
var is_aol   = (agt.indexOf("aol") != -1);
var is_opera = (agt.indexOf("opera") != -1);
// *** PLATFORM ***
var is_win   = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
var is_mac    = (agt.indexOf("mac")!=-1);

var path = "";



/*var location_now = window.location;

var is_test	= (location_now.indexOf("html_dev")); window.alert(is_test);
var is_test	= -2; 
if (is_test == true) {  location.href = ""+path+"/update/notsupported.html"; }*/



	
if (is_aol == true )   { location.href = ""+path+"notsupported.html"; }	
//if (is_opera == true )   { location.href = "../notsupported.html"; }	
if (is_opera == true )   { 
			document.write("<link rel='stylesheet' href='"+path+"code/m.css' type='text/css' media='screen'>");
			document.write("<link rel='stylesheet' href='"+path+"code/m.css' type='text/css' media='print'>"); }
if (is_gecko == true )   { 
			document.write("<link rel='stylesheet' href='"+path+"code/m.css' type='text/css' media='screen'>");
			document.write("<link rel='stylesheet' href='"+path+"code/m.css' type='text/css' media='print'>"); }
if (is_mac == true )  {

	if (is_nav6up == true && is_mac == true) { 
			document.write("<link rel='stylesheet' href='"+path+"code/m.css' type='text/css' media='screen'>");
			document.write("<link rel='stylesheet' href='"+path+"code/m.css' type='text/css' media='print'>");}
			
	else if (is_ie5up == true && is_mac == true) { 
			document.write("<link rel='stylesheet' href='"+path+"code/m.css' type='text/css' media='screen'>");
			document.write("<link rel='stylesheet' href='"+path+"code/m.css' type='text/css' media='print'>");
		}

	else {location.href = ""+path+"/update/notsupported.html";}
}


else {
if (is_nav == true ) {
	if  (is_nav6up == true )  { 
		document.write("<link rel='stylesheet' href='"+path+"code/m.css' type='text/css' media='screen'>");
		document.write("<link rel='stylesheet' href='"+path+"code/m.css' type='text/css' media='print'>");
	}
	
	else if (is_nav6up == false ) { location.href = "../notsupported.html"; }
}	


if (is_ie == true ) {

	if (is_ie3 == true )   { location.href = ""+path+"/update/notsupported.html"; }
	
	else if (is_ie4 == true )   { location.href = ""+path+"/update/notsupported.html"; }
	
	else if (is_ie6up == true )   { 
		document.write("<link rel='stylesheet' href='"+path+"code/m.css' type='text/css' media='screen'>");
		document.write("<link rel='stylesheet' href='"+path+"code/m.css' type='text/css' media='print'>");

		}
		
	else if (is_ie5up == true )   { 
		document.write("<link rel='stylesheet' href='"+path+"code/m.css' type='text/css' media='screen'>");
		document.write("<link rel='stylesheet' href='"+path+"code/m.css' type='text/css' media='print'>");
		}
	

	}
}
