// ----------------------------- Highlighter Champs de Saisie
var highlightcolor="#FFD9BF"
var ns6=document.getElementById&&!document.all
var previous=''
var eventobj
//Regular expression to highlight only form elements
var intended=/INPUT|TEXTAREA|SELECT|OPTION/
//Function to check whether element clicked is form element
function checkel(which){
if (which.style&&intended.test(which.tagName)){
if (ns6&&eventobj.nodeType==3)
eventobj=eventobj.parentNode.parentNode
return true
}
else
return false
}
//Function to highlight form element
function highlight(e){
eventobj=ns6? e.target : event.srcElement
if (previous!=''){
if (checkel(previous))
previous.style.backgroundColor=''
previous=eventobj
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor
}
else{
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor
previous=eventobj
}
}
// ----------------------------- mettre en favori
function favori(phrase,lien) 
{ 
   if (window.sidebar) 
   { 
   window.sidebar.addPanel(phrase, lien,""); 
   } 
   else if( document.all ) 
   { 
   window.external.AddFavorite(lien, phrase); 
   } 
   else 
        { 
   return true; 
   } 
} 
// ----------------------------- Visualiser ds une POP UP une certaine zone à Imprimer
function imprime_zone(myTitle, obj) 
{
// Ouvre une nouvelle fenetre
var f = window.open("", "ZoneImpr", "height=500, width=600,toolbar=0, menubar=0, scrollbars=1, resizable=1,status=0, location=0, left=10, top=10");
// Définit le style du pop-up
f.document.body.style.color = '#000000';
f.document.body.style.backgroundColor = '#FFFFFF';
f.document.body.style.size = '10px';
// Ajoute les données et le titre
f.document.body.innerHTML += " " + document.getElementById(obj).innerHTML + " ";
f.document.title = myTitle;
// Impression
f.window.print();
return true;
}
// ----------------------------- POP UP 1
function popup(page)
{
window.open(page,'popup','width=400,height=400,toolbar=no,scrollbars=no'); 
}
// ----------------------------- Jump Menu
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
// ----------------------------- Roll over
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_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_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];}
}
// ----------------------------- Show Hide Layers
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; }
}
// ----------------------------- POP UP 2
//function popupCode( url ) {
//window.open(url, "Code", "resizable=no,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
//}	
// ----------------------------- Toggle DIV
function toggleCode( id ) {
	if ( document.getElementById )
		elem = document.getElementById( id ) ;
	else if ( document.all )
  	  	elem = eval( "document.all." + id ) ;
	else
		return false ;
	elemStyle = elem.style;
	if ( elemStyle.display != "block" ) {
		elemStyle.display = "block" ;
  	} else {
  	  	elemStyle.display = "none" ;
	}	  	  	
  	return true;
}
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" );