
function ClickSurCase(obj) {
 var taille = obj.all.length;
 var i;
 for(i=0;i<taille;i++) {
  if (obj.all[i].tagName.toUpperCase()=="A") top.location.href = obj.all[i].href;
 } 
}
 
 
 function VoirImage(Img,txt){
	window.open(Base+"voirimage.asp?I="+Img+"&T="+txt,'Image','height=200,width=300,resizable=yes')
}

 function OuvrePopup(url){
	window.open(url,'Bonplans','height=360,width=420,resizable=yes')
}



var CouleurCellule;			// nécessaire
var CouleurFondMenu='#F3F3F3';
var CouleurFondSousMenu="#E5C0A5"	//#FFD6CC#F78B72
var ColorFondSousMenu="#81DAEF";
var ImageOnglet="images/ongletselect.gif";
var CouleurLienOngletSelect="#82002A";
var CouleurFondMenuOver="#EEEEEE";

function ChangeColorOut(TT) {
	TT.style.backgroundColor=CouleurCellule;
}

function ChangeColorOver(TT) {
	CouleurCellule=TT.style.backgroundColor;
	TT.style.backgroundColor=CouleurFondMenuOver;
	TT.style.cursor='hand';
	
}

function ChangeColorCellule(IdCell,Couleur) {
	var cc=Couleur||CouleurFondMenu;
	if((IdCell!='')&&(IdCell!='T0')){
		document.getElementById(IdCell).style.backgroundColor=cc;	
	}
}

function goback() {
    history.go(-1);
}



function getStyle(id,propriete) {
  if (!document.styleSheets) return;
  var regles=new Array();
  
  if (document.styleSheets[0].cssRules) regles=document.styleSheets[0].cssRules
  else if (document.styleSheets[0].rules) regles = document.styleSheets[0].rules
  else return
  return eval("regles[id].style."+propriete);
} 



/********************************
Sélection du menu Onglets sur le haut
********************************/

function SelectionOnglet(IdCell) {
var aa="";
	if(IdCell!='' && document.getElementById(IdCell) != null){
		document.getElementById(IdCell).style.backgroundImage="url("+ImageOnglet+")";
		document.getElementById(IdCell).firstChild.style.color=CouleurLienOngletSelect;
		
/*
		for (i in document.styleSheets[0].rules[0]){
			aa+=i+"\t\t";
		}
		alert(aa);
		alert(document.styleSheets[0].rules[0].selectorText);
*/	
	}
}



/********************************
Sélection du menu sur la gauche
********************************/
function SelectionOnglet2(IdCell) {
var aa="";
var CouleurLienSelect="#000000";

	if((IdCell!='')&&(IdCell!='TMenuDossier')){
		document.getElementById(IdCell).firstChild.style.color="#000000";
		document.getElementById(IdCell).firstChild.style.color="#000000";
		document.getElementById(IdCell).firstChild.style.textDecoration="none" ;
		document.getElementById(IdCell).firstChild.style.fontWeight="bold" ;
		document.getElementById(IdCell).style.backgroundColor="#FFFFFF";
		document.getElementById(IdCell).style.borderTop="solid 1px #CCCCCC";
		document.getElementById(IdCell).style.borderBottom="solid 1px #CCCCCC";
		document.getElementById(IdCell).style.borderRight="none 0px #CCCCCC";
		document.getElementById(IdCell).style.backgroundImage="url(images/menu_degrade.gif)";
		document.getElementById(IdCell).style.backgroundPosition="center left";
		
	}
}



function AffichePopup(nom,of) {
	var xlContStyle = document.getElementById(nom).style
	xlContStyle.display='block';
	xlContStyle.filter='Alpha(Opacity=100)';
}




/*********************************
	Gestion des Popups avec des divs
****************************/
var minrestore=0
var initialwidth,initialheight
var ie5=document.all&&document.getElementById
var ns6=document.getElementById&&!document.all

function iecompattest(){
return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function loadwindow(url,width,height){

if (!ie5&&!ns6)
window.open(url,"","width="+width+",height="+height+",scrollbars=1")
else{
document.getElementById("dwindow").style.display=''
document.getElementById("dwindow").style.width=initialwidth=width+"px"
document.getElementById("dwindow").style.height=initialheight=height+"px"
document.getElementById("dwindow").style.left="30px"
document.getElementById("dwindow").style.top=ns6? window.pageYOffset*1+30+"px" : iecompattest().scrollTop*1+30+"px"
document.getElementById("cframe").src=url
}
}

function maximize(){
if (minrestore==0){
minrestore=1 //maximize window
document.getElementById("maxname").setAttribute("src","restore.gif")
document.getElementById("dwindow").style.width=ns6? window.innerWidth-20+"px" : iecompattest().clientWidth+"px"
document.getElementById("dwindow").style.height=ns6? window.innerHeight-20+"px" : iecompattest().clientHeight+"px"
}
else{
minrestore=0 //restore window
document.getElementById("maxname").setAttribute("src","max.gif")
document.getElementById("dwindow").style.width=initialwidth
document.getElementById("dwindow").style.height=initialheight
}
document.getElementById("dwindow").style.left=ns6? window.pageXOffset+"px" : iecompattest().scrollLeft+"px"
document.getElementById("dwindow").style.top=ns6? window.pageYOffset+"px" : iecompattest().scrollTop+"px"
}

function closeit(){
document.getElementById("dwindow").style.display="none"
}




            

