window.addEvents({
	'domready':function(){
		$(document.body).getElements('div[id^=flyOver_nav_]').each(function(elm){
			$(elm).setStyles({'display':'none'});
			if(checkBrowser() != "IE"){
				$(elm).setStyles({'margin-top':'40px'});
			}
		});
	},
	'load':function(){
		$(document.body).getElements('a[id^=flyOver_tab_]').each(function(el){
			var tab_id = el.id.replace('flyOver_tab_','');
			$(el).addEvent('mouseover', function(event) {
				event = new Event(event).stop();
				showTabs(tab_id);
			});
		});
		if($('subContactForm')){
			$('subContactForm').addEvent('click',function(event){
				event = new Event(event).stop();
				$('form_contact').submit();
			});
		}
		$('flyOver_tab_3').setStyles({'background-position':'1px -37px'});
		$('menu').setStyles({'background-position':'0  -108px'});
	}
});

function showTabs(id){
	resetTabs();

	$('flyOver_tab_'+id).setStyles({'background-position':'0 -37px'});
	$('flyOver_nav_'+id).setStyles({'display':''});
	$('flyOver_tab_3').setStyles({'background-position':'1px -37px'});
}
function resetTabs(){
	$(document.body).getElements('div[id^=flyOver_nav_]').each(function(elm){
		var nav_id = elm.id.replace('flyOver_nav_','');
		$(elm).setStyles({'display':'none'});
		
		if(nav_id!=3)
			$('flyOver_tab_'+nav_id).setStyles({'background-position':'0 0'});
	});
}
function checkBrowser(){
	var c=navigator.appName;
	var b=navigator.appVersion;
	if(b.indexOf("MSIE")!=-1){
		return "IE";
	}else{
		return "MO";
	}
}
/*
window.addEvents({
	'domready':function(){
		$(document.body).getElements('div[id^=flyOver_nav_]').each(function(elm){
			$(elm).setStyles({'display':'none'});
			if(checkBrowser() != "IE"){
				$(elm).setStyles({'margin-top':'40px'});
			}
		});
	},
	'load':function(){
		$(document.body).getElements('a[id^=flyOver_tab_]').each(function(el){
			var tab_id = el.id.replace('flyOver_tab_','');
			$(el).addEvent('mouseover', function(event) {
				event = new Event(event).stop();
				$(document.body).getElements('div[id^=flyOver_nav_]').each(function(elm){
					var nav_id = elm.id.replace('flyOver_nav_','');
					if(tab_id==nav_id){
						$(elm).setStyles({'display':''});
					}else{
						$(elm).setStyles({'display':'none'});
					}

				});
			});
		});
	}
});
*/