//*---------------------------------------------------
// FLASH & DHTML DETECTION
//--------------------------------------------------*/

var flash4Installed = 0;


// check the browser
var uAgent = navigator.userAgent.toLowerCase();
var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;		// true if we're on ie
var isIE4 = document.all ? true:false;						// true if we're on ie4 or higher
var isNS4 = document.layers ? true:false;					// true if we're on ns4
var isNS6 = (!document.all && document.getElementById) ? true : false;		// true if we're on ns6
var isOpera = uAgent.indexOf("opera") > 0;					// true if we're on Opera
var isWebTV = uAgent.indexOf("webtv") > 0;					// true if we're on WebTV
var isWin = (navigator.appVersion.indexOf("Windows") != -1) ? true : false; 	// true if we're on windows


// test for showing DHTML scrollers
if (isWin && !isOpera && !isWebTV && ((isIE && isIE4) || isNS6)) {
  var showScroller = true;
} else {
  var showScroller = false;
}


// only IE and Win
if(isIE && isWin){
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('flash4Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) \n');
	document.write('</SCR' + 'IPT\> \n');
}


function detectFlash(){	
	if (navigator.plugins){
		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)) >= 4) {
			flash4Installed = 1;
		}
	}	
}


detectFlash();