$(document).ready(function() {
	if ($('#disclaimer').length > 0) {
		showOverlay();
		
		var cgvsize = $('#cgu_content').height() - $('#cgu_contentlimit').height();
		
		$("#cgu_slider").slider({
			orientation: "vertical",
			range: "min",
			min: 0,
			max: 100,
			value: 100,
			slide: function(event, ui) {
				var bloctop = cgvsize - Math.round(ui.value * cgvsize / 100);
				$('#cgu_content').css('top', '-' + bloctop + 'px');
			}
		});
	}

	$('#userlogin, #userpass').bind('click focus',function(){
		//alert('test');
		$(this).val('');
	});
	
	setTimeout('stayAlive()', 300000);
	
});

function showOverlay()
{
	$("#my_overlay").css({'display': 'block', 'width': $(window).width(), 'height': $(document).height(), 'opacity': 0.6});
}

function stayAlive()
{
	$.get(fw_Path + '/fr/alive/index.html');
	setTimeout('stayAlive()', 300000);
}
