function _g(param_name)
{
	qstring = window.location.search.substring(1);
	allparams = qstring.split('&');
	for (j=allparams.length-1; j>=0; j--)
	{
		couple = allparams[j];
		couple = couple.split('=');
		if (couple[0] == param_name) return couple[1];
	}
	return false;
}

function in_array(needle, haystack)
{
	for (j=0; j<haystack.length; j++)
	{
		if (haystack[j] == needle) return true;
	}
	return false;
}


var lgs_arr = Array('fr','en','es','it');


function show_disclamer(){

	if (window.location.href.match(/[\?&]+fs=1/))
	{
		var loc = window.location.href;
		var new_url = "";
		new_url = loc;
		var sign = "?";
		if(window.location.href.match(/&fs=1/)) sign = "&";
		new_url = new_url.replace(/[\?&]+fs=1/,sign+"fs=0");
		loc = new_url;
		
		//pass the lg param to the disclaimer's template
		var lg = _g('lg'); 
		if(typeof lg == 'undefined' || !in_array(lg,lgs_arr)) lg = 'fr';
		
		var discl_location = "disclaimer.php?lg="+lg+"&ref="+escape(loc);
		var Param = {
				'width':670,'height':330,'autorun':0,'opacity':9,
				'url': discl_location
		};
		var DHTMLpop = initDHTMLpop(Param);
		var back = document.getElementById('innerpopup_background');
		// IE or FF
		if(document.all){
			back.style.filter = 'alpha(opacity=90)';
		}
		else{
			back.style.opacity=0.90;
		}
		//
		showHideInnerPopUp();
	}
}
 
