function $(e){
	return document.getElementById(e)
}
function MM_preloadImages(){
	var d=document
	if(d.images){
			if(!d.MM_p)
				d.MM_p=new Array()
		var i,j=d.MM_p.length,a=(arguments?arguments:MM_preloadImages.arguments);
		for(i=0;i<a.length;i++)
			if(a[i].indexOf("#")!=0){
				d.MM_p[j]=new Image
				d.MM_p[j++].src=a[i]
			}
	}
}
function sfhover()
{
	if(document.getElementById("m_main"))
	{
		var sfEls = document.getElementById("m_main").getElementsByTagName("LI");
		for (var i=0; i<sfEls.length; i++) {
			this.className+=" sfhover";
/*			sfEls[i].onmouseover=function() {
				
			}
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			}*/
		}
	}
}
function init() {
	MM_preloadImages('../images/bgr_header_home.png',
		'../images/bgr_header_entartainment.png',
		'../images/bgr_header_fashion.png',
		'../images/bgr_header_handler.png',
		'../images/bgr_header_stones.png')
	if($('m_home')){
		$('m_home').onmouseover=function() {
			$('m_home').style.color='#1a171b'
			$('menu').style.backgroundImage='url(images/bgr_header_home.png)'
		}
		$('m_home').onmouseout=function() {
			$('m_home').style.color='#d6d700'
			$('menu').style.backgroundImage='url(images/bgr_header.png)'
		}
	}
	if($('m_fashion')){
		$('m_fashion').onmouseover=function() {
			$('m_home').style.color='#d6d700'
			$('m_fashion').style.color='#1a171b'
			$('menu').style.backgroundImage='url(images/bgr_header_fashion.png)'
		}
		$('m_fashion').onmouseout=function() {
			$('m_fashion').style.color='#d6d700'
			$('menu').style.backgroundImage='url(images/bgr_header.png)'
		}
	}
	if($('m_stones')){
		$('m_stones').onmouseover=function() {
			$('m_home').style.color='#d6d700'
			$('m_stones').style.color='#1a171b'
			$('menu').style.backgroundImage='url(images/bgr_header_stones.png)'
		}
		$('m_stones').onmouseout=function() {
			$('m_stones').style.color='#d6d700'
			$('menu').style.backgroundImage='url(images/bgr_header.png)'
		}
	}
	if($('m_entert')){
		$('m_entert').onmouseover=function() {
			$('m_home').style.color='#d6d700'
			$('m_entert').style.color='#1a171b'
			$('menu').style.backgroundImage='url(images/bgr_header_entartainment.png)'
		}
		$('m_entert').onmouseout=function() {
			$('m_entert').style.color='#d6d700'
			$('menu').style.backgroundImage='url(images/bgr_header.png)'
		}
	}
	if($('m_handler')){
		$('m_handler').onmouseover=function() {
			$('m_home').style.color='#d6d700'
			$('m_handler').style.color='#1a171b'
			$('menu').style.backgroundImage='url(images/bgr_header_handler.png)'
		}
		$('m_handler').onmouseout=function() {
			$('m_handler').style.color='#d6d700'
			$('menu').style.backgroundImage='url(images/bgr_header.png)'
		}
	}
}
window.onload=init
sfHover = function() {
	var sfEls = document.getElementById("m_main").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

