if (document.images) {

var mainoff = new Image; mainoff.src = "images/main_off.gif";
var mainon = new Image; mainon.src = "images/main_on.gif";
var prooff = new Image; prooff.src = "images/pro_off.gif";
var proon = new Image; proon.src = "images/pro_on.gif";
var comoff = new Image; comoff.src = "images/com_off.gif";
var comon = new Image; comon.src = "images/com_on.gif";
var peroff = new Image; peroff.src = "images/per_off.gif";
var peron = new Image; peron.src = "images/per_on.gif";
var lhoff = new Image; lhoff.src = "images/lh_off.gif";
var lhon = new Image; lhon.src = "images/lh_on.gif";
var quoff = new Image; quoff.src = "images/qu_off.gif";
var quon = new Image; quon.src = "images/qu_on.gif";
var stoff = new Image; stoff.src = "images/st_off.gif";
var ston = new Image; ston.src = "images/st_on.gif";
var ctoff = new Image; ctoff.src = "images/ct_off.gif";
var cton = new Image; cton.src = "images/ct_on.gif";

}

function rollover(imgName, target) {
  if (document.images) {
    imgchange = eval(imgName + '.src');
    document[target].src = imgchange;
    }
}

/*
.----------------------------------------------------------------.
| BROWSER DETECTION FOR MULTIPLE FLASH IMAGES                    |
|================================================================|
| Convert all characters to lowercase to simplify testing;       |
| Parse the version / agent name to determine browser            |
`----------------------------------------------------------------'
*/
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 ns = (navigator.appName == 'Netscape');
var ns5 = (ns && parseInt(navigator.appVersion) >= 5 && parseInt(navigator.appVersion) < 6);

var is_aol   = (agt.indexOf("aol") != -1); 
var is_aol3  = (is_aol && is_ie3); 
var is_aol4  = (is_aol && is_ie4); 
var is_mac    = (agt.indexOf("mac")!=-1);

// END BROWSER DETECTION

var flashimage, flashfilm, flashid;
var flashheight, flashwidth, flashbgcolor, flashloop;

function flash(thefilm, theimage, theid, thewidth, theheight, thebgcolor, theloop) {
	if (is_mac && (is_ie && !is_ie5up)) { 
		document.write('<IMG SRC="' + theimage + '" WIDTH="' + thewidth + '" HEIGHT="' + theheight + '" BORDER=0>'); 
	} else {
		var objstr = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
			+ ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"'
			+ ' ID="' + theid + '" WIDTH="' + thewidth + '" HEIGHT="' + theheight + '" hspace="0" vspace="0" alt="">'
			+ ' <PARAM NAME="movie" VALUE="' + thefilm + '">'
			+ ' <PARAM NAME="loop" VALUE="' + theloop + '">'
			+ ' <PARAM NAME="quality" VALUE="high">'
			+ ' <PARAM NAME="menu" VALUE="false">'
		document.write (objstr);
		var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
		if ( plugin && parseInt(plugin.description.substring(plugin.description.indexOf(".")-1)) >= 3 ) {
			// Check for Flash version 4 or greater in Netscape
			document.write('<EMBED src="' + thefilm + '" loop="' + theloop + '" quality=high bgcolor="' + thebgcolor + '" ');
			document.write(' swLiveConnect=FALSE WIDTH="' + thewidth + '" HEIGHT="' + theheight + '" hspace="0" vspace="0" alt=""');
			document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>');
		} 
		document.write('</OBJECT>');
	}
}

