	function correctPNG(){ // correctly handle PNG transparency in Win IE 5.5 or higher.
		for(var i=0; i<document.images.length; i++){
		     var img = document.images[i]
		     var imgName = img.src.toUpperCase()
		     if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
		        {
		       var imgID = (img.id) ? "id='" + img.id + "' " : ""
		       var imgClass = (img.className) ? "class='" + img.className + "' " : ""
		       var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
		       var imgStyle = "display:inline-block;" + img.style.cssText
		       if (img.align == "left") imgStyle = "float:left;" + imgStyle
		       if (img.align == "right") imgStyle = "float:right;" + imgStyle
		       if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle      
		       var strNewHTML = "<span " + imgID + imgClass + imgTitle
		       + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
		        + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
		       + "(src=\'" + img.src + "\', sizingMethod='image');\"></span>"
		       img.outerHTML = strNewHTML
		       i = i-1
	        }
		}
	}
	//Detect IE5.5+
	version=0
	if (navigator.appVersion.indexOf("MSIE")!=-1 && navigator.userAgent.indexOf("Opera")==-1 ) {
		temp=navigator.appVersion.split("MSIE")
		version=parseFloat(temp[1])
	}
	if (version>=5.5 && version<7 ){ //NON IE browser will return 0
		//alert("Script PNG");
		window.attachEvent("onload", correctPNG);
	}
	
	
	function loadInternalUrl( url ){
		document.getElementById('pagesFrame2').src = url;
		document.getElementById('pagesContent2').style.display = 'block';
	}
	function loadExternalUrl( url ){
		if( url == 'noAction' )
			return false;
		if( url == 'noLink' ){
			alert('Bientôt / Soon / Pronto');
			return false;
		}
		//document.location=url;
		window.open(url,'Site');
	}
	function showContentFrame(){
		document.getElementById('pagesContent2').style.display = 'block';
	}
	function hideContentFrame(){
		document.getElementById('pagesContent2').style.display = 'none';
		document.getElementById('pagesFrame2').src = 'fileadmin/templates/wait.php';
	}
	function loadVideo(video){
		var flashvars = {};
		flashvars.flv = "../contributions/Videos/"+video;
		flashvars.width = 250;
		flashvars.height = 188;
		flashvars.autoplay = 1;
		flashvars.autoload = 1;
		flashvars.buffer = 10;
		flashvars.margin = 0;
		flashvars.sliderovercolor = "FFFFFF";
		flashvars.loadingcolor = "fefefe";
		flashvars.buttonovercolor = "fefefe";
		swfobject.embedSWF("fileadmin/templates/player_flv.swf", "flashArea", "250", "188", "9.0.0", "fileadmin/templates/player_flv.swf",flashvars,false,{id:"flashArea",name:"flashArea",wmode:"transparent"});
		document.getElementById('flashArea').style.zIndex = 2;
		document.getElementById('masque1').style.zIndex = 100;
		document.getElementById('masque2').style.zIndex = 100;
	}
	function checkRegForm(fh){
		if( fh.libelle_l0.value=='' || fh.libelle_l1.value=='' || fh.libelle_l2.value=='' ){
			alert('Merci de remplir tous les champs');
			return false;
		}
		return true;
	}
	function confirmRegDel(regId){
		rs = confirm("Etes vous sûr de vouloir supprimer cette régions et tous les sites Internet associés ?");
		if( rs )
			document.location = 'index.php?id=regions&mode=suppression&regId='+regId;
	}
	function checkPaysForm(fh){
		if( fh.libelle_l0.value=='' || fh.libelle_l1.value=='' || fh.libelle_l2.value=='' || fh.site.value == '' ){
			alert('Merci de remplir tous les champs');
			return false;
		}
		return true;
	}
	function confirmPaysDel(payId,regId){
		rs = confirm("Etes vous sûr de vouloir supprimer cet enregistrement ?");
		if( rs )
			document.location = 'index.php?id=pays&mode=suppression&payId='+payId+'&regId='+regId;
	}
	function checkSearch(fh){
	if( fh.elements['tx_indexedsearch[sword]'].value == ''){
		alert("Merci d'indiquer au moins un mot pour la recherche !");
		return false;
	}
	showContentFrame();
	return true;
}
	
	