﻿/**
function DisplaySSmenu(id) {
	var tab= new Array(0, 1, 2, 3, 4);
	for(var i=0; i<tab.length ; i++) {
		if(tab[i]==id) 	document.getElementById('ssmenu'+tab[i]).style.display="block";
			else document.getElementById('ssmenu'+ tab[i]).style.display="none";
		}
}
*/

function DisplaySSmenu(id) {
	var tab= new Array(0, 1, 2, 3, 4);
	//alert(id);
	for(var i=0; i<tab.length ; i++) {
		jQuery('#ssmenu' + tab[i]).hide();
	}
	// jQuery('#ssmenu' + id).fadeIn();
	jQuery('#ssmenu' + id).show();
}

function searchInit() {
	var  input=document.getElementById('formulaire_recherche').value;
	if(input== 'entrer un terme' || input=='enter term') document.getElementById('formulaire_recherche').value='';
}

function popupBlank(url,PopName, width_, height_, scroll_) { 
	var proprietes;
	if (pop) {
	pop.window.close();
	}
	if(!scroll_) scroll_ = 'no';
	var top= 0
	var left= 0;
	
	if(width_=='' || height_=='') {
		width_=screen.width;
		height_=screen.height;
		proprietes = "toolbar=yes, location=yes, directories=yes, scrollbars=yes, resizable=yes, status=yes, menubar=yes, width="+width_+", height="+height_+",  left="+left+",top="+top+"";
	} else {
		if(width_ >  screen.width) {
			width_= screen.width;
			height_=screen.height;
			scroll_ = 'yes';
		} else {
		proprietes = "toolbar=no, location=no, directories=no, scrollbars="+scroll_+", resizable=yes, status=no, menubar=no, width="+width_+", height="+height_+",  left="+left+",top="+top+""
		}
	}
	var pop=window.open(url,PopName,proprietes);
	pop.focus();
}

function displayImage(url,PopName, width_, height_) { 
	//var top= screen.height-(screen.height/1.3);
	//var left=screen.width-(screen.width/1.3);
	var top=0;
	var left=0;
	pop = window.open(url, PopName, "toolbar=no, location=no, directories=no, scrollbars=no, resizable=no, status=no, menubar=no, width="+width_+", height="+height_+",  left="+left+",top="+top+"");
	pop.document.write("<html>");
	pop.document.write("<head><title>IFP"+PopName+"</title></head>");
	pop.document.write("<body style='margin:0;padding:0' background='"+url+"' onblur='top.close()'>" );
	pop.document.write("</body></html>");
	pop.document.close();

}

function showPrintButton() {
	document.write ("<div id=\"printmap\">");
	document.write ("<a href=\"javascript:self.print();\" title=\"Print this page\"><img src=\"ifp2005blue/images/print.png\" alt=\"Print this page\"></a>");
	document.write ("</div>");
}