// Ripple Effects Interactive - 2004

// -----------------------------------------------------------------
// -----------------------------------------------------------------


// get browser window height to stretch layout 
// table the full height of the browser window.
// if for any reason this isn't working as expected, 
// make sure the doctype of your html pages are correct:
// <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
//        "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">

// Note: script does NOT work for: IE Mac, and IE 5/5.5 win.


var winH = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
   winH = window.innerHeight;
  } else {
    if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode'
      winH = document.documentElement.clientHeight;
    } else { if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible
       
        winH = document.body.clientHeight;
      }
    }
  }
  
// un-comment the alert below for testing browser height:
// alert(winH);

// -----------------------------------------------------------------
// -----------------------------------------------------------------

// -----------------------------------------------------------------
// -----------------------------------------------------------------

//flash detection
// looks for version 6 or above

var flashinstalled = 0;
var flashversion = 0;
MSDetect = "false";
if (navigator.plugins && navigator.plugins.length)
{
    x = navigator.plugins["Shockwave Flash"];
    if (x)
    {
        flashinstalled = 2;
        if (x.description)
        {
            y = x.description;
            flashversion = y.charAt(y.indexOf('.')-1);
            if(flashversion < 6)
            { // Set desired flash version here
                flashinstalled = 1;
            }
        }
    }
    else
        flashinstalled = 1;
    if (navigator.plugins["Shockwave Flash 6.0"])
    {
        flashinstalled = 2;
        flashversion = 2;
    }
}
else if (navigator.mimeTypes && navigator.mimeTypes.length)
{
    x = navigator.mimeTypes['application/x-shockwave-flash'];
    if (x && x.enabledPlugin)
        flashinstalled = 2;
    else
        flashinstalled = 1;
}
else
    MSDetect = "true";

// -----------------------------------------------------------------
// -----------------------------------------------------------------

// -----------------------------------------------------------------
// -----------------------------------------------------------------

var detect = navigator.userAgent.toLowerCase();
var OS,browser,version,total,thestring;

if (checkIt('konqueror'))
{
        browser = "Konqueror";
        OS = "Linux";
}
else if (checkIt('safari')) browser = "safari"
else if (checkIt('omniweb')) browser = "omniweb"
else if (checkIt('opera')) browser = "opera"
else if (checkIt('webtv')) browser = "webtv";
else if (checkIt('icab')) browser = "icab"
else if (checkIt('msie')) browser = "ie"
else if (!checkIt('compatible'))
{
        browser = "netnav"
        version = detect.charAt(8);
}
else browser = "An unknown browser";

if (!version) version = detect.charAt(place + thestring.length);

if (!OS)
{
        if (checkIt('linux')) OS = "Linux";
        else if (checkIt('x11')) OS = "Unix";
        else if (checkIt('mac')) OS = "Mac"
        else if (checkIt('win')) OS = "Windows"
        else OS = "an unknown operating system";
}

function checkIt(string)
{
        place = detect.indexOf(string) + 1;
        thestring = string;
        return place;
} 