

/*  
Script made by Martial Boissonneault © 2001-03 http://getElementById.com/
This script may be used and changed freely as long as this msg is intact
Visit http://getElementById.com/ for more free scripts and tutorials.
*/
var ie5= (document.getElementById && document.all);
var ns6= (document.getElementById && !document.all);

// is it the home page, if so show a different pixel position for the MenuTop
var MenuTop = (location.href.match(/fuseaction/)) ? 122 : 454;// menu top position
var MenuLeft = 800;  // how much your menu slides in and out
var Menu2Left = 150;  // how much your menu slides in and out

var acceleration = 4  // how fast your menu accelerates as it slides in and out (smaller number is faster)
var speed = 10  // how fast your menu slides in and out (bigger number is faster)

var timerID1 = null;
var timerID2 = null;
var i=1;
var j=1;
    
function statik(){
	if(ie5){
    		document.getElementById('menu').style.top = document.body.scrollTop + MenuTop;
    		document.getElementById('menu2').style.top = document.body.scrollTop + MenuTop;
    	} 
    	if(ns6){
    		document.getElementById('menu').style.top = window.pageYOffset + MenuTop;
    		document.getElementById('menu2').style.top = window.pageYOffset + MenuTop;
    	}
}

function changeBG(obj, bgColor) {
   	if(ie5 || ns6){
	    	obj.style.backgroundColor = bgColor;
	}
}

function slideIn(i){
	if(ie5 || ns6){
        thisInterval=acceleration / (i/15);
		if(parseInt(document.getElementById('menu').style.left) < 0){
            i++;
			clearTimeout(timerID2);
			document.getElementById('menu').style.left = parseInt(document.getElementById('menu').style.left) + speed + "px";
            if(parseInt(document.getElementById('menu2').style.left) < 20){
                document.getElementById('menu2').style.left = parseInt(document.getElementById('menu2').style.left) + 1 + "px";
            }
			timerID1=setTimeout("slideIn('"+i+"')", thisInterval);
		}
	}
}

function slideOut(j){
	if(ie5 || ns6){
        thisIntervalout=acceleration / (j/15);
		if(parseInt(document.getElementById('menu').style.left) > -MenuLeft){
            j++;
			clearTimeout(timerID1);
			document.getElementById('menu').style.left = parseInt(document.getElementById('menu').style.left) - speed + "px";
            if(parseInt(document.getElementById('menu').style.left) > -MenuLeft){
                document.getElementById('menu2').style.left = parseInt(document.getElementById('menu2').style.left) - 1 + "px";
            }
			timerID2=setTimeout("slideOut('"+j+"')", thisIntervalout);
            //alert(document.getElementById('menu2').style.left);
		}
	}
}

function reDo(){ 
	if(ie5 || ns6){
		window.location.reload(); 
	}
}

function slideMenuInit(){
    	if(ie5 || ns6){
		document.getElementById('menu').style.visibility = "visible";
		document.getElementById('menu2').style.visibility = "visible";
		document.getElementById('menu').style.top = MenuTop;
		document.getElementById('menu2').style.top = MenuTop;
        //if((urlMatch = top.location.href.match(/loops\.main/)) != null || (urlMatch = top.location.href.match(/loops\.sat/)) != null) {
       // }
        //else {
            document.getElementById('menu').style.left = -10;
            document.getElementById('menu2').style.left = 20;
            slideIn('300');
       // }
	}
}


//window.onresize = reDo;
//setInterval ('statik()', 1);
