//var Base="http://matthieu/les-sybelles/www/";
//var Base="http://www.arcalpin.com/temp/les-sybelles/";
//var Base="http://yannick/les-sybelles/www/";
var Base="http://www.les-sybelles.fr/"
//var Base="http://marc/les-sybelles/www/";



var CouleurFondCelluleOver='';
var CouleurFondCellule='';

 function openWin(url, largeur, hauteur ,param, nom) 
 { 
 if(document.all) { 
 var x = (screen.width-largeur)/2; var y = (screen.height-hauteur)/2; 
 }
 else { 
 var x=100; var y=100; 
 }
 window.open(url,nom,param+(param!="" ? "," : "")+"width="+largeur+",height="+hauteur+",left="+x+",top="+y); 
 }


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

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')
}


////////////////////////////////////////
///	 Affichage des roll over
//////////////////////////////////////


var CouleurCellule;			// nécessaire
var CouleurFondMenu='#FCF2EA';
var CouleurFondMenuOver="#0598FF"
var CouleurTexteMenuOver="#000000"
var CouleurFondTelechargementOver="#E5F5FF"



function ChangeColorTelechargementOut(TT) {
	TT.style.backgroundColor=CouleurCellule;
}

function ChangeColorTelechargementOver(TT) {
	CouleurCellule=TT.style.backgroundColor;
	TT.style.backgroundColor=CouleurFondTelechargementOver;
	TT.style.cursor='hand';
	
}



function ChangeColorOut(TT) {
	TT.style.backgroundColor=CouleurCellule;
	TT.className="ligne";
}

function ChangeColorOver(TT) {
//	CouleurCellule=TT.style.backgroundColor;
//	TT.style.backgroundColor=CouleurFondMenuOver;
//	TT.style.cursor='hand';
//TT.className="MenuSelectionne";
	TT.className="MenuOver";
}

function ChangeColorCellule(IdCell,Couleur) {
	var cc=Couleur||CouleurFondMenu;
	if((IdCell!='')&&(IdCell!='T0')){
		document.getElementById(IdCell).style.backgroundColor=cc;	
//		document.getElementById(IdCell).className="MenuSelectionne";	
	}
}

function ChangeRollOver(IdCell) {
	if(IdCell!=''){
		document.getElementById("menu"+IdCell).src=eval("DQM_rollover_image"+IdCell);
	}
}


/**********************************
	Sélection des menus sur le coté (ex: hébergements)
**********************************/
var CouleurFondSousMenu="#C6E8FF"

function SelectionMenu(IdCell) {
var aa="";
	if(((IdCell!='')&&(IdCell!='TMenu'))&&(document.getElementById(IdCell))){
		document.getElementById(IdCell).style.backgroundColor=CouleurFondSousMenu;
		document.getElementById(IdCell).style.fontWeight='bold';
		document.getElementById(IdCell).lastChild.style.color="#000000";
		
	}
}

//---------------------Sélection menu CSS-------------------
function SelectionMenuCss(IdCell) {
if((IdCell!='')&&(document.getElementById(IdCell)!=null)){
   document.getElementById(IdCell).className="SelectMenu";
 }
}

/////////////////////////////////////

function Fermer() 
{ 
opener=self; 
self.close(); 
} 

function EstMailValide(chmail) {
 var retour = (typeof(chmail)!= "undefined") && chmail!="" && (chmail.match(/^([!#-%'-:=\?\A-~]+)@([\w\-\.]+\.(([a-zA-Z]{2,3}$)))/g)!=null); 
 retour = retour &&(chmail.match(/\.{2,}/g)==null) && (chmail.match(/@\./g)==null) &&(chmail.match(/\.@/g)==null);
 return retour;
} 

function Ouvre(url){
	window.open(url,'Aide','height=650,width=500,scrollbars=yes')
}

function OuvreMeteo(url){
	window.open(url,'Aide','height=550,width=750,scrollbars=yes')
}

function OuvrePopup(url){
	window.open(url,'Popup','height=500,width=775,scrollbars=yes')
}

function SelectionListe(NomChamp,Valeur) {
	if(document.getElementById(NomChamp)){
		var NomCombo=document.getElementById(NomChamp);
		for (i=0; i<NomCombo.length;i++){
			if(NomCombo[i].value==Valeur){				
				NomCombo.selectedIndex=i;			
			}
		}
	}	
}

/******************************************
	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')
}

/************************ Infolive ****************/
function SelectionListe(NomChamp,Valeur) {
	if(document.getElementById(NomChamp)){
		var NomCombo=document.getElementById(NomChamp);
		for (i=0; i<NomCombo.length;i++){
			if(NomCombo[i].value==Valeur){				
				NomCombo.selectedIndex=i;			
			}
		}
	}	
}

function AfficheDetail(NomBlock){
	if(document.getElementById(NomBlock).style.display=='block'){
		document.getElementById(NomBlock).style.display='none';
	} else {
		document.getElementById(NomBlock).style.display='block';
	}
}

