<!--

// START FLASH DETECTION


function detectFlashPlayer(){

pluginFound      = false     // Determines if the latest version of the plugin is installed
activeXFound     = false     // Determines if the latest version of the ActiveX is installed

flashSupportedVersion    = 6    // Supported version for Flash plugin and ActiveX
latestFlashVersion       = 7    // Latest Flash version available

// If this Microsoft Internet Explorer 4.5 for Macintosh, plugins detection is impossible
plgIe4Mac = false
if (navigator.appVersion.indexOf("PPC")!=-1 && navigator.userAgent.indexOf("MSIE 4")!=-1) {plgIe4Mac = true}

// Check if it's an IE Windows Browser
plgIeWin = false
if ( (navigator.userAgent.indexOf('MSIE') != -1) && (navigator.userAgent.indexOf('Win') != -1) ) {plgIeWin = true}

// Determines if the latest version of Flash is installed
// requiredVersion : user may pass a specific version
function getFlash(requiredVersion) {

	// If IE4 Mac, plugins can't be detected
	if(plgIe4Mac) {return false}
	
	// User version overrides default version
	if (typeof(requiredVersion)!="undefined") {flashSupportedVersion = requiredVersion}

	// Make sure it's a string
	flashSupportedVersion+=""
	
	// Check if the supported version of the plugin or upper is installed
	plugInFound = false
	
	// Check if the lastest version of the plugin is supported
	checkedVersion  = flashSupportedVersion
	isLatestVersion = checkedVersion == latestFlashVersion

	while (!plugInFound) {
		
		plugInFound = getPlugIn("Shockwave","Flash",checkedVersion)
		
		// If we've just checked the lastest existing plugin version, drop the search
		if (isLatestVersion) {break}
		
		// If we've just checked an old version, search for a newer plugin
		if (!isLatestVersion) {
			checkedVersion++
			isLatestVersion = checkedVersion == latestFlashVersion
		}
	}
	
	// Test if ActiveX is installed
	// Caution : successive ActiveX players can cohabit on the same machine (ShockwaveFlash.ShockwaveFlash.4,ShockwaveFlash.ShockwaveFlash.5 etc ...)
	if (plgIeWin) {activeXFound = getIEComponent("D27CDB6E-AE6D-11cf-96B8-444553540000",flashSupportedVersion)}

	// Send back test result
	return true; //the checks didn't works out
	if (plugInFound || activeXFound) {return true} else {return false}
}


// Parse plugins collection with strings to find
// User has to pass strings to be found in plugin name and description
// Ex. "Shockwave","Flash","5"
function getPlugIn() {

	// search for the right plugin among all those have been installed
	allFound = false
    plugInsCollection = navigator.plugins
	
	for (i=0;i<plugInsCollection.length;i++) {

		// Get plugin description
        plugInDescription = " " + plugInsCollection[i].description
		plugInName = " " + plugInsCollection[i].name
		
		for (j=0;j<arguments.length;j++) {
		
			if (plugInDescription.indexOf(" " + arguments[j])!=-1 || plugInName.indexOf(" " + arguments[j])!=-1) {
				allFound = true
			} else {
				allFound = false
				break
			}
		}
		
		// Send back the search result
		if (allFound) {return true}
    }

	// Send back the search result
	return false
}

// Use the Client Capabilities behavior to check IE component installation
function getIEComponent(activeXClsId,minVersion) {
	if (plgIeWin) {return document.body.isComponentInstalled("{" + activeXClsId + "}","componentId",minVersion)} else {return false}
}

// Add Client Capabilities behavior to the document body - Must be done at load time
if (plgIeWin) {
	document.body.addBehavior("#default#clientCaps")
}

	return getFlash();
}
// END FLASH DETECTION

// START FLASH SCRIPTS

var frameNum = Math.floor(Math.random()*3);

function printIntro(){
	if (isIE || isMozilla || isNS72){
		document.write('<div id="introDiv" style="position:absolute; left:0px; top:0px; width:100%; height:100%; z-index:100; border: 0px;">');
		document.write('<object id="intro" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100%" height="100%">');
		document.write('<param name="movie" value="img/intro.swf"><param name="quality" value="high"><param name="menu" value="false"><param name="wmode" value="transparent"><param name="SCALE" value="exactfit"><embed name="intro" src="img/intro.swf" width="100%" height="100%" quality="high" swliveconnect="true" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" menu="false" scale="exactfit"></embed>');
		document.write('</object>');
		document.write('</div>');
	}
}

function printMain(){
	if(isFlash || !(isIE || isMozilla || isNS72)){ 
		document.write('<object id="mainFlash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="749" height="180">');
		document.write('<param name="movie" value="img/main.swf"><param name="quality" value="high"><param name="menu" value="false"><param name="wmode" value="transparent">');
		document.write('<embed name="mainFlash" src="img/main.swf" width="749" height="180" quality="high" swliveconnect="true" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" play="false"></embed>');
		document.write('</object>');
	} else {
		document.write('<img src="img/sec_fp' + (frameNum + 1)+ '.gif">');
	}
}

var introFlash;
var introLayer;
var mainFlash;
var logoGif;

var isIE = (navigator.userAgent.indexOf("MSIE") > -1) ? true : false;
var isMozilla = ((navigator.userAgent.indexOf("Mozilla") > -1) && (navigator.userAgent.indexOf("Netscape") == -1)) ? true : false;
var isNS72 = (navigator.userAgent.indexOf("Netscape/7.2") > -1) ? true : false;
//var isIE = (navigator.appName.indexOf("Microsoft") != -1) ? true : false;

function initIntro(){
	if (!isFlash || !(isIE || isMozilla || isNS72) ) return; 
	introFlash =  (isIE) ? document.intro : window.document.intro;
	introLayer =  (isIE) ? document.all['introDiv'] : document.getElementById('introDiv');
	mainFlash =  (isIE) ? document.mainFlash : window.document.mainFlash;
	logoGif = (isIE) ? document.all['logoImg'] : document.getElementById('logoImg');
	
	if (introFlash){
		logoGif.style.visibility = "hidden";
		introFlash.SetVariable("w", document.body.clientWidth);
		introFlash.SetVariable("h", document.body.clientHeight);
		introFlash.Play();
	}
	
	if (mainFlash ) { //|| !(isIE || isMozilla || isNS72)){
		frameArray = [0, 146, 290];
		mainFlash.GotoFrame(0);
		mainFlash.Play();
	}
	
	if (!introFlash && document.getElementById('divmain')){
		document.getElementById('divmain').style.visibility='visible';
	}
	
	if ((isMozilla || isNS72) && introFlash && !isIE){
		while(introFlash.PercentLoaded() < 100){}
		setTimeout('hideIntro()', 4050);
	}
	
	
}

function hideIntro(){
	if (!isFlash || !(isIE || isMozilla || isNS72)) return; 
	if (introLayer) {
		if (isIE){
			introLayer.style.clip = "rect(0 300 70 0)";
		} else {
			introLayer.style.visibility = 'hidden';
			switchLogo();
		}
		document.getElementById('divmain').style.visibility='visible';
	}

	if (mainFlash) mainFlash.Play();
}

function switchLogo(){
	if (!isFlash || !(isIE || isMozilla || isNS72)) return; 

	if (introLayer) introLayer.style.visibility = "hidden";
	logoGif.style.visibility = "visible";
}





// END FLASH SCRIPTS
//document.all['intro']
//-->