function detBrowSupp() {
    var ua = window.navigator.userAgent;
    var msie = ua.indexOf ( "MSIE " );
    var verIE = parseInt(ua.substring (msie+5, ua.indexOf (".", msie )));
    var isIE = navigator.appVersion.indexOf("MSIE");
    var supportAll = (document.all != null);
    var uaprod = navigator.product;
    var uavendor = navigator.vendor;
    var uaver = navigator.vendorSub;
    var uaAppName = navigator.appName; 
    var isFF = navigator.userAgent.indexOf("Firefox");

    // For debug...  
    //document.write("IE version=", verIE);
    //document.write("  msie=", msie);
    //document.write("  supportAll=", supportAll);
    //document.write("  uavprod=", uaprod);
    //document.write("  uavendor=", uavendor);
    //document.write("  uaversion=", uaver);
    //document.write("  uaAppName=", uaAppName);
    //document.write("  isFF=", isFF);  
    //document.write("  isIE=", isIE);    
  

    if (uaAppName == "Microsoft Internet Explorer")
    {
        if (verIE == 5)
        {
            document.write('<STYLE type=text/css>#content {MARGIN-TOP: 28px;}</STYLE>');
	    document.write('<STYLE type=text/css>#content {MARGIN-LEFT: -1px}</STYLE>');
            document.write('<STYLE type=text/css>ul#tabnav{MARGIN-RIGHT: -4px}</STYLE>');
            document.write('<STYLE type=text/css>DIV#stripPgDesc P{WIDTH: 660px}</STYLE>');
        }
        if (verIE == 6)
        {

        }
    }
    else 
    {
        if (uavendor == "Apple Computer, Inc.")     // Safari
        {
            document.write('<STYLE type=text/css>DIV#navbar{TEXT-ALIGN: center}</STYLE>');
            document.write('<STYLE type=text/css>DIV#navbar{PADDING-TOP: 0px}</STYLE>');
            document.write('<STYLE type=text/css>DIV#navbar LI A{PADDING-TOP: 6px}</STYLE>');
            document.write('<STYLE type=text/css>DIV#navbar LI A{PADDING-LEFT: 14px}</STYLE>');
            document.write('<STYLE type=text/css>DIV#navbar LI A{PADDING-BOTTOM: 7px}</STYLE>');
            document.write('<STYLE type=text/css>DIV#line HR{MARGIN-TOP: 12px}</STYLE>');
            document.write('<STYLE type=text/css>DIV#copyrightmsg P{MARGIN-TOP: 5px}</STYLE>');
        }
        else if (isFF == 68)
        {
            document.write('<STYLE type=text/css>DIV#navbar{TEXT-ALIGN: center}</STYLE>');
            document.write('<STYLE type=text/css>DIV#navbar{PADDING-TOP: 0px}</STYLE>');            
            document.write('<STYLE type=text/css>DIV#navbar{FONT-FAMILY: "Serif"}</STYLE>');
            document.write('<STYLE type=text/css>DIV#navbar LI A{PADDING-TOP: 6px}</STYLE>');
            document.write('<STYLE type=text/css>DIV#navbar LI A{PADDING-LEFT: 16px}</STYLE>');
            document.write('<STYLE type=text/css>DIV#navbar LI A{PADDING-BOTTOM: 3px}</STYLE>');
            document.write('<STYLE type=text/css>DIV#line HR{MARGIN-TOP: 12px}</STYLE>');
            document.write('<STYLE type=text/css>DIV#copyrightmsg P{MARGIN-TOP: 5px}</STYLE>');
            document.write('<STYLE type=text/css>DIV#shadowbox1text P{FONT-FAMILY: Arial}</STYLE>');
            document.write('<STYLE type=text/css>DIV#shadowbox1text P{FONT-SIZE: 12px}</STYLE>');
            document.write('<STYLE type=text/css>DIV#shadowbox1title P{FONT-FAMILY: Arial}</STYLE>');
            document.write('<STYLE type=text/css>DIV#newstext P{FONT-FAMILY: Arial}</STYLE>');
            document.write('<STYLE type=text/css>DIV#newstexttitle P{FONT-FAMILY: Arial}</STYLE>');
        }
        else if ((isFF == 75) || (isFF == 76) || (isFF == 77) || (isFF == 78))
        {
            document.write('<STYLE type=text/css>DIV#navbar{TEXT-ALIGN: center}</STYLE>');         
            document.write('<STYLE type=text/css>DIV#navbar{FONT-FAMILY: "Serif"}</STYLE>');
            document.write('<STYLE type=text/css>DIV#navbar LI A{PADDING-TOP: 5px}</STYLE>');
            document.write('<STYLE type=text/css>DIV#navbar LI A{PADDING-LEFT: 14px}</STYLE>');
            document.write('<STYLE type=text/css>DIV#navbar LI A{PADDING-BOTTOM: 3px}</STYLE>'); 
            document.write('<STYLE type=text/css>DIV#line HR{MARGIN-TOP: 12px}</STYLE>');
            document.write('<STYLE type=text/css>DIV#copyrightmsg P{MARGIN-TOP: 5px}</STYLE>');       
        }
        else if ((uavendor == "Fedora") && (uaver == "1.0.4-4")) // Firefox
        {
            document.write('<STYLE type=text/css>DIV#navbar{TEXT-ALIGN: center}</STYLE>');
            document.write('<STYLE type=text/css>DIV#navbar{PADDING-TOP: 0px}</STYLE>');            
            document.write('<STYLE type=text/css>DIV#navbar{FONT-FAMILY: "Serif"}</STYLE>');
            document.write('<STYLE type=text/css>DIV#navbar LI A{PADDING-TOP: 7px}</STYLE>');
            document.write('<STYLE type=text/css>DIV#navbar LI A{PADDING-LEFT: 17px}</STYLE>');
            document.write('<STYLE type=text/css>DIV#navbar LI A{PADDING-RIGHT: px}</STYLE>');
            document.write('<STYLE type=text/css>DIV#navbar LI A{PADDING-BOTTOM: 4px}</STYLE>');
            document.write('<STYLE type=text/css>DIV#line HR{MARGIN-TOP: 12px}</STYLE>');
            document.write('<STYLE type=text/css>DIV#copyrightmsg P{MARGIN-TOP: 5px}</STYLE>');
            document.write('<STYLE type=text/css>DIV#shadowbox1text P{FONT-FAMILY: Arial}</STYLE>');
            document.write('<STYLE type=text/css>DIV#shadowbox1text P{FONT-SIZE: 12px}</STYLE>');
            document.write('<STYLE type=text/css>DIV#shadowbox1title P{FONT-FAMILY: Arial}</STYLE>');
            document.write('<STYLE type=text/css>DIV#newstext P{FONT-FAMILY: Arial}</STYLE>');
            document.write('<STYLE type=text/css>DIV#newstexttitle P{FONT-FAMILY: Arial}</STYLE>');
        }
    }
} 

function detBrowSuppOld() {
    var ua = window.navigator.userAgent;
    var msie = ua.indexOf ( "MSIE " );
    var verIE = parseInt(ua.substring (msie+5, ua.indexOf (".", msie )));
    var isIE = navigator.appVersion.indexOf("MSIE");
    var supportAll = (document.all != null);
    var uaprod = navigator.product;
    var uavendor = navigator.vendor;
    var uaver = navigator.vendorSub;
    var uaAppName = navigator.appName; 
    var isFF = navigator.userAgent.indexOf("Firefox");
    var ffversion=new Number(RegExp.$1);
    //User agent string:
    //userAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.20) Gecko/20081217 Firefox/2.0.0.20
    //appVersion: 5.0 (X11; en-US)
    //platform: Linux i686

    // For debug...  
    document.write("IE version=", verIE);
    document.write("  msie=", msie);
    document.write("  supportAll=", supportAll);
    document.write("  uavprod=", uaprod);
    document.write("  uavendor=", uavendor);
    document.write("  uaversion=", uaver);
    document.write("  uaAppName=", uaAppName);
    document.write("  isFF=", isFF);
    document.write("  ffversion=", ffversion);
  

    if (uaAppName == "Microsoft Internet Explorer")
    {
        if (verIE == 5)
        {
            document.write('<STYLE type=text/css>#content {MARGIN-TOP: 28px;}</STYLE>');
	    document.write('<STYLE type=text/css>#content {MARGIN-LEFT: -1px}</STYLE>');
            document.write('<STYLE type=text/css>ul#tabnav{MARGIN-RIGHT: -4px}</STYLE>');
            document.write('<STYLE type=text/css>DIV#stripPgDesc P{WIDTH: 660px}</STYLE>');
        }
        if (verIE == 6)
        {

        }
    }
    else 
    {
        if (uavendor == "Apple Computer, Inc.")     // Safari
        {
            document.write('<STYLE type=text/css>DIV#navbar{TEXT-ALIGN: center}</STYLE>');
            document.write('<STYLE type=text/css>DIV#navbar{PADDING-TOP: 0px}</STYLE>');
            document.write('<STYLE type=text/css>DIV#navbar LI A{PADDING-TOP: 6px}</STYLE>');
            document.write('<STYLE type=text/css>DIV#navbar LI A{PADDING-LEFT: 14px}</STYLE>');
            document.write('<STYLE type=text/css>DIV#navbar LI A{PADDING-BOTTOM: 7px}</STYLE>');
            document.write('<STYLE type=text/css>DIV#line HR{MARGIN-TOP: 12px}</STYLE>');
            document.write('<STYLE type=text/css>DIV#copyrightmsg P{MARGIN-TOP: 5px}</STYLE>');
        }
        else    // Firefox
        {
            if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent))
            {
                var ffversion=new Number(RegExp.$1);
                if (ffversion>=1)
                {
                    document.write('<STYLE type=text/css>DIV#navbar{TEXT-ALIGN: center}</STYLE>');
                    document.write('<STYLE type=text/css>DIV#navbar{PADDING-TOP: 0px}</STYLE>');            
                    document.write('<STYLE type=text/css>DIV#navbar{FONT-FAMILY: "Serif"}</STYLE>');
                    document.write('<STYLE type=text/css>DIV#navbar LI A{PADDING-TOP: 7px}</STYLE>');
                    document.write('<STYLE type=text/css>DIV#navbar LI A{PADDING-LEFT: 17px}</STYLE>');
                    document.write('<STYLE type=text/css>DIV#navbar LI A{PADDING-RIGHT: px}</STYLE>');
                    document.write('<STYLE type=text/css>DIV#navbar LI A{PADDING-BOTTOM: 4px}</STYLE>');
                    document.write('<STYLE type=text/css>DIV#line HR{MARGIN-TOP: 12px}</STYLE>');
                    document.write('<STYLE type=text/css>DIV#copyrightmsg P{MARGIN-TOP: 5px}</STYLE>');
                    document.write('<STYLE type=text/css>DIV#shadowbox1text P{FONT-FAMILY: Arial}</STYLE>');
                    document.write('<STYLE type=text/css>DIV#shadowbox1text P{FONT-SIZE: 12px}</STYLE>');
                    document.write('<STYLE type=text/css>DIV#shadowbox1title P{FONT-FAMILY: Arial}</STYLE>');
                    document.write('<STYLE type=text/css>DIV#newstext P{FONT-FAMILY: Arial}</STYLE>');
                    //document.write('<STYLE type=text/css>DIV#shadowbox1text P{FONT-SIZE: 12px}</STYLE>');
                    document.write('<STYLE type=text/css>DIV#newstexttitle P{FONT-FAMILY: Arial}</STYLE>');
                }
                if (ffversion>=2)
                {

                }
                if (ffversion>=3)
                {

                }
            }
             
        }
    }
} 

function detFFver()
{
    if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent))
    { //test for Firefox/x.x or Firefox x.x (ignoring remaining digits);
    var ffversion=new Number(RegExp.$1); // capture x.x portion and store as a number
        if (ffversion>=3)
            document.write("You're using FF 3.x or above");
        else if (ffversion>=2)
            document.write("You're using FF 2.x");
        else if (ffversion>=1)
            document.write("You're using FF 1.x");
    }
    else
        document.write("n/a");
}

function detIEver()
{

    if (/MSIE (\d+\.\d+);/.test(navigator.userAgent))
    { //test for MSIE x.x;
        var ieversion=new Number(RegExp.$1); // capture x.x portion and store as a number
        if (ieversion>=8)
            document.write("You're using IE8 or above");
        else if (ieversion>=7)
            document.write("You're using IE7.x");
        else if (ieversion>=6)
            document.write("You're using IE6.x");
        else if (ieversion>=5)
            document.write("You're using IE5.x");
    }
    else
        document.write("n/a");
}



function detBrow() 
{
    var verNav = parseInt(navigator.appVersion);
    var ua = window.navigator.userAgent;
    var msie = ua.indexOf ( "MSIE " );
    var verIE = parseInt(ua.substring (msie+5, ua.indexOf (".", msie )));
    var isIE = navigator.appVersion.indexOf("MSIE");
    var isNav = navigator.appVersion.indexOf("Nav");
    var supportAll = (document.all != null);


    // For debug...  
    //document.write("detected version=", verIE);
    //document.write("detected msie  =", msie);
    //document.write("detected isNav =", isNav);
    //document.write("supportAll =", supportAll);

    // Is the all collection supported
    // supportAll assigned true if supported
    // else assigned false

    if (supportAll > 0)  
    {
        // Check for older versions of IE
        if(( msie > 0 ) && (verIE < 6))
        {
           alert("You need a higher version IE browser for this site to display properly!\nUse IE 6.0 for optimal results.");
        }
    }    
    else  //Not all the capabilities are supported ( T: >0, F: <0)
    {
        //Is it IE and at least version 6.0 - Note: this may be extraneous
        if((isIE>0) && (verIE<6)){
           alert("You need a higher version IE browser for this site to display properly!");
        }
        //Is it Navigator and at least version 4.0
        if((isNav>0) && (verNav<=4)){
            alert("You need a higher version Navigator browser for this site to display properly!");
        }
        //alert("Some portions of this site may not display properly.\nUse IE 6.0 for optimal results.");   
    }
    if ((supportAll == false) && (msie < 0))
    {
        document.write('<STYLE type=text/css>DIV#navbar{TEXT-ALIGN: center;}</STYLE>');
        document.write('<STYLE type=text/css>DIV#navbar{PADDING-TOP: 0px;}</STYLE>');
        document.write('<STYLE type=text/css>DIV#navbar{PADDING-LEFT:7px;}</STYLE>');
        document.write('<STYLE type=text/css>DIV#navbar{FONT-SIZE: 14px;}</STYLE>');
        document.write('<STYLE type=text/css>DIV#navbar{FONT-FAMILY: "Arial Narrow", serif;}</STYLE>');
        document.write('<STYLE type=text/css>DIV#navbar LI A{PADDING-TOP: 7px;}</STYLE>');
        document.write('<STYLE type=text/css>DIV#navbar LI A{PADDING-LEFT: 17px;}</STYLE>');
        document.write('<STYLE type=text/css>DIV#navbar LI A{PADDING-RIGHT: px;}</STYLE>');
        document.write('<STYLE type=text/css>DIV#navbar LI A{PADDING-BOTTOM: 7px;}</STYLE>');
    }
}

function IEVer5() 
{
    var ua = window.navigator.userAgent;
    var msie = ua.indexOf ( "MSIE " );
    var verIE = parseInt(ua.substring (msie+5, ua.indexOf (".", msie )));
    var isIE = navigator.appVersion.indexOf("MSIE");

    // For debug...  
    //document.write("detected IE version=", verIE);
    //document.write("detected msie  =", msie);
 
    // Check for older versions of IE
    if(msie > 0) 
    {
        if (verIE == 5)
        {
            document.write('<STYLE type=text/css>DIV#navbar LI A {WIDTH: 100px;PADDING-TOP: 2px;PADDING-BOTTOM: 2px;TEXT-ALIGN:CENTER}</STYLE>');
            document.write('<STYLE type=text/css>DIV#navbar UL {PADDING-BOTTOM: 0px; TEXT-ALIGN:CENTER}</STYLE>');
            document.write('<STYLE type=text/css>DIV#msgboxtitle P{ {WIDTH: 90%}</STYLE>');
            document.write('<STYLE type=text/css>DIV#msgboxtext P{{WIDTH: 90%}</STYLE>');
        }
    }
}

// Not used
function IEVer5Fr() {
    var ua = window.navigator.userAgent;
    var msie = ua.indexOf ( "MSIE " );
    var verIE = parseInt(ua.substring (msie+5, ua.indexOf (".", msie )));
    var isIE = navigator.appVersion.indexOf("MSIE");

    // For debug...  
    //document.write("detected IE version=", verIE);
    //document.write("detected msie  =", msie);
 
    // Check for older versions of IE
    if( msie > 0 ) {
        if (verIE == 5){
            document.write('<STYLE type=text/css>DIV#navbar LI A {WIDTH: 119px;MARGIN-LEFT:-10px;MARGIN-RIGHT:-10px;PADDING-TOP: 2px;PADDING-BOTTOM: 2px;TEXT-ALIGN:CENTER}</STYLE>');
            document.write('<STYLE type=text/css>DIV#navbar UL {PADDING-BOTTOM: 0px;TEXT-ALIGN:CENTER}</STYLE>');
            document.write('<STYLE type=text/css>DIV#msgboxtitle P{ {WIDTH: 98%}</STYLE>');
            document.write('<STYLE type=text/css>DIV#msgboxtext P{WIDTH: 95%}</STYLE>');
            document.write('<STYLE type=text/css>DIV#shadowbox1title P{WIDTH: 90%}</STYLE>');
            document.write('<STYLE type=text/css>DIV#shadowbox1text P{WIDTH: 90%}</STYLE>');
            document.write('<STYLE type=text/css>DIV#navbar{MARGIN-LEFT:2px;MARGIN-RIGHT:2px}</STYLE>');
        }
    }
}

// Not used
function IEVer5Ja() {
    var ua = window.navigator.userAgent;
    var msie = ua.indexOf ( "MSIE " );
    var verIE = parseInt(ua.substring (msie+5, ua.indexOf (".", msie )));
    var isIE = navigator.appVersion.indexOf("MSIE");

    // For debug...  
    //document.write("detected IE version=", verIE);
    //document.write("detected msie  =", msie);
 
    // Check for older versions of IE
    if( msie > 0 ) {
        if (verIE == 5){
            document.write('<STYLE type=text/css>DIV#navbar LI A {WIDTH: 100px;PADDING-TOP:4px;PADDING-BOTTOM: 4px; TEXT-ALIGN:CENTER}</STYLE>');
            document.write('<STYLE type=text/css>DIV#navbar UL {PADDING-BOTTOM: 0px; TEXT-ALIGN:CENTER}</STYLE>');
            document.write('<STYLE type=text/css>DIV#msgboxtitle P{ {WIDTH: 90%}</STYLE>');
            document.write('<STYLE type=text/css>DIV#msgboxtext P{WIDTH: 90%}</STYLE>');
        }
    }
}

detBrowSupp();
