/*PARAMETERS ===START===*/
/*you can change the values here*/

var delay_timer=2000;//this value is in milliseconds; increase this to get a longer time before the slider appears
var slide_speed=2;//if you set it to 10, the slide effect will be twice as fast; if set to 15, it will be three times faster;
var slider_height=220;//the slider's height in px
/*PARAMETERS ===END===*/



/*PLEASE DO NOT CHANGE AFTER THIS LINE*/
////////////////////////////////////////////////////

var slider_container_height=0;
var scrollTop=0;
var timer=null;
var menu_closed=false;
var effect_on_scroll='scroll';

window.onload =callSlideIn;//attach the onload event

function callSlideIn(){
//this function sets in position the slider and prepaires the sliding effect
	
	slider_container_height=0;
	scrollTop=0;
	timer=null;
	menu_closed=false;
		
	document.getElementById("slider_container").style.height="0px";	
	slider_container_height=slider_height;	
	document.getElementById("slider_container").style.visibility="visible";
	//document.getElementById("slider_container").style.display="block";
	setTimeout("slideIn(0)",delay_timer);
}

function slideIn(amount){
//this function generates the sliding effect to display the slider in page

	clearTimeout(timer);
	
	if(amount<slider_container_height)
		{
		
			document.getElementById("slider_container").style.height=amount+"px";
			amount=amount+slide_speed;
			setTimeout("slideIn("+amount+")",15)
		}
}

function closeSlider(amount){
//this function generates the sliding effect to remove the slider from page
	if(amount>0)
		{
			document.getElementById("slider_container").style.height=amount+"px";
			amount=amount-slide_speed;
			setTimeout("closeSlider("+amount+")",15)
		}
	else	
		{
			document.getElementById("slider_container").style.display="none";
			document.getElementById("slider_container").style.height="0px";
		}
	menu_closed=true;
}
