/* ==================================================== */
/*
	browserchecks
	
		IS_MOZ
		IS_IE
		IS_SAFARI
		
		IS_OPERA
		
		IS_WIN
			VERSION_IS
		IS_MAC
			IS_OSX
*/
/* ==================================================== */
var inCMSMode;

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)
		{  
			VERSION_IS = parseFloat(user.userAgent.split("MSIE")[1].split(";")[0]);
		}
	}
	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);
	}
}	

// ==========================================================

if(IS_MAC && IS_IE)
{
	document.writeln("<style>");
	document.writeln("	html{height:auto;}");
	document.writeln("	body {background-color:#FFF;}");
	document.writeln("	.container {display:none;}");
	document.writeln("	body .ie52 {display:block;padding:100px;line-height:1.6em;} ");
	document.writeln("</style>");
	
}
if(IS_MAC) {
	document.writeln("<style>");
	document.writeln("	html{height:auto;}");
	document.writeln("	body {background-color:#F60;}");
	document.writeln("	.container {display:block;}");
	document.writeln("	body .ie52 {display:none;} ");
	document.writeln("	.contactFleur li {padding-top:3px;}");
	document.writeln("</style>");
}
if(IS_MAC && IS_SAFARI)
{
	document.writeln("<style>");
	document.writeln("	body .w30 {width:87px;} ");
	document.writeln("	.contactFleur li {padding-top:2px;}");
	document.writeln("</style>");
	
}
// ==========================================================



var oldImg = '';
	var currActive = '';

	function swapImg(elem, newID, upDisplayStyle){
		if (!upDisplayStyle) upDisplayStyle = 'block';
		if (document.getElementById(newID)){
			if (oldImg){
				oldImg.style.display = 'none';
			}
			document.getElementById(newID).style.display = upDisplayStyle;
			oldImg = document.getElementById(newID);
		}else{
			alert('Image not found!!');
		}
	}
	
	function keepActive(elem, className){
		if (currActive){
			currActive.className = currActive.oldClass;
		}	
		currActive = elem;
		currActive.oldClass = elem.className;
		elem.className = className;
	}

/* ====================================================================== */
/* ======       MOUSE-OVER						       ================== */
/* ====================================================================== */

function mOver(aObj){
	imgObj = aObj.getElementsByTagName('img');
	
	imgObj[0].src = imgObj[0].src.replace("_normal.","_over.");
	
	aObj.onmouseout = function()
	{
		imgObj[0].src = imgObj[0].src.replace("_over.","_normal.");
	}
}
function mOverButton(inpObj){
	
	inpObj.src = inpObj.src.replace("_normal.","_over.");
	
	inpObj.onmouseout = function()
	{
		this.src = this.src.replace("_over.","_normal.");
	}
}
function mActive(aObj){
	imgObj = aObj.getElementsByTagName('img');
	
	imgObj[0].src = imgObj[0].src.replace("_normal.","_active.");
	
	aObj.onmouseout = function()
	{
		imgObj[0].src = imgObj[0].src.replace("_active.","_normal.");
	}
}
