var ua = navigator.userAgent.toLowerCase();

var isNetscape = (ua.indexOf('netscape') != -1); 
var isSafari = (ua.indexOf('safari') != -1); 
var isMac = (navigator.appVersion.indexOf("Mac") != -1);
//var isGecko = (ua.indexOf("gecko") != -1);

/* IE 5 fixes */
/*@cc_on
if (!Function.prototype.call && !isMac)
{
	var center = function()
	{
		var c = document.getElementById('top');
		
		if (c.offsetTop>40) c.style.marginTop='-283px';
	}
	
	window.onload= center;
}
@*/

if (isNetscape)
{
	var fixes = function()
	{
		document.getElementById('ntp').style.top='135px';
		document.getElementById('nl').style.top='110px';
		document.getElementById('language').style.top='41px';
		document.getElementById('menu').style.top='14px';
		
		//degrade + footer
		var fcontent = document.getElementById('fluidContent');
		var footer = document.getElementById('centerFooter');
		footer.style.top=(fcontent.offsetTop+55)+'px';
		
		var ndb = document.getElementById('ndb');
		ndb.style.top=(footer.offsetTop-223)+'px';
		ndb.style.left='6px';
		
		footer.style.top=(fcontent.offsetTop+54)+'px';
	};
	
	window.onload = fixes;
}
else if (isSafari && !window.devicePixelRatio) // safari 2- seulement
{
	var fixes = function()
	{
		var search = document.forms["search"];
	
		var field = search.getElementsByTagName('INPUT')[0];
		field.style.width='84px';
		
		var button = search.getElementsByTagName('BUTTON')[0];
		
		button.style.marginBottom='-5px';
		button.style.padding='0';
		
		var sub = button.getElementsByTagName('SPAN')[0];

		sub.style.position='relative';
		sub.style.left='7px';
		sub.style.top='1px';

		var footer = document.getElementById('centerFooter');
		footer.style.height='98px';
	};

	window.onload = fixes;
}
/*
else if (isGecko)
{
	window.onload = function()
	{
		var links = document.getElementsByTagName('a');
		var i=0, lim = links.length, notfound=true;
		while (i<lim && notfound)
		{
			if (links[i].className=="link") notfound=false;
			i++;
		}
		links[i].onmouseover.call(links[i]);
		links[i].onmouseout.call(links[i]);
	};
} 
*/