function ask_first(url, fraga)
{
	var val = '';
	val = confirm(fraga);

	if(val == true)								
		document.location = url;
		
	return;		
}

var foo = null; // object
var foo2 = null; // object
var i = -650;

function doMove(digit, max) 
{			
	if(max == 100) 
	{
		if(i >= max) 
		{
			foo.style.top = '50px';
		} 
		else 
		{
			foo.style.top = parseInt(foo.style.top)+digit+'px';
			setTimeout(function(){doMove(digit,max)},1); // call doMove in 20msec
			i += digit;
		}
	}
	else 
	{
		if(i <= max) 
		{
			foo.style.top = '-650px';
			foo2 = document.getElementById('main_meny_wrapper'); // get the "foo" object	  
			foo2.style.visibility = 'visible';	  
			fadebg(0, 'hidden');
			location.reload(true);
		} 
		else 
		{
			foo.style.top = parseInt(foo.style.top)+digit+'px';
			setTimeout(function(){doMove(digit,max)},1); // call doMove in 20msec
			i += digit;
		}  
	}
}

function init() 
{
	i = -650;
	foo = document.getElementById('admin'); // get the "foo" object
	//foo.style.left = -parseInt(<?=$settings[1]?>)/2+'px';
	foo.style.top = '-650px'; // set its initial position to 0px
	//doMove(15, 100); // start animating
	foo.style.top = '100px'; 	  
	foo2 = document.getElementById('main_meny_wrapper'); // get the "foo" object
	foo2.style.visibility = 'hidden';
	fadebg(80, 'visible');
}

function exit() 
{	  
	//doMove(-15, -650); // start animating 
	foo = document.getElementById('admin'); 
	foo2 = document.getElementById('main_meny_wrapper');
	foo.style.top = '-650px';
	foo2 = document.getElementById('main_meny_wrapper'); // get the "foo" object	  
	foo2.style.visibility = 'visible';	  
	fadebg(0, 'hidden');
	location.reload(true);
	//foo = document.getElementById('admin'); // get the "foo" object
	//foo.style.top = '-650px'; // set its initial position to 0px 				  
}

function resize(rWidth, rHeight) 
{
	foo.style.width = rWidth+'px';
	foo.style.height = rHeight+'px';
	foo.style.left = -parseInt(rWidth)/2+'px';
}

function fadebg(opacity, vis) 
{	
	var opacity = opacity;
	var id = "release_me";
	var object = document.getElementById(id).style; 
	object.visibility = vis;
	object.opacity = (opacity / 100); 
	object.MozOpacity = (opacity / 100); 
	object.KhtmlOpacity = (opacity / 100); 
	object.filter = "alpha(opacity=" + opacity + ")"; 			
}
