// JavaScript Document
// Written by Vithal_Cvl
// Do some browser checks
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)); 
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_nav5 = (is_nav && (is_major == 5)); 
var is_nav5up = (is_nav && (is_major >= 5)); 
var is_ie = (agt.indexOf("msie") != -1); 
var is_ie3 = (is_ie && (is_major < 4)); 
var is_ie4 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")==-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_ie5up = (is_ie && !is_ie3 && !is_ie4);
var is_mac = (agt.indexOf("mac")!=-1)



// Check if Shockwave-Flash Plugin is installed (Navigator only)
var ShockMode = false;
if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) {
     if (navigator.plugins && navigator.plugins["Shockwave Flash"])
          ShockMode = true;
}


function Flash(flash, img, width, height, bgCol) {
     this.s = "";
     if (((is_nav3 || is_nav4up) && ShockMode) || (is_ie4up && is_mac)) {
          this.s += "<embed";
          this.s += " src=\"" + flash + "\"";
          this.s += " swLiveConnect=false";
          this.s += " width=" + width;
          this.s += " height=" + height;
          this.s += " bgcolor=" + bgCol;
          this.s += " quality=autohigh";
          this.s += " type=\"application/x-shockwave-flash\"";
          this.s += " pluginspace=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\"";
          this.s += ">";
          this.s += "</embed>";
     }
     else if (is_ie4up) {
          this.s += "<object ";
          this.s += " classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"";
          this.s += " codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\"";
          this.s += " id=overview-bikes";
          this.s += " width=" + width;
          this.s += " height=" + height;
          this.s += ">";
          this.s += "<param name=movie value=\"" + flash + "\">";
          this.s += "<param name=quality value=autohigh>";
          this.s += "<param name=bgcolor value=" + bgCol + ">";
          this.s += "</object>";
     }
     else {
          this.s += "<img";
          this.s += " src=\"" + img + "\"";
          this.s += " width=" + width;
          this.s += " height=" + height;
          this.s += " border=0";
          this.s += ">";
     }
}

Flash.prototype.print = function () { document.write(this.s); }



// File config
var f = "homeHeader.swf";
var i = "image/homeFlash.jpg";
var w = 775;
var h = 168;
var c = "#747474";

// Create an instace of Flash...
var anim = new Flash(f,i,w,h,c);

// and print it to the document
anim.print(); 
