
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("voirimage.asp?I="+Img+"&T="+txt,'Image','height=200,width=300,resizable=yes')
}



var CouleurCellule;			// nécessaire
var CouleurFondMenu='#F3F3F3';
var CouleurFondSousMenu="#E5C0A5"	//#FFD6CC#F78B72
var ColorFondSousMenu="#81DAEF";
var CouleurFondMenuOver="#19A2BF";


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);
} 


var ImageOnglet="images/ongletselect.gif";
var ImageOngletDossier="images/menu_voirpanier_02.gif";
var CouleurLienOngletSelect="#000000";
var CouleurFondMenuSelect="#FFFFFF";

function SelectionOnglet(IdCell) {
var aa="";

	if((IdCell!='')&&(IdCell!='TMenuDossier')){
		document.getElementById(IdCell).style.backgroundImage="url("+ImageOnglet+")";
		document.getElementById(IdCell).firstChild.style.color=CouleurLienOngletSelect;
		
	}
	if(IdCell=='TMenuDossier'){
		document.getElementById(IdCell).src=ImageOngletDossier;
	}
	

}

function SelectCommune(NumCommune){
		/// sélection d'une commune par son numéro.
		var NomCombo=document.forms["RechercheHebergement"].elements["Globales/ListeIdCommune"];
		for (i=0; i<NomCombo.length;i++){
			if(NomCombo[i].value.indexOf(NumCommune,0)!=-1){	/// on a trouve la commune
				NomCombo.selectedIndex=i;			
			}
		}
}

function OuvreGlossaire(page,titre){
	window.open(page,titre,'height=400,width=600,resizable=yes,scrollbars=yes')
}


