/* ======================================================= */
/*

browserchecks

IS_MOZ
IS_IE
IS_SAFARI

IS_OPERA

IS_WIN
	VERSION_IS
IS_MAC
	IS_OSX

*/

if(navigator)
{
	user = navigator;
	IS_MOZ = (user.appName.toLowerCase().indexOf("netscape") != -1);
	IS_IE = (user.appName.toLowerCase().indexOf("internet") != -1);
	IS_SAFARI = (user.userAgent.toLowerCase().indexOf("safari") != -1);
	
	IS_OPERA = (user.appName.toLowerCase() == "opera");
	
	if(user.userAgent.indexOf("Opera")>-1)
	{
		IS_IE = false;
		IS_OPERA = true;
	}
	// browser version
	if (user.appVersion)
	{  // don't try to parseInt a string (NA = "")
		VERSION_IS = parseInt(user.appVersion);
		if (IS_IE)
		{  
			IS_IE55 = false;
			VERSION_IS = parseFloat(user.userAgent.split("MSIE")[1].split(";")[0]);
			if(VERSION_IS==5.5)
			{
				IS_IE55 = true;
			}
			VERSION_IS = parseInt(VERSION_IS)
		}
	}
	if (user.userAgent && user.appVersion)
	{
		agt = user.userAgent.toLowerCase();  
		IS_WIN = ((agt.indexOf("win") != -1) || (agt.indexOf("16bit") != -1));
		IS_MAC = (agt.indexOf("mac") != -1);
		
		IS_OSX = IS_MAC && (agt.indexOf("os x") != -1);
	}
}	
/* ======================================================= */

HAS_FLASH7 = false;

if (IS_IE && IS_WIN) {
	document.write("<scri"+"pt type=\"text/vbscript\">\n");
	document.write("	on error resume next\n");
	document.write("	HAS_FLASH7 = (IsObject(CreateObject(\"ShockwaveFlash.ShockwaveFlash.7\")))\n");
	document.write("</scri"+"pt>\n");
}
else
{
	if (user.mimeTypes && user.mimeTypes["application/x-shockwave-flash"] && user.mimeTypes["application/x-shockwave-flash"].enabledPlugin) {
		if (user.plugins && user.plugins["Shockwave Flash"]){
			descr = user.plugins["Shockwave Flash"].description
		 	if(parseInt(descr.substr((descr.indexOf('Flash ')+6),1))>=7){
				HAS_FLASH7=true;
			}
		}
	}
}


// DEBUG
//HAS_FLASH7 = false;
//


/* ======================================================= */

function writeSWFheadAni()
{
	var HTML ="";
	
	if(HAS_FLASH7)
	{
		
		HTML += "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"726\" height=\"211\">\n";
		HTML += "   <param name=\"movie\" value=\"../swf/head_ani.swf\">\n";
		HTML += "   <param name=\"quality\" value=\"high\">\n";
		HTML += "   <param name=\"menu\" value=\"false\">\n";
		HTML += "	<param name=\"wMode\" value=\"transparent\">\n";
		HTML += "  <embed src=\"../swf/head_ani.swf\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"726\" height=\"211\">\n";
		HTML += "  </embed> \n";
		HTML += " </object>\n";
		
	}
	else
	{
		HTML += "<img src=\"../gfx/intro_groot.jpg\" width=\"726\" height=\"211\" alt=\"\" border=\"0\">";
	}
	
	document.write(HTML);
}

/* ======================================================= */

/* ======================================================= */

function swfOver(mc)
{
	swfElm = (document.getElementById("navMoz")) ? document.getElementById("navMoz") : document.getElementById("navIE");
	if ( swfElm )
	{
	   swfElm.TGotoLabel("/"+mc, "anim"); 
	   swfElm.TPlay("/"+mc); 
	}
}
