//var Base="http://www.arcalpin.com/temp/saintsorlindarves/";
//var Base="http://yannick/stsorlin/";
//var Base="http://olivier/OT-saintsorlindarves/www/";
var Base="http://www.saintsorlindarves.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(Base+"voirimage.asp?I="+Img+"&T="+txt,'Image','height=200,width=300,resizable=yes')
}


var CouleurCellule;			// nécessaire
var CouleurFondMenu='#FCF2EA';
var CouleurFondSousMenu="#E5C0A5"	//#FFD6CC#F78B72
var ImageFondMenu=Base+"images/fond_menuselect.gif";
var CouleurFondMenuOver="#DDDDDD";
var CouleurFondMenuOver2="#C5EAF9";

function ChangeColorOut(TT) {
	TT.style.backgroundColor=CouleurCellule;
}

function ChangeColorOver(TT) {
	CouleurCellule=TT.style.backgroundColor;
	TT.style.backgroundColor=CouleurFondMenuOver;
	TT.style.cursor='hand';
	
}

function ChangeColorOver2(TT) {
	CouleurCellule=TT.style.backgroundColor;
	TT.style.backgroundColor=CouleurFondMenuOver2;
	TT.style.cursor='hand';
	
}

function ChangeColorCellule(IdCell,Couleur) {
	var cc=Couleur||CouleurFondMenu;
	if((IdCell!='')&&(IdCell!='T0')){
		document.getElementById(IdCell).style.backgroundColor=cc;	
	}
}

function ChangeRollOver(IdCell) {
	if(IdCell!=''){
		document.getElementById("menu"+IdCell).src=eval("DQM_rollover_image"+IdCell);
	}
}

function SelectionMenu(IdCell) {
var aa="";

	if(((IdCell!='')&&(IdCell!='TMenu'))&&(document.getElementById(IdCell))){
		document.getElementById(IdCell).style.backgroundImage="url("+ImageFondMenu+")";
//		document.getElementById(IdCell).firstChild.style.color=CouleurLienOngletSelect;
		document.getElementById(IdCell).style.fontWeight='bold';
	}
}


function Debug(obj){
	var aaa="";
	for (i in obj) {
		aaa+=obj[i]+"<br>";
	}
	document.write(aaa)	;
}

function SelectCombo(NomObj,valeur){
//	document.forms["RechercheHebergement"].elements["Globales/ListeIdCommune"].selectedIndex=aa;

	var obj=document.getElementById(NomObj);
	var aaa="";
	var IdIndex;
	for (i=0;i<obj.length;i++){
		if (valeur==obj.options[i].value){IdIndex=i;}
//		aaa+=obj.options[i].value+"\n";
	}
	document.getElementById(NomObj).selectedIndex=IdIndex;
}


///////////////////////////////// MACROMEDIA

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_jumpMenu(targ,selObj,restore,page){ //v3.0
  eval(targ+".location='"+page+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function Ouvre(url){
	window.open(url,'Aide','height=500,width=650,scrollbars=yes')
}
function plan(url){
	window.open(url,'Aide','height=600,width=810,scrollbars=yes')
}
/******************************************
	Affichage sur Googlemaps
******************************************/
function OuvreGoogleMaps(Id,Lat,Lon){
	window.open(Base+"voirgooglemaps.asp?Id="+Id+"&Lat="+Lat+"&Lon="+Lon,'Popup','width=500,height=400,scrollbars=no,toolbar=yes')
}

//---------------------Sélection menu CSS-------------------
function SelectionMenuCss(IdCell) {
 if((IdCell!='')&&(document.getElementById(IdCell)!=null)){
  document.getElementById(IdCell).className="SelectMenu";
 }
}