﻿function DisplaySSmenu(id) {
	var tab= new Array(1, 2, 3, 4, 5);
	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 hideSSmenu(id) 
{
	var tab= new Array(0, 1, 2, 3, 4, 5);	
	for(var i=0; i<tab.length ; i++) {	
		if(tab[i]==id)
			document.getElementById('ssmenu'+ tab[i]).style.display="none";
		}
}


//return true if navigator is IE6 or inf. ; false if not
function isIE6() {
	var browser = navigator.appName;
	var version = navigator.appVersion.substr(0,1);
	if (browser == "Microsoft Internet Explorer" && ( version <= 6 || version == 8))
		return true;
	else
		return false;
}


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

function popupMeeting(url,PopName, width_, height_, scroll_,text_) { 
	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.document.write("<html>");
	pop.document.write("<head><title>IFP "+PopName+"</title>");
	pop.document.write('<style type="text/css"> p{color: #626262;font-size : 0.85em;text-align: center;font-family: Arial, Helvetica, sans-serif;padding: 0 10px;margin:0;font-size : 0.85em;font-weight: bold;min-height:330px;height: auto ! important;height:330px;}</style>');
	pop.document.write("</head>");
	pop.document.write("<body style='font-size: 0.8em;'>");
	pop.document.write("<div class='photo'><img src="+url+">");
	if (text_){
		pop.document.write("<br><p>"+text_+"</p>");
	}
	pop.document.write("</div></body></html>");
	pop.document.close();
	pop.focus();
}

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>");
}