function initPage()
{
	var nav = document.getElementById("nav");
	if (nav)
	{
		var nodes = nav.getElementsByTagName("li");
		for (var i = 0; i < nodes.length; i++)
		{
			nodes[i].onmouseover = function () 
			{
				if (this.className.indexOf("hover") == -1)
				{
					this.className += " hover";
				}
			}
			nodes[i].onmouseout = function ()
			{
				this.className = this.className.replace(" hover", "");
			}
		}
	}
}
if (window.attachEvent && !window.opera)
	window.attachEvent("onload", initPage);
	
function detectSafari(){ 
if (navigator.appVersion.indexOf("Safari") != -1) 
   document.body.className += " safari"; 

if (navigator.appVersion.indexOf("Mac") != -1) 
   document.body.className += " mac-safari"; 

} 

if (window.addEventListener) 
   window.addEventListener("load", detectSafari, false);

function initPage2()
{
	var nav = document.getElementById("nav2");
	if (nav)
	{
		var nodes = nav.getElementsByTagName("li");
		for (var i = 0; i < nodes.length; i++)
		{
			nodes[i].onmouseover = function () 
			{
				if (this.className.indexOf("hover") == -1)
				{
					this.className += " hover";
				}
			}
			nodes[i].onmouseout = function ()
			{
				this.className = this.className.replace(" hover", "");
			}
		}
	}
}

if (window.attachEvent && !window.opera)
	window.attachEvent("onload", initPage2);
	
	

function ff(){
	
	if((navigator.userAgent.indexOf('Mac')!= -1) && (navigator.userAgent.indexOf('Firefox/3')!= -1))
	{
		document.body.className += " firefox"; 
	}
}
if (window.addEventListener)
	window.addEventListener("load", ff, false);
	
	
function ff2(){
	if((navigator.userAgent.indexOf('Mac')!= -1) && (navigator.userAgent.indexOf('Firefox/2')!= -1))
	{
		document.body.className += " firefox2"; 
	}
}
if (window.addEventListener)
	window.addEventListener("load", ff2, false);	


function _opera(){
	if(window.opera)
	{
		document.body.className += " opera"; 
	}
}

if (window.attachEvent)
	window.attachEvent("onload", _opera);
	
	
function mac_opera(){
	if(window.opera)
	{
		document.body.className += " mac-opera"; 
	}
}

if ((navigator.userAgent.indexOf('Mac')!= -1) && (window.attachEvent))
	window.attachEvent("onload", mac_opera);
	