


<!--
var printDoc ="";
var strLocation = "";
var strDomain = "";


function initDocument(){

    //var strLocation = "";
    strLocation += document.location;
    
    //var strDomain = "";
    strDomain += document.domain;

    try{
    
    var pos = strLocation.lastIndexOf(strDomain);
    pageName = strLocation.substring(pos+1, strLocation.length-5);
    
    var pos2 = strLocation.indexOf(".fr") + 3;
    printDoc = strLocation.substring(pos2, strLocation.length);
    
       
    /* active les liens de la liste */
    var Elems = document.getElementsByTagName("a");//.parentNode.className=="listActive"; 
    var nbElems = Elems.length;
    var strHref = "";

    for(i=0; i<nbElems; i++){
        strHref += Elems[i].href;
        if(strLocation.indexOf(strHref)>-1){
	       	ShowHideListMenu(Elems[i].parentNode.parentNode.id);
        }
        strHref = "";
    }
    }catch(e){
    }
    
    /*deploiement des sections CIM */
    
    //var strLocation ="";
    
    var topLocation = "";
    topLocation += top.location;
    
    var docLocation = "";
    docLocation += document.location;
     
    if (topLocation.indexOf("#")>-1){
        strLocation = topLocation;
    }
    
    if(docLocation.indexOf("#")>-1){
        strLocation = docLocation;
    }
    
    
    
    //alert(document.domain +"\n" + document.location + "\n" + document.URL + "\n");
    
    
    
    
    try{
        var posSection = strLocation.lastIndexOf("#");
        if(posSection > -1){
            //alert(posSection);
            sectionID=strLocation.substring(posSection, strLocation.length);
            document.getElementById(sectionID).style.display = "block";
        }
        
    }catch(e){
    }
    
    try{
        document.getElementById('urlNotice').value = strLocation;
    }catch(e){
    }
    
    try{
        document.getElementById('url').value = strLocation;
    }catch(e){
    }
    
    
    goToFrameset();
    writeShareBox(strLocation);
}

function _initDocument(couleur){
try{
    var strLocation = "";
    strLocation += document.location;
    
    var pos = strLocation.lastIndexOf("/");
    pageName=strLocation.substring(pos+1, strLocation.length-5);
       
    /* active les liens de la liste */
    var Elems = document.getElementsByTagName("a");//.parentNode.className=="listActive"; 
    var nbElems = Elems.length;
    var strHref = "";

    for(i=0; i<nbElems; i++){
        strHref += Elems[i].href;
        if(strLocation.indexOf(strHref)>-1){
	       	ShowHideListMenu(Elems[i].parentNode.parentNode.id);
        }
        strHref = "";
    }
    }catch(e){
    }
    
    
    goToFrameset();
    //changeFrameSet(couleur);
    /*writeShareBox(strLocation);*/
    
  
}

function launchPrint(){
    window.open("http://mediatheque.cite-musique.fr/common/print.asp?url=" + printDoc);

}

function wait(){
    
}

/*

  <a href="#" onclick="showForm('blocForm')">
    <img class="ico" src="/mediacomposite/images/icones/envoyer.gif" border="0" alt="Envoyer à un ami" title="Envoyer à un ami"/>
  </a>
  <a href="#" onclick="showForm('blocPermalien')">
    <img class="ico" src="/mediacomposite/images/icones/permalien.gif" border="0" alt="Permalien" title="Permalien"/>
  </a>
  <a href="javascript:window.open('http://www.myspace.com/Modules/PostTo/Pages/?c=http://mediatheque.cite-musique.fr/masc/play.asp?ID=0889389', 'myspace', 'toolbar=0,status=0,height=436,width=646,scrollbars=yes,resizable=yes');void(0);" rel="nofollow">
    <img class="ico" src="/mediacomposite/images/icones/myspace.gif" border="0" alt="Partagez sur MySpace" title="Partagez sur MySpace"/>
  </a>
  <a href="javascript:window.open('http://www.facebook.com/sharer.php?u=http://mediatheque.cite-musique.fr/masc/play.asp?ID=0889389', 'facebook', 'toolbar=0,status=0,height=436,width=646,scrollbars=yes,resizable=yes');void(0);" rel="nofollow">
    <img class="ico" src="/mediacomposite/images/icones/facebook.gif" border="0" alt="Partagez sur Facebook" title="Partagez sur Facebook"/>
  </a>
  <a href="javascript:window.open('http://digg.com/submit?phase=2&amp;url=http://mediatheque.cite-musique.fr/masc/play.asp?ID=0889389', 'Digg', 'toolbar=0,status=0,height=436,width=646,scrollbars=yes,resizable=yes');void(0);" rel="nofollow">
    <img class="ico" src="/mediacomposite/images/icones/digg.png" border="0" alt="Partagez sur Digg" title="Partagez sur Digg"/>
  </a>
  <a href="javascript:window.open('http://twitter.com/home?status=Titre, mediatheque.cite-musique.fr, http://mediatheque.cite-musique.fr/masc/play.asp?ID=0889389', 'twitter', 'toolbar=0,status=0,height=436,width=646,scrollbars=yes,resizable=yes');void(0);" rel="nofollow">
    <img class="ico" src="/mediacomposite/images/icones/twitter.png" border="0" alt="Partagez sur Twitter" title="Partagez sur Twitter"/>
  </a>
  <a href="javascript:window.open('http://del.icio.us/post?url=http://mediatheque.cite-musique.fr/masc/play.asp?ID=0889389', 'delicious', 'toolbar=0,status=0,height=450,width=700,scrollbars=yes,resizable=yes');void(0);" rel="nofollow">
    <img class="ico" src="/mediacomposite/images/icones/delicious.png" border="0" alt="Partagez sur del.icio.us" title="Partagez sur del.icio.us"/>
  </a>
  <a href="javascript:window.open('http://www.linkedin.com/shareArticle?mini=true&amp;url=http://mediatheque.cite-musique.fr/masc/play.asp?ID=0889389&amp;title=Médiathèque de la Cité de la musique&amp;summary=', 'linkedin', 'toolbar=0,status=0,height=450,width=700,scrollbars=yes,resizable=yes');void(0);" rel="nofollow">
    <img class="ico" src="/mediacomposite/images/icones/linkedIn.gif" border="0" alt="Partagez sur linkedIn" title="Partagez sur LinkedIn"/>
  </a>


*/

function writeShareBox(strLocation){
//insere dans la page le menu pour partager l'url dans les reseaux sociaux
s = "<div>";
s += "<a href=\"#\" onclick=\"launchPrint()\">";
s += "    <img src=\"/mediacomposite/images/icones/print.gif\" border=\"0\" alt=\"Imprimer cette page\" title=\"Imprimer cette page\"/>";
s += "  </a>";
s += "<a href=\"#\" onclick=\"showForm('blocForm')\">";
s += "    <img src=\"/mediacomposite/images/icones/envoyer.gif\" border=\"0\" alt=\"Envoyer à un ami\" title=\"Envoyer à un ami\"/>";
s += "  </a>";
s += "  <a href=\"#\" onclick=\"showForm('blocPermalien')\">";
s += "    <img src=\"/mediacomposite/images/icones/permalien.gif\" border=\"0\" alt=\"Permalien\" title=\"Permalien\"/>";
s += "  </a>";



s += "<a href=\"javascript:window.open('http://www.myspace.com/Modules/PostTo/Pages/?c=" + strLocation + "', 'myspace', 'toolbar=0,status=0,height=436,width=646,scrollbars=yes,resizable=yes');void(0);\" rel=\"nofollow\">";
s += "<img src=\"/mediacomposite/images/icones/myspace.gif\" border=\"0\" alt=\"Partagez sur MySpace\" title=\"Partagez sur MySpace\"/>";
s += "</a>";

s += "<a href=\"javascript:window.open('http://www.facebook.com/sharer.php?u=" + strLocation + "', 'facebook', 'toolbar=0,status=0,height=436,width=646,scrollbars=yes,resizable=yes');void(0);\" rel=\"nofollow\">";
s += "<img src=\"/mediacomposite/images/icones/facebook.gif\" border=\"0\" alt=\"Partagez sur Facebook\" title=\"Partagez sur Facebook\">";
s += "</a>";

s += "<a href=\"javascript:window.open('http://digg.com/submit?phase=2&amp;url=" + strLocation + "', 'Digg', 'toolbar=0,status=0,height=436,width=646,scrollbars=yes,resizable=yes');void(0);\" rel=\"nofollow\">";
s += "<img src=\"/mediacomposite/images/icones/digg.png\" border=\"0\" alt=\"Partagez sur Digg\" title=\"Partagez sur Digg\"/>";
s += "</a>";

s += "<a href=\"javascript:window.open('http://twitter.com/home?status=Titre, mediatheque.cite-musique.fr, " + strLocation + "', 'twitter', 'toolbar=0,status=0,height=436,width=646,scrollbars=yes,resizable=yes');void(0);\" rel=\"nofollow\">";
s += "<img src=\"/mediacomposite/images/icones/twitter.png\" border=\"0\" alt=\"Partagez sur Twitter\" title=\"Partagez sur Twitter\"/>";
s += "</a>";

s += "<a href=\"javascript:window.open('http://del.icio.us/post?url=" + strLocation + "', 'delicious', 'toolbar=0,status=0,height=450,width=700,scrollbars=yes,resizable=yes');void(0);\" rel=\"nofollow\">";
s += "<img src=\"/mediacomposite/images/icones/delicious.png\" border=\"0\" alt=\"Partagez sur del.icio.us\" title=\"Partagez sur del.icio.us\"/>";
s += "</a>";

s += "<a href=\"javascript:window.open('http://www.linkedin.com/shareArticle?mini=true&amp;url=" + strLocation + "&amp;title=Médiathèque de la Cité de la musique&amp;summary=', 'linkedin', 'toolbar=0,status=0,height=450,width=700,scrollbars=yes,resizable=yes');void(0);\" rel=\"nofollow\">";
s += "<img src=\"/mediacomposite/images/icones/linkedIn.gif\" border=\"0\" alt=\"Partagez sur linkedIn\" title=\"Partagez sur LinkedIn\"/>";
s += "</a>";
s += "</div>";

    document.getElementById('advance').innerHTML += s;

}
























 // pop-up glossaire (centre)
function glossaire(maPage, maHauteur, maLargeur) {
var winl = (screen.width - 450) / 2;
var wint = (screen.height - 350) / 2;
winprops = 'height='+maHauteur+',width='+maLargeur+',top='+wint+',left='+winl+',scrollbars=yes,resizable=no'
win = window.open(maPage, 'gloss', winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function facteur(mypage) {
var winl = (screen.width - 15) / 2;
var wint = (screen.height - 550) / 2;
winprops = 'height=350,width=470,top='+wint+',left='+winl+',scrollbars=yes,resizable=no'
win = window.open(mypage, 'fact', winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

//Ajout - Denocq 20050621 - Uniformisation des dossiers
function popup(maPage, maHauteur, maLargeur) {
	var winl = (screen.width - 450) / 2;
	var wint = (screen.height - 350) / 2;
	//alert(gloss.width + ':' + maPage.height);
	//winprops = 'height='+maHauteur+',width='+maLargeur+',top='+wint+',left='+winl+',scrollbars=yes,resizable=no,status=no';
	winprops = 'top='+wint+',left='+winl+',scrollbars=yes,resizable=no,status=no';
	
	win = window.open(maPage, 'gloss', winprops);
	win.resizeTo(parseInt(maLargeur)+10, parseInt(maHauteur)+20)

	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

//  Fin pop-up glossaire -->


//Ajout - Denocq 20050824 - popup notices fiches domaines
function popupNotice(maPage){
	var maHauteur = 450;
	var maLargeur = 350;
	var winl = (screen.width - 450) / 2;
	var wint = (screen.height - 350) / 2;
	winprops = 'height='+maHauteur+',width='+maLargeur+',top='+wint+',left='+winl+',scrollbars=yes,resizable=no';
	win = window.open(maPage, 'notice', winprops);
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function ShowHideListMenu(eSrc) {
	//alert(eSrc);
	document.getElementById(eSrc).style.display = ("block" == document.getElementById(eSrc).style.display ? "none" : "block");
}

function showHideModalPopup(popup, event){
	x=event.x;
	y=event.y;

	var xOffset = 130;
	var yOffset = 117;
	
	//alert(popup +"\n"+document.getElementById(popup).style.left + ":" + document.getElementById(popup).style.left);
	
	document.getElementById(popup).style.left = x + xOffset + "px";
	document.getElementById(popup).style.top = y + xOffset  + "px";
		
	document.getElementById(popup).style.visibility = 'visible';
	document.getElementById(popup).style.display = 'block';
	
	

	
	/*if(document.getElementById('canvas').style.opacity){
		document.getElementById('canvas').style.opacity = '0.1';
	}
	if(document.getElementById('canvas').style.filter){
		document.getElementById('canvas').style.filter = 'alpha(opacity=10)';
	}*/
	/*	opacity : 0.5; 
    filter : alpha(opacity=50); */
}

function showHideModalPopup(popup){
	gk = window.Event ? 1 : 0;

    docElement = !document.documentElement.clientWidth ? document.body : document.documentElement;
    scrollX = gk ? pageXOffset : docElement.scrollLeft;
    scrollY = gk ? pageYOffset : docElement.scrollTop;

    x = gk ? event.pageX : event.clientX + scrollX;
    y = gk ? event.pageY : event.clientY + scrollY;
    
	//alert(popup +"\n"+document.getElementById(popup).style.left + ":" + document.getElementById(popup).style.left);
	
	document.getElementById(popup).style.left = x + "px";
    document.getElementById(popup).style.top = y + "px";
		
	document.getElementById(popup).style.visibility = 'visible';
	document.getElementById(popup).style.display = 'block';
	
	

	
	/*if(document.getElementById('canvas').style.opacity){
		document.getElementById('canvas').style.opacity = '0.1';
	}
	if(document.getElementById('canvas').style.filter){
		document.getElementById('canvas').style.filter = 'alpha(opacity=10)';
	}*/
	/*	opacity : 0.5; 
    filter : alpha(opacity=50); */
}



function closeModalPopup(obj){
	document.getElementById(obj.id).style.visibility = 'hidden';
	document.getElementById(obj.id).style.display = 'none';
}




function showDfn(id,event) {
    docElement = !document.documentElement.clientWidth ? document.body : document.documentElement;
//alert("sX:" + event.screenX + ", sY:" + event.screenY + "\n" + "cX:" + event.clientX + ", cY:" + event.clientY);
//alert(docElement.scrollLeft + "," + docElement.scrollTop);

    // navigateurs Gecko ou IE
    //gk = window.Event ? 1 : 0;
    //gk = pageXOffset ? 1 : 0;

//    scrollX = gk ? pageXOffset : docElement.scrollLeft;
//    scrollY = gk ? pageYOffset : docElement.scrollTop;

//    scrollX = docElement.scrollLeft;
//    scrollY = docElement.scrollTop;

scrollX = docElement.scrollLeft;
scrollY = docElement.scrollTop;


//    x = gk ? event.pageX : event.clientX + scrollX;
//    y = gk ? event.pageY : event.clientY + scrollY;
  
  x = event.clientX + scrollX;
  y = event.clientY + scrollY;
    
//    x = event.clientX;
//    y = event.clientY;
    
    //alert("event.x:" + event.x + "\n" + "event.y:" + event.y + "\n" + "event.pageX:" + event.pageX + "\n" + "event.clientX:" + event.clientX + "\n" + "pageXOffset:" + pageXOffset + "\n" + "docElement.scrollLeft:" + docElement.scrollLeft + "\n" );
    
    
//    alert(event.x + ";" + event.y + "\n" + event.screenX + ";" + event.screenY);
//    alert(pageXOffset + ";" + pageYOffset + "\n" + docElement.scrollLeft + ";" + docElement.scrollTop);
    
    
    //x=event.x;    
    //y=event.y;
    
    //x=event.screenX;    
    //y=event.screenY;
    
    try{
        strContent = document.getElementById(id).innerHTML;
        //strContent = strContent.substring(2, strContent.length-1);
        strContent = strContent.substring(strContent.indexOf("(")+1, strContent.lastIndexOf(")"));


        var dfnPopup;  
        dfnPopup = document.getElementById('dfnPopup');
        dfnPopup.innerHTML = strContent;

        dfnPopup.style.left = x + "px";
        dfnPopup.style.top = y + "px";

        dfnPopup.style.visibility = 'visible';
        dfnPopup.style.display = 'block';
    }
    catch(e)
	{
		alert('e');
	}
}


function hideDfn(){
    var dfnPopup;
    dfnPopup = document.getElementById('dfnPopup');
	dfnPopup.style.visibility = 'hidden';
	dfnPopup.style.display = 'none';
}

//Ajout - Denocq 20050707 - SousMenu Jazz
function genSousMenu(str){
	var cElems = document.all.tags('div');
	var iNumElems = cElems.length;
	str=String(str);
	var currentId = str.substr(str.length-6,2);
	for (var i=1;i<iNumElems;i++){
		if(cElems[i].id==("sousmenu"+currentId)){
			document.getElementById(cElems[i].id).style.visibility = 'visible';
		}

	}
}

//Fin SousMenu Jazz

function ecouter(lien)
{
	window.opener.src=lien;
	window.opener.focus();
	//window.close();
	//parent.parent.document.getElementById('frame_streamer').src = "/portail/passerelle.asp?EID=" + strEid;
}

function changerOpener(lien) {
if (window.opener &&!window.opener.closed) {
window.opener.refreshPage(lien);
//window.opener.focus();
//window.close;
window.focus();
}
}

function refreshPage(lien){
//document.location.reload();
document.location = lien
}

function changeFrameSet(couleurbandeau)
{
	//parent.document.getElementById('frame_banner').src=bandeau;
try{  	if(self == top) { //window.location = 'frameset.htm'
	    	return false;
	    } else {
		    //parent.frame_banner.getElementById('bandeau').src= "/skins/CITEMUSIQUE/images/integration/accueil/bandeau_" + couleurbandeau + ".gif";
		    //window.top.frames['frame_banner'].getElementById('bandeau').src= "/skins/CITEMUSIQUE/images/integration/accueil/bandeau_" + couleurbandeau + ".gif";
		    //alert(top.frames['frame_banner'].getElementById('bandeau').src);
		    //top.frames['frame_banner'].getElementById('bandeau').src= "/skins/CITEMUSIQUE/images/integration/accueil/bandeau_" + couleurbandeau + ".gif";
            return true;
	    }
}catch(e){
}
}

//function changeFrameSet(couleurbandeau)
//{
//	//parent.document.getElementById('frame_banner').src=bandeau;
//	//parent.parent.frame_banner.getElementById('bandeau').src= "/skins/CITEMUSIQUE/images/integration/accueil/bandeau_" + couleurbandeau + ".gif";
//	//window.top.frames['frame_banner'].getElementById('bandeau').src= "/skins/CITEMUSIQUE/images/integration/accueil/bandeau_" + couleurbandeau + ".gif";
//	imgPath = top.frames['frame_banner'].document.getElementById('bandeau').src;
//	pos = imgPath.indexOf('_');
//	imgPath.substring(0, pos);
//	//alert(imgPath);
//	top.frames['frame_banner'].document.getElementById('bandeau').src = imgPath.substring(0, pos) + "_" + couleurbandeau + ".gif";	
//}


function changeFrameSet(couleurbandeau)
{
	//parent.document.getElementById('frame_banner').src=bandeau;
	if(self == top) { //window.location = 'frameset.htm'
		return false;
	} else {
		//parent.frame_banner.getElementById('bandeau').src= "/skins/CITEMUSIQUE/images/integration/accueil/bandeau_" + couleurbandeau + ".gif";
		//window.top.frames['frame_banner'].getElementById('bandeau').src= "/skins/CITEMUSIQUE/images/integration/accueil/bandeau_" + couleurbandeau + ".gif";
		//alert(top.frames['frame_banner'].getElementById('bandeau').src);
		//top.frames['frame_banner'].getElementById('bandeau').src= "/skins/CITEMUSIQUE/images/integration/accueil/bandeau_" + couleurbandeau + ".gif";
		imgBandeauPath = top.frames['frame_banner'].document.getElementById('bandeau').src;
		pos = imgBandeauPath.indexOf('_');
		imgBandeauPath.substring(0, pos);
		//alert(imgPath);
		top.frames['frame_banner'].document.getElementById('bandeau').src = imgBandeauPath.substring(0, pos) + "_" + couleurbandeau + ".gif";	
	}	
}


//Ajout - Denocq 20050829 - re-integration dans le frameset
/*function goToFrameset(){
	var sPath = window.location.pathname;
	var query = window.location.search;
	//alert(window.name);
	//var sPage = sPath.substring(sPath.lastIndexOf('\\') + 1);
	var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);
	//alert(sPage);


	//Pour détécter et rediriger :
	//alert(top.frames.length);
	//for(i=0;i<top.frames.length;i++){
	//	alert(top.frames[i].name);
	//}
	try{
	if(window.name != "notice"){
		if(top.frames.length <= 0){
		//top.frames.location = "http://mediatheque.cite-musique.fr/masc/default.asp?INSTANCE=CITEMUSIQUE";
		//alert(sPath);
			top.frames.location= "/masc/?INSTANCE=CITEMUSIQUE&URL=" + sPath + escape(query);
		}
	}
	}catch(e){
	}
}*/


function goToFrameset(){
	//alert(window.name);
	var sLocation = "";
	//alert(document.location + "\n" + document.URL + "\n");
	sLocation += document.location;
	var sPath = sLocation.substring(sLocation.indexOf(".fr")+3, sLocation.length);
	//var sPath = window.location.pathname;
//	alert(sLocation + "\n" + sPath);
//	var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);
    //alert(sPath);
	
	if((window.name == "notice") || (window.name == "gloss")){
		//rien
	}else{
    //  alert(top.frames.length);
		if(top.frames.length <= 1){
		    top.frames.location= "/masc/?INSTANCE=CITEMUSIQUE&URL=" + sPath;
		}
	}
}





//Special FSFiche.asp domaine
function goToFSFiche(){
	var sPath = window.location.pathname;
	//var sPath = window.location;
	//var sPage = sPath.substring(sPath.lastIndexOf('\\') + 1);
	var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);
	//alert(sPage);
	alert(sPath);
	//alert(window.location);


	//Pour détécter et rediriger :
	//alert('FSFiche');
	//alert(top.frames.length);
	//for(i=0;i<top.frames.length;i++){
	//	alert(top.frames[i].name);
	//}

	if(top.frames.length <= 2){
		//top.frames.location = "http://mediatheque.cite-musique.fr/masc/default.asp?INSTANCE=CITEMUSIQUE";
		//alert(sPath);
		//top.frames.location= "http://mediatheque.cite-musique.fr/masc/?URL=" + sPath;
		top.frames.location= "http://mediatheque.cite-musique.fr/masc/?URL=" + window.location
	}
}

//Ouverture des guides d'écoute
//Test de la resolution,


function lienResol(url){
	//alert(screen.width + "x" + screen.height);
	if (screen.width >= 1280 && screen.height >= 1024) {
			location=url;
	} else {
		win = window.open(url,'MetaScore','Fullscreen=yes, resizable=yes')
	}
}

function openGuide(url){
	//alert(screen.width + "x" + screen.height);
	winprops = 'height=768,width=1024,top=0,left=0,scrollbars=no,resizable=no,status=no';
	win = window.open(url, 'MetaScore', winprops);
	if (parseInt(navigator.appVersion) >= 4) {
	    win.window.focus();
	}
}


function test(){
	alert('ok');
}

function urlencode(str) {
    return escape(str.replace(/%/g, '%25').replace(/\+/g, '%2B')).replace(/%25/g, '%');
}


function sendToAFriend(){
		//alert("send");
	    //document.getElementById('sendForm').style.display = "block";
	    location = document.location;
	    sender = document.getElementById('Sender').value;
	    emailSender = document.getElementById('EmailSender').value;
  	    emailDest = document.getElementById('EmailDest').value;
  	    urlNotice = document.getElementById('urlNotice').value;
  	    message = document.getElementById('Message').value;
  	    url = "/common/sendMail.asp?Sender="+ sender + "&EmailSender=" + emailSender + "&EmailDest=" + emailDest + "&Message=" + message + "&URL="+urlNotice;
		
		callHttpRequest(url);
}
 
function showForm(formId){
	    document.getElementById(formId).style.display = "block";
}
 
function hideForm(formId){
	    document.getElementById(formId).style.display = "none";
}
 
 
 
function callHttpRequest(url) {
	//alert("call");
    if (window.XMLHttpRequest) {
        req = new XMLHttpRequest();
        req.onreadystatechange = processReqChange;
        req.open("GET", url, true);
        req.send(null);
    // branch for IE/Windows ActiveX version
    } else if (window.ActiveXObject) {
        isIE = true;
        req = new ActiveXObject("Microsoft.XMLHTTP");
        if (req) {
            req.onreadystatechange = processReqChange;
            req.open("GET", url, true);
            req.send();
        }
    }
}
 
function processReqChange() {
    // only if req shows "loaded"
    if (req.readyState == 4) {
        // only if "OK"
        if (req.status == 200) {
            //displayXMLData();
            hideForm();
         } else {
            alert("There was a problem retrieving the XML data:\n" + req.statusText);
         }
    }
}



function URLEncode(plaintext)
{
	// The Javascript escape and unescape functions do not correspond
	// with what browsers actually do...
	var SAFECHARS = "0123456789" +					// Numeric
					"ABCDEFGHIJKLMNOPQRSTUVWXYZ" +	// Alphabetic
					"abcdefghijklmnopqrstuvwxyz" +
					"-_.!~*'()";					// RFC2396 Mark characters
	var HEX = "0123456789ABCDEF";
 
//	var plaintext = document.URLForm.F1.value;
	var encoded = "";
	for (var i = 0; i < plaintext.length; i++ ) {
		var ch = plaintext.charAt(i);
	    if (ch == " ") {
		    encoded += "+";				// x-www-urlencoded, rather than %20
		} else if (SAFECHARS.indexOf(ch) != -1) {
		    encoded += ch;
		} else {
		    var charCode = ch.charCodeAt(0);
			if (charCode > 255) {
			    alert( "Unicode Character '" 
                        + ch 
                        + "' cannot be encoded using standard URL encoding.\n" +
				          "(URL encoding only supports 8-bit characters.)\n" +
						  "A space (+) will be substituted." );
				encoded += "+";
			} else {
				encoded += "%";
				encoded += HEX.charAt((charCode >> 4) & 0xF);
				encoded += HEX.charAt(charCode & 0xF);
			}
		}
	} // for
 
//	document.URLForm.F2.value = encoded;
  //document.URLForm.F2.select();
	return encoded;
};
 
function URLDecode(encoded)
{
   // Replace + with ' '
   // Replace %xx with equivalent character
   // Put [ERROR] in output if %xx is invalid.
   var HEXCHARS = "0123456789ABCDEFabcdef"; 
//   var encoded = document.URLForm.F2.value;
   var plaintext = "";
   var i = 0;
   while (i < encoded.length) {
       var ch = encoded.charAt(i);
	   if (ch == "+") {
	       plaintext += " ";
		   i++;
	   } else if (ch == "%") {
			if (i < (encoded.length-2) 
					&& HEXCHARS.indexOf(encoded.charAt(i+1)) != -1 
					&& HEXCHARS.indexOf(encoded.charAt(i+2)) != -1 ) {
				plaintext += unescape( encoded.substr(i,3) );
				i += 3;
			} else {
				alert( 'Bad escape combination near ...' + encoded.substr(i) );
				plaintext += "%[ERROR]";
				i++;
			}
		} else {
		   plaintext += ch;
		   i++;
		}
	} // while
   //document.URLForm.F1.value = plaintext;
   //document.URLForm.F1.select();
   return plaintext;
};


//Code Macromedia...
// menus "chapitres"
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_setTextOfTextfield(objName,x,newText) { //v3.0
  var obj = MM_findObj(objName); if (obj) obj.value = newText;
}

// show & hide menus d&eacute;roulant
function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

// pour les balises div
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

//images swap on roll over / roll out
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


//cim popup
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


//-->



;