	/*
	tmp.write('<html><head><title>popup</title>');
	tmp.write('<link href="../pin.css" rel="stylesheet" type="text/css" />');
	tmp.write('</head><body><p>'+contenu+'</p>');
	tmp.write('</body></html>');*/	
	//***********************************************************
//---------------------- openNewWindowb ---------------------
//***********************************************************
var sizer;
var timer;
var txt;
function openNewWindow(URLtoOpen,param,contenu) { 
var windowFeatures;
	switch(param){
		case "1" :  windowFeatures ="left=10,top=10,height=540,width=720,toolbar=no,scrollbars=yes"; break;
		case "2" :  windowFeatures ="left=10,top=10,height=640,width=780,toolbar=no,scrollbars=yes" ;URLtoOpen="popup/pop.html"; break;
		case "3" : windowFeatures ="left=10,top=10,height=300,width=500,toolbar=no,scrollbars=yes" ;URLtoOpen="pop.html";break;
	}
	txt=contenu;
	sizer=window.open(URLtoOpen, 'pin', windowFeatures);
	if (window.focus) {sizer.focus()}
	    
	timer=setInterval("wpop()", 500);
	

}
function wpop(){	
	if (window.focus) {sizer.focus()}	
	    var tmp = sizer.document;
	    tmp.getElementById("divmain").innerHTML=txt;		
	    tmp.close();
	    clearInterval(timer)
 }
//***********************************************************
//----------------------openOrgWindow ----------------------
//***********************************************************
function openOrgWindow(URLtoOpen,param) { 

   var NS = (navigator.appName=="Netscape")?true:false; 

       iWidth = (NS)?window.innerWidth:document.body.clientWidth; 
       iHeight = (NS)?window.innerHeight:document.body.clientHeight; 
     

	switch(param){
			case "1" :windowFeatures ="left=0,top=0,toolbar=no,scrollbars=yes"; 			
			var sizer=window.open(URLtoOpen, 'pin', windowFeatures);
			sizer.resizeBy(iWidth, iHeight); 
			sizer.focus(); 
			break;
			case "2" :windowFeatures ="left=10,top=10,height=180,width=700,toolbar=no,scrollbars=yes"; break;
			case "3" :windowFeatures ="left=10,top=10,height=330,width=700,toolbar=no,scrollbars=yes"; break;			
			default :windowFeatures ="left=10,top=10,height=500,width=700,toolbar=no,scrollbars=yes"; break;
	}	
	

}
//***********************************************************
//----------------------MENU ----------------------
//***********************************************************
//Position
function OffsetL(Obj) {
	if (Obj.offsetParent) {return (Obj.offsetLeft + OffsetL(Obj.offsetParent));}
	else {return (Obj.offsetLeft);}
}
//Montre S-Menu
function montre(id) {
var d = document.getElementById(id);
	for (var i = 1; i<=10; i++) {
		if (document.getElementById('smenu'+i)) {
		document.getElementById('smenu'+i).style.display='none';
		}
	}
    if (d) {
        var posX=OffsetL(document.getElementById('menu_contenu'))+205;  
        d.style.left=posX+"px";
        d.style.zIndex =100;
        d.style.display='block';
       
    }
}

/**************************************************************************
 *                                                                        *
 *  JAVASCRIPT MENU HIGHLIGHTER v.1.0 (051123)                            *
 * --------------------------------------------                           *
 * ©2005 Media Division (www.MediaDivision.com)                           *
 *                                                                        *
 * Written by Marius Smarandoiu & Armand Niculescu                        *
 *                                                                        *
 * You are free to use, modify and distribute this file, but please keep  *
 * this header and credits                                                *
 *                                                                        *
 * Usage:                                                                 *
 * - the script will apply the .current class to the <a> and its parent   *
 *   <li> that is contained in the element with id="primarynav" and points*
 *   to the current URL                                                   *
 * - works in IE6, Firefox and Opera                                      *
 **************************************************************************/
function extractPageName(hrefString)
{
	var arr2 = hrefString.split('.');
	arr2 = arr2[arr2.length-2].split('/');
	return arr2[arr2.length-1].toLowerCase();		
}

function setActiveMenu(arr, crtPage)
{
	for(var i=0; i < arr.length; i++){
	if(arr[i].href){
	        var url=arr[i].href;
	        if(url.indexOf("#",0)== -1){	        
	            url=extractPageName(url);
	            url=url.toLowerCase();
		            if(url == crtPage)
		            {
    		          
		               if(arr[i].parentNode.tagName == "LI"){
		                    arr[i].parentNode.parentNode.parentNode.parentNode.parentNode.className = "menuON";
		                }
		                else if(arr[i].parentNode.tagName == "TD"){
		                    arr[i].parentNode.parentNode.className = "menuON";
		                    arr[i].className = "menuON";
		                }    		    
		            break;
		            }
		        }
		    }
		}
}

function setPage()
{
	if(document.location.href) 
		hrefString = document.location.href;
	else
		hrefString = document.location;		

	if (document.getElementById("menu_contenu")!=null) {
		setActiveMenu(document.getElementById("menu_contenu").getElementsByTagName("a"), extractPageName(hrefString));
		}
}
// INIT ALL
function initAll(){
montre();
setPage();

}

//START ALL
window.onload=initAll;