    // *** BROWSER CHECK CS1.1 ***

var exclude=1;
var agt=navigator.userAgent.toLowerCase();
var win=0;var mac=0;var lin=1;
if(agt.indexOf('win')!=-1){win=1;lin=0;}
if(agt.indexOf('mac')!=-1){mac=1;lin=0;}
var lnx=0;if(lin){lnx=1;}
var ice=0;
var ie=0;var ie4=0;var ie5=0;var ie6=0;var com=0;var dcm;
var op5=0;var op6=0;var op7=0;
var ns4=0;var ns6=0;var ns7=0;var mz7=0;var kde=0;var saf=0;
if(typeof navigator.vendor!="undefined" && navigator.vendor=="KDE"){
	var thisKDE=agt;
	var splitKDE=thisKDE.split("konqueror/");
	var aKDE=splitKDE[1].split("; ");
	var KDEn=parseFloat(aKDE[0]);
	if(KDEn>=2.2){
		kde=1;
		ns6=1;
		exclude=0;
		}
	}
else if(agt.indexOf('webtv')!=-1){exclude=1;}
else if(typeof window.opera!="undefined"){
	exclude=0;
	if(/opera[\/ ][5]/.test(agt)){op5=1;}
	if(/opera[\/ ][6]/.test(agt)){op6=1;}
	if(/opera[\/ ][7-9]/.test(agt)){op7=1;}
	}
else if(typeof document.all!="undefined"&&!kde){
	exclude=0;
	ie=1;
	if(typeof document.getElementById!="undefined"){
		ie5=1;
		if(agt.indexOf("msie 6")!=-1){
			ie6=1;
			dcm=document.compatMode;
			if(dcm!="BackCompat"){com=1;}
			}
		}
	else{ie4=1;}
	}
else if(typeof document.getElementById!="undefined"){
	exclude=0;
	if(agt.indexOf("netscape/6")!=-1||agt.indexOf("netscape6")!=-1){ns6=1;}
	else if(agt.indexOf("netscape/7")!=-1||agt.indexOf("netscape7")!=-1){ns6=1;ns7=1;}
	else if(agt.indexOf("gecko")!=-1){ns6=1;mz7=1;}
	if(agt.indexOf("safari")!=-1 || (typeof document.childNodes!="undefined" && typeof document.all=="undefined" && typeof navigator.taintEnabled=="undefined")){mz7=0;ns6=1;saf=1;}
	}
else if((agt.indexOf('mozilla')!=-1)&&(parseInt(navigator.appVersion)>=4)){
	exclude=0;
	ns4=1;
	if(typeof navigator.mimeTypes['*']=="undefined"){
		exclude=1;
		ns4=0;
		}
	}
if(agt.indexOf('escape')!=-1){exclude=1;ns4=0;}
if(typeof navigator.__ice_version!="undefined"){exclude=1;ie4=0;}

	// Browsers supported and CSS links
	
if (mac&&ie5) { 
	document.write('<link rel="stylesheet" href="css/main_ie5mac.css" type="text/css" media="screen">');
	}
if (mac&&ie5) { 
	document.write('<link rel="stylesheet" href="css/main_ie5mac.css" type="text/css" media="print">');
	}   
if (win&&ie6) { 
	document.write('<link rel="stylesheet" href="css/main_ie6pc.css" type="text/css" media="screen">');
	}
if (win&&ie6) { 
	document.write('<link rel="stylesheet" href="css/main_ie6pc.css" type="text/css" media="print">');
	}		
if (win&&ns7) { 
	document.write('<link rel="stylesheet" href="css/main_net7mac.css" type="text/css" media="screen">');
	}
if (win&&ns7) { 
	document.write('<link rel="stylesheet" href="css/main_net7mac.css" type="text/css" media="print">');
	}	
if (mac&&ns7) { 
	document.write('<link rel="stylesheet" href="css/main_net7mac.css" type="text/css" media="screen">');
	}
if (mac&&ns7) { 
	document.write('<link rel="stylesheet" href="css/main_net7mac.css" type="text/css" media="print">');
	}
if (win&&op7) { 
	document.write('<link rel="stylesheet" href="css/main_op7mac.css" type="text/css" media="screen">');
	}
if (win&&op7) { 
	document.write('<link rel="stylesheet" href="css/main_op7mac.css" type="text/css" media="print">');
	}		
if (mac&&op7) { 
	document.write('<link rel="stylesheet" href="css/main_op7mac.css" type="text/css" media="screen">');
	}
if (mac&&op7) { 
	document.write('<link rel="stylesheet" href="css/main_op7mac.css" type="text/css" media="print">');
	}	
if (mac&&saf) { 
	document.write('<link rel="stylesheet" href="css/main_safari.css" type="text/css" media="screen">');
	}
if (mac&&saf) { 
	document.write('<link rel="stylesheet" href="css/main_safari.css" type="text/css" media="print">');
	}
if (mac&&mz7) { 
	document.write('<link rel="stylesheet" href="css/main_safari.css" type="text/css" media="screen">');
	}
if (mac&&mz7) { 
	document.write('<link rel="stylesheet" href="css/main_safari.css" type="text/css" media="print">');
	}
if (win&&mz7) { 
	document.write('<link rel="stylesheet" href="css/main_safari.css" type="text/css" media="screen">');
	}
if (win&&mz7) { 
	document.write('<link rel="stylesheet" href="css/main_safari.css" type="text/css" media="print">');
	}	
if (mac&&op6) { 
	document.write('<link rel="stylesheet" href="css/main_op7mac.css" type="text/css" media="screen">');
	}
if (mac&&op6) { 
	document.write('<link rel="stylesheet" href="css/main_op7mac.css" type="text/css" media="print">');
	}
if (win&&op6) { 
	document.write('<link rel="stylesheet" href="css/main_op7mac.css" type="text/css" media="screen">');
	}
if (win&&op6) { 
	document.write('<link rel="stylesheet" href="css/main_op7mac.css" type="text/css" media="print">');
	}	
	// Browsers not supported but redirected

	if (mac&&op6){
      window.location.href = "browser.htm";
	}
	if (win&&op6){
      window.location.href = "browser.htm";
	}
	if (mac&&op5){
      window.location.href = "browser.htm";
	}
	if (win&&op5){
      window.location.href = "browser.htm";
	}
	if (lin&&kde){
      window.location.href = "browser.htm";
	}
	if (mac&&kde){
      window.location.href = "browser.htm";
	}	
		
    // *** BROWSER CHECK CS1.2 ***
    
	var agt=navigator.userAgent.toLowerCase();
    var appVer = navigator.appVersion.toLowerCase();


    var is_minor = parseFloat(appVer);
    var is_major = parseInt(is_minor);

    var is_opera = (agt.indexOf("opera") != -1);

    // Note: On IE, start of appVersion return 3 or 4
    // which supposedly is the version of Netscape it is compatible with.
    // So we look for the real version further on in the string

    var iePos  = appVer.indexOf('msie');
    if (iePos !=-1) {
       is_minor = parseFloat(appVer.substring(iePos+5,appVer.indexOf(';',iePos)))
       is_major = parseInt(is_minor);
    }

    // ditto Konqueror
                                      
    var is_konq = false;
    var kqPos   = agt.indexOf('konqueror');
    if (kqPos !=-1) {                 
       is_konq  = true;
       is_minor = parseFloat(agt.substring(kqPos+10,agt.indexOf(';',kqPos)));
       is_major = parseInt(is_minor);
    }                                 

    var is_getElementById   = (document.getElementById) ? "true" : "false"; // 001121-abk
    var is_getElementsByTagName = (document.getElementsByTagName) ? "true" : "false"; // 001127-abk
    var is_documentElement = (document.documentElement) ? "true" : "false"; // 001121-abk

   var is_safari = ((agt.indexOf('safari')!=-1)&&(agt.indexOf('mac')!=-1))?true:false;
    var is_khtml  = (is_safari || is_konq);

    var is_gecko = ((!is_khtml)&&(navigator.product)&&(navigator.product.toLowerCase()=="gecko"))?true:false;
    var is_gver  = 0;
    if (is_gecko) is_gver=navigator.productSub;

    var is_moz   = ((agt.indexOf('mozilla/5')!=-1) && (agt.indexOf('spoofer')==-1) &&
                    (agt.indexOf('compatible')==-1) && (agt.indexOf('opera')==-1)  &&
                    (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1)     &&
                    (is_gecko) && 
                    ((navigator.vendor=="")||(navigator.vendor=="Mozilla")||(navigator.vendor=="Debian")));
    var is_fb = ((agt.indexOf('mozilla/5')!=-1) && (agt.indexOf('spoofer')==-1) &&
                 (agt.indexOf('compatible')==-1) && (agt.indexOf('opera')==-1)  &&
                 (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1)     &&
                 (is_gecko) && (navigator.vendor=="Firebird"));
    var is_fx = ((agt.indexOf('mozilla/5')!=-1) && (agt.indexOf('spoofer')==-1) &&
                 (agt.indexOf('compatible')==-1) && (agt.indexOf('opera')==-1)  &&
                 (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1)     &&
                 (is_gecko) && (navigator.vendor=="Firefox"));
    if ((is_moz)||(is_fb)||(is_fx)) {  // 032504 - dmr
       var is_moz_ver = (navigator.vendorSub)?navigator.vendorSub:0;
       if(!(is_moz_ver)) {
           is_moz_ver = agt.indexOf('rv:');
           is_moz_ver = agt.substring(is_moz_ver+3);
           is_paren   = is_moz_ver.indexOf(')');
           is_moz_ver = is_moz_ver.substring(0,is_paren);
       }
       is_minor = is_moz_ver;
       is_major = parseInt(is_moz_ver);
    }
   var is_fb_ver = is_moz_ver;
   var is_fx_ver = is_moz_ver;

    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)
                && (!is_khtml) && (!(is_moz)) && (!is_fb) && (!is_fx));


    // Netscape6 is mozilla/5 + Netscape6/6.0!!!
    // Mozilla/5.0 (Windows; U; Win98; en-US; m18) Gecko/20001108 Netscape6/6.0
    // Changed this to use navigator.vendor/vendorSub - dmr 060502   
    // var nav6Pos = agt.indexOf('netscape6');
    // if (nav6Pos !=-1) {
    if ((navigator.vendor)&&
        ((navigator.vendor=="Netscape6")||(navigator.vendor=="Netscape"))&&
        (is_nav)) {
       is_major = parseInt(navigator.vendorSub);
       // here we need is_minor as a valid float for testing. We'll
       // revert to the actual content before printing the result. 
       is_minor = parseFloat(navigator.vendorSub);
    }

    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_minor >= 4);
    var is_navonly      = (is_nav && ((agt.indexOf(";nav") != -1) ||
                          (agt.indexOf("; nav") != -1)) );

    var is_nav6   = (is_nav && is_major==6);
    var is_nav6up = (is_nav && is_minor >= 6);

    var is_nav5   = (is_nav && is_major == 5 && !is_nav6); // checked for ns6
    var is_nav5up = (is_nav && is_minor >= 5);

    var is_nav7   = (is_nav && is_major == 7);
    var is_nav7up = (is_nav && is_minor >= 7);

    var is_ie   = ((iePos!=-1) && (!is_opera) && (!is_khtml));
    var is_ie3  = (is_ie && (is_major < 4));

    var is_ie4   = (is_ie && is_major == 4);
    var is_ie4up = (is_ie && is_minor >= 4);
    var is_ie5   = (is_ie && is_major == 5);
    var is_ie5up = (is_ie && is_minor >= 5);
    
    var is_ie5_5  = (is_ie && (agt.indexOf("msie 5.5") !=-1)); // 020128 new - abk
    var is_ie5_5up =(is_ie && is_minor >= 5.5);                // 020128 new - abk
	
    var is_ie6   = (is_ie && is_major == 6);
    var is_ie6up = (is_ie && is_minor >= 6);

// KNOWN BUG: On AOL4, returns false if IE3 is embedded browser
    // or if this is the first browser window opened.  Thus the
    // variables is_aol, is_aol3, and is_aol4 aren't 100% reliable.

    var is_aol   = (agt.indexOf("aol") != -1);
    var is_aol3  = (is_aol && is_ie3);
    var is_aol4  = (is_aol && is_ie4);
    var is_aol5  = (agt.indexOf("aol 5") != -1);
    var is_aol6  = (agt.indexOf("aol 6") != -1);
    var is_aol7  = ((agt.indexOf("aol 7")!=-1) || (agt.indexOf("aol7")!=-1));
    var is_aol8  = ((agt.indexOf("aol 8")!=-1) || (agt.indexOf("aol8")!=-1));
	var is_aol9  = ((agt.indexOf("aol 9")!=-1) || (agt.indexOf("aol9")!=-1));

    var is_webtv = (agt.indexOf("webtv") != -1);
    
    // *** OS CHECK ***
    var is_win   = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
    var is_mac    = (agt.indexOf("mac")!=-1);

	// Browsers supported and CSS links
	
if (is_mac&&is_ie5) { 
	document.write('<link rel="stylesheet" href="css/main_ie5mac.css" type="text/css" media="screen">');
	}
if (is_mac&&is_ie5) { 
	document.write('<link rel="stylesheet" href="css/main_ie5mac.css" type="text/css" media="print">');
	}
if (is_win&&is_ie5up) { 
	document.write('<link rel="stylesheet" href="css/main_ie5pc.css" type="text/css" media="screen">');
	}
if (is_win&&is_ie5up) { 
	document.write('<link rel="stylesheet" href="css/main_ie5pc.css" type="text/css" media="print">');
	}
if (is_mac&&is_nav6) { 
	document.write('<link rel="stylesheet" href="css/main_net6mac.css" type="text/css" media="screen">');
	}
if (is_mac&&is_nav6) { 
	document.write('<link rel="stylesheet" href="css/main_net6mac.css" type="text/css" media="print">');
	}
if (is_win&&is_nav6) { 
	document.write('<link rel="stylesheet" href="css/main_net6mac.css" type="text/css" media="screen">');
	}
if (is_win&&is_nav6) { 
	document.write('<link rel="stylesheet" href="css/main_net6mac.css" type="text/css" media="print">');
	}	
if (is_win&&is_fx) { 
	document.write('<link rel="stylesheet" href="css/main_net7mac.css" type="text/css" media="screen">');
	}
if (is_win&&is_fx) { 
	document.write('<link rel="stylesheet" href="css/main_net7mac.css" type="text/css" media="print">');
	}
if (is_mac&&is_fx) { 
	document.write('<link rel="stylesheet" href="css/main_net7mac.css" type="text/css" media="screen">');
	}
if (is_mac&&is_fx) { 
	document.write('<link rel="stylesheet" href="css/main_net7mac.css" type="text/css" media="print">');
	}
if (is_win&&is_fb) { 
	document.write('<link rel="stylesheet" href="css/main_net7mac.css" type="text/css" media="screen">');
	}
if (is_win&&is_fb) { 
	document.write('<link rel="stylesheet" href="css/main_net7mac.css" type="text/css" media="print">');
	}
if (is_mac&&is_fb) { 
	document.write('<link rel="stylesheet" href="css/main_net7mac.css" type="text/css" media="screen">');
	}
if (is_mac&&is_fb) { 
	document.write('<link rel="stylesheet" href="css/main_net7mac.css" type="text/css" media="print">');
	}

		
	// Browsers not supported but redirected
	
	if (is_ie3 || is_ie4 || is_nav2 || is_nav3 || is_nav4 || is_nav5){
      window.location.href = "browser.htm";
	}
	if (is_win&&is_aol3){
      window.location.href = "browser.htm";
	}
	if (is_win&&is_aol4){
      window.location.href = "browser.htm";
	}
	if (is_win&&is_aol5){
      window.location.href = "browser.htm";
	}
	if (is_win&&is_aol6){
      window.location.href = "browser.htm";
	}
	if (is_mac&&is_aol3){
      window.location.href = "browser.htm";
	}
	if (is_mac&&is_aol4){
      window.location.href = "browser.htm";
	}
	if (is_mac&&is_aol5){
      window.location.href = "browser.htm";
	}
	if (is_mac&&is_aol6){
      window.location.href = "browser.htm";
	}

	// Side nav javascript begins here

function NMH_TMenu(b,og) { 
 var i,s,c,k,j,tN,hh;if(document.getElementById){
 if(b.parentNode && b.parentNode.childNodes){tN=b.parentNode.childNodes;}else{return;}
 for(i=0;i<tN.length;i++){if(tN[i].tagName=="DIV"){s=tN[i].style.display;
 hh=(s=="block")?"block":"block";if(og==1){hh="block";}tN[i].style.display=hh;}}
 c=b.firstChild;if(c.data){k=c.data;j=k.charAt(0);if(j=='+'){k='-'+k.substring(1,k.length);
 }else if(j=='-'){k='+'+k.substring(1,k.length);}c.data=k;}if(b.className=='nmhOn'){
 b.className='nmhOff';}else if(b.className=='nmhOff'){b.className='nmhOn';}}
}

function NMH_setMenu(){ 
 var i,d='',h='<style type=\"text/css\">';if(document.getElementById){
 var tA=navigator.userAgent.toLowerCase();if(window.opera){
 if(tA.indexOf("opera 5")>-1 || tA.indexOf("opera 6")>-1){return;}}
 for(i=1;i<20;i++){d+='div ';h+="\n#nmhSnav div "+d+"{display:block;}";}
 document.write(h+"\n</style>");}
}
NMH_setMenu();

function NMHopen(){ 
 var i,x,d,hr,ha,ef,a,ag;if(document.getElementById){d=document.getElementById('nmhSnav');
 if(d){hr=window.location.href;ha=d.getElementsByTagName("A");if(ha&&ha.length){
 for(i=0;i<ha.length;i++){if(ha[i].href){if(hr.indexOf(ha[i].href)>-1){
 ha[i].className="nmhCurrentOn";a=ha[i].parentNode.parentNode;while(a){
 if(a.firstChild && a.firstChild.tagName=="A"){if(a.firstChild.onclick){
 ag=a.firstChild.onclick.toString();if(ag&&ag.indexOf("NMH_TMenu")>-1){
 NMH_TMenu(a.firstChild,1);}}}a=a.parentNode;}}}}}}}
}

function NMHall(a){ 
 var i,x,ha,s,tN;if(document.getElementById){ha=document.getElementsByTagName("A");
 for(i=0;i<ha.length;i++){if(ha[i].onclick){ag=ha[i].onclick.toString();
 if(ag&&ag.indexOf("NMH_TMenu")>-1){if(ha[i].parentNode && ha[i].parentNode.childNodes){
 tN=ha[i].parentNode.childNodes;}else{break;}for(x=0;x<tN.length;x++){
 if(tN[x].tagName=="DIV"){s=tN[x].style.display;if(a==0&&s!='block'){NMH_TMenu(ha[i]);
 }else if(a==1&&s=='block'){NMH_TMenu(ha[i]);}break;}}}}}}
}

function NMHclass(){ 
 var i,x,d,tN,ag;if(document.getElementById){d=document.getElementById('nmhSnav');
 if(d){tN=d.getElementsByTagName("A");if(tN&&tN.length){for(i=0;i<tN.length;i++){
 ag=(tN[i].onclick)?tN[i].onclick.toString():false;if(ag&&ag.indexOf("NMH_TMenu")>-1){
 tN[i].className='nmhOn';}else{tN[i].className='nmhCurrent';}}}}}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
