var Base="http://maurienne-tourisme.for-system.com";

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";
var ImageOnglet="images/ongletselect.gif";
var CouleurLienOngletSelect="#82002A";

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);
} 


function SelectionOnglet(IdCell) {
var aa="";

	if(IdCell!=''){
		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);
*/	
	}
}

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;			
			}
		}
}



