focus_pays = null;
//pays_rand = null;
tab_pays_rand = new Array();
tab_carte_pays = new Array();
tab_carte_blog = new Array();
tab_paysbonplan = new Array();
tab_paysrecit = new Array();


function GetCookie (name) {
         if ( document.cookie) { // Le cookie est-il valide ?
                  index = document.cookie.indexOf( name);
                  if ( index != -1) {
                           nDeb = (document.cookie.indexOf( "=", index) + 1);
                           nFin = document.cookie.indexOf( ";", index);
                           if (nFin == -1) {nFin = document.cookie.length;}
                           return unescape(document.cookie.substring(nDeb, nFin));
                  }
         }
         return null;
}

function start() {
	if (!document.getElementsByTagName) {
		return;
	}
	//trouver tout les liens de classe popupimage pour generer les popups
	if(document.getElementById("contenu")){
		listeLiens = document.getElementById("contenu").getElementsByTagName('A');
		for (i = 0; i < listeLiens.length; i++) { 
   			if(listeLiens[i].className == "popupimgmetae"){
				listeLiens[i].onclick=function() {
					popupimgmetae(this.href);
					return false;
				}
			}
  		}
		listeUL = document.getElementById("contenu").getElementsByTagName('UL');
		for (i = 0; i < listeUL.length; i++) { 
			if(listeUL[i].className == "miniprofilnav"){
				if(listeUL[i].childNodes[0] && listeUL[i].childNodes[0].nodeName == "LI"){
				node = listeUL[i].childNodes[0];
					node.onmouseover=function() { this.className+=" hover";}
					node.onmouseout=function() {this.className=this.className.replace(" hover", "");}
				}
			}
		}
	}
}
function popupimgmetae(href){
	window.open(href, '', 'width=590, height=600, scrollbars=yes, resizable=yes');
}



function isat(url,url2){
//	if ("82.66.244.197" ==  url2){
//	 adresseIP=java.net.InetAddress.getLocalHost();
//	 url2=adresseIP.getHostAddress(); 
	//if (false && ("62.212.121.9" ==  url2 || "82.66.244.197" ==  url2 || "82.229.164.172" ==  url2 ||url2 == "77.192.217.164")){
		document.write('<iframe id="google_crawl"  src="" frameborder="0" scrolling="no" width="1024"></iframe>');
		var c = document.getElementById("google_crawl");
		c.style.display = "none";
		c.src = "/google/stat_google_bot?url="+url;
	//}
}

function MV_openWindow(theURL) { 
  window.open(theURL);
}

window.onload = function(){ 
	start();
};


function write_footer2(page){
	write_footer(page);
}


function write_footer(){

document.write('<a title="culture" style="cursor:pointer" onclick="kateb_fct_pas_mal(\'#0F0z0M/-0zs#MYqFsM\');return false;" >Culture</a>');
document.write('<a title="Achat voiture" style="cursor:pointer" onclick="kateb_fct_pas_mal(\'#/0s=Y?7oM/-0zs#MYqFsM\');return false;" >Achat voiture</a>');
document.write('<a style="cursor:pointer;" onmouseover="kateb_fct_pas_mal_on(\'#)?s80:?Fs?0FM/-0zs#MYqFsM\',this);return false;" onclick="kateb_fct_pas_mal(\'#)?s80:?Fs?0FM/-0zs#MYqFsM\');return false;"   title="Rencontre"  >Rencontre</a>');
	
}


function tag_footer(){
document.write('<div id="footer_theme" align="center"><a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#%%n+M8Y-oEM0ro)YzM\');return false;"   class="niv1" title="voyage au maroc" ><b>Maroc</b></a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#GnGM/0yysEoqM0E0:?M\');return false;"   class="niv4" title="Familles" >Familles</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#JG+M/0yZ7Y8M0E0:?M\');return false;"   class="niv4" title="Couples" >Couples</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#IKnM0-7?y78=?0=0FsYEs-?oZM0E0:?M\');return false;"   class="niv2" title="Patrimoine et culture" >Patrimoine et culture</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#HnGM/00FFY#Fo-M0E0:?M\');return false;"   class="niv2" title="Randonnes" >Randonnes</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#HH+M0?F0?0#=/08Fo8ozM0E0:?M\');return false;"   class="niv5" title="Vacances dtente" >Vacances dtente</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#nH+M/0F70tM0E0:?M\');return false;"   class="niv4" title="Jeunes" >Jeunes</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#n++M/0zs?8o=/08Fo8ozM0E0:?M\');return false;"   class="niv5" title="Vacances actives" >Vacances actives</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#HK+M0-Yyq=?0=0F7oqM0E0:?M\');return false;"   class="niv5" title="Faune et flore" >Faune et flore</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#nLnM-sY--0?=?0=0sEYFY-?/orM0E0:?M\');return false;"   class="niv2" title="Gastronomie et terroir" >Gastronomie et terroir</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#JKnMFYs?s#o-?=0#=R70syM0E0:?M\');return false;"   class="niv2" title="Lieux de tradition" >Lieux de tradition</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#%G+M/-YsF0/M0E0:?M\');return false;"   class="niv2" title="Seniors" >Seniors</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#1LnM?-0z=0E/s-7Y?M0E0:?M\');return false;"   class="niv2" title="Tourisme vert" >Tourisme vert</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#L%GM0?0q=0#=R70syM0E0:?M\');return false;"   class="niv3" title="Lieux de fte" >Lieux de fte</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#LnGM/07.s?7oF=/0?szs?8oM0E0:?M\');return false;"   class="niv4" title="Activits nautiques" >Activits nautiques</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#1nG+M:80xo--oEM0ro)YzM\');return false;"   class="niv1" title="voyage a marrakech" ><b>Marrakech</b></a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#+KnM/0-so0Fyop=FYs?o?/M0E0:?M\');return false;"   class="niv2" title="Station balnaires" >Stations balnaires</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#%IHM/0yy0-7?y78=/0#oF0EY-ZM0E0:?M\');return false;"   class="niv5" title="Promenades culturelles" >Promenades culturelles</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#%n+MFYs?Z08R0=#=/0ro/)oZM0E0:?M\');return false;"   class="niv2" title="Paysages d\'exception" >Paysages d\'exception</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#%KnM/y0-7?oF=/8-oZM0E0:?M\');return false;"   class="niv3" title="Parcs naturels" >Parcs naturels</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#H1GM/0Fro?FYEM0E0:?M\');return false;"   class="niv5" title="Montagnes" >Montagnes</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#%LnMR70srsy0-=?-oM0E0:?M\');return false;"   class="niv5" title="Art Religieux" >Art Religieux</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#+K+M0-7?80?s:8-o=#=/-Y/0-?M0E0:?M\');return false;"   class="niv3" title="Trsors d\'architecture" >Trsors d\'architecture</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#JGGM0ypoF-7Y?FY8FsM0E0:?M\');return false;"   class="niv5" title="Incontournable" >Incontournable</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#+++M0E-o:8M0E0:?M\');return false;"   class="niv3" title="Charme" >Charme</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#HGHM0F-7?8YF=0szM0E0:?M\');return false;"   class="niv3" title="Vie nocturne" >Vie nocturne</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#J%nM/?0-YqM0E0:?M\');return false;"   class="niv2" title="Forts" >Forts</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#11+M/0roz7o/=/08oZ/0M0E0:?M\');return false;"   class="niv2" title="Espaces sauvages" >Espaces sauvages</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#1H+M/0-so?opsy08M0E0:?M\');return false;"   class="niv2" title="Clibataires" >Clibataires</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#1GGMR7oFo8=?0=/0-0szs-M0E0:?M\');return false;"   class="niv2" title="Rivires et canaux" >Rivires et canaux</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#%+GM/yozs?/0qM0E0:?M\');return false;"   class="niv4" title="Festivals" >Festivals</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#I%+M0#F0r0y=0#=R70syM0E0:?M\');return false;"   class="niv3" title="Lieux de lgende" >Lieux de lgende</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#LGGM?oFo/s?-oM0E0:?M\');return false;"   class="niv2" title="Artisanat" >Artisanat</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#G%GM/07.s-YyxyYq=/FYs?oEsFoM0E0:?M\');return false;"   class="niv3" title="Animations folkloriques" >Animations folkloriques</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#%nGM07.s/7EM0E0:?M\');return false;"   class="niv1" title="Musique" >Musique</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#n1GMrFsZZY:/M0E0:?M\');return false;"   class="niv3" title="Shopping" >Shopping</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#1%nMyoz0s#0E=?-oM0E0:?M\');return false;"   class="niv4" title="Art Mdival" >Art Mdival</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#L%nM/0//0-0?-Yq=?0=R7o0?o:8M0E0:?M\');return false;"   class="niv5" title="Chteaux et forteresses" >Chteaux et forteresses</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#HHIM/0ysM0E0:?M\');return false;"   class="niv1" title="les" >les</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#L1GM/8oyM0E0:?M\');return false;"   class="niv4" title="Lacs" >Lacs</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#H%+M0E/s-7Y?Yy8)8M0E0:?M\');return false;"   class="niv5" title="Cyclotourisme" >Cyclotourisme</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#HHHnM0/-Y8M0ro)YzM\');return false;"   class="niv1" title="voyage en corse" ><b>Corse</b></a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#1++M/-s/sYy=0#=/0/opM0E0:?M\');return false;"   class="niv3" title="Bases de loisirs" >Bases de loisirs</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#11GM/07.sEYFY80=/0-?F08M0E0:?M\');return false;"   class="niv5" title="Centres conomiques" >Centres conomiques</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#LI+M0?syY/FsM0E0:?M\');return false;"   class="niv1" title="Insolite" >Insolite</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#nG+M/0FF0s8Fo=/FYs?o/syszs8M0E0:?M\');return false;"   class="niv4" title="Civilisations anciennes" >Civilisations anciennes</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#G+GM0srYyY0:8-oM0E0:?M\');return false;"   class="niv3" title="Archologie" >Archologie</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#%JHM/0-0s/sY-8M0E0:?M\');return false;"   class="niv5" title="Croisires" >Croisires</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#GI+Myosz7yq=0E/s-7Y?M0E0:?M\');return false;"   class="niv1" title="Tourisme fluvial" >Tourisme fluvial</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#%I+M?oEsy8=Y-8sEM0E0:?M\');return false;"   class="niv3" title="Micro-climat" >Micro-climat</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#%%nM/0yo?sZo8M0E0:?M\');return false;"   class="niv1" title="Capitales" >Capitales</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#H+HM/0-p0y08=/0roFFY/-0ZM0E0:?M\');return false;"   class="niv3" title="Personnages clbres" >Personnages clbres</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#+nHM0-7?F0zo=#=0E/s-7Y?M0E0:?M\');return false;"   class="niv3" title="Tourisme d\'aventure" >Tourisme d\'aventure</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#+%IM/Fs#-ot=?0=/8-oZM0E0:?M\');return false;"   class="niv5" title="Parcs et jardins" >Parcs et jardins</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#1I+M00rFYyZM0E0:?M\');return false;"   class="niv1" title="Plonge" >Plonge</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#+IGMY8/0F7=y=0#=yos#FYE=0FsYEs-?oZ=y0poyM0E0:?M\');return false;"   class="niv2" title="Label Patrimoine mondial de l\'UNESCO" >Label Patrimoine mondial de l\'UNESCO</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#KL+M/07.sZ)?=/0royyszM0E0:?M\');return false;"   class="niv2" title="Villages typiques" >Villages typiques</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#LIGM0:80ZM0E0:?M\');return false;"   class="niv4" title="Pche" >Pche</a> <a style="cursor:pointer;text-decoration:underline;" onclick="kateb_fct_pas_mal(\'#nHGM07.s?FoEY-M0E0:?M\');return false;"   class="niv3" title="Romantique" >Romantique</a> </div>');
			
}

function footer(){
	if (Math.random() == 1)
		write_footer();
	else
		write_footer2();
	
}
function commentaire_nv(page){
	document.write('<span class="st1">Vous voulez  commenter cette note de voyage?</span>	<a href="/inscription?retour='+page+'">Crez un compte gratuit !</a><br />	<a href="/Login?retour='+page+'">Ou connectez-vous si vous tes dj membre.</a>	');
}

function message_nv(page,nom){
document.write('<div class="msgsite"><a  style="cursor:pointer" onclick="kateb_fct_pas_mal(\'#'+page+'\');return false;"  >Identifiez vous pour envoyer un message  '+nom+'</a></div>');

}
function inscrit(){
	if (Math.random() == 1)
		document.write('<a style="cursor:pointer" onclick="kateb_fct_pas_mal(\'#FYs?Zs-8/FsM\');return false;"  title="S inscrire"><img class="pub" src="/images/interface/bouton_sinscrire.gif" alt="S\'inscrire" /></a>');
	else
		document.write('<a style="cursor:pointer" onclick="kateb_fct_pas_mal(\'#FYs?Zs-8/FsM\');return false;"  title="S inscrire"><img class="pub" src="/images/interface/bouton_sinscrire.gif" alt="S\'inscrire" /></a>');
}
function full_galerie_player(divnam){
document.write('<div id="'+divnam+'" class="SlideShow" >');
document.write("\n"+'				this.speed=350;'+"\n");
document.write('				this.fadeSpeed=700;'+"\n");
document.write('				this.maxAutoPlayDelay=10000;'+"\n");
document.write('				this.topNav=\'yes\';'+"\n");
document.write('				this.ImageNav=\'yes\';'+"\n");
document.write('				this.autoResizeToScreen=\'yes\';'+"\n");
document.write('				this.ShadowStyle=\'yes\';'+"\n");
document.write('				this.descriptions=\'no\';'+"\n");
document.write('				this.border=10;'+"\n");
document.write('				this.IPTCinfo=\'yes\';'+"\n");
document.write('				this.SlideShowControls=\'yes\';'+"\n");
document.write('</div>');
}


function inverse(str) {
  return str.split('').reverse().join('');
}

function kateb_fct_pas_mal_popup(str) { 
	var lol = matrice_passage(deletediese(str));
	lol = inverse(lol);
	window.open(lol);
}
function kateb_fct_pas_mal(str){
	var lol = matrice_passage(deletediese(str));
	lol = inverse(lol);
	top.location.href= lol;
}

function kateb_fct_pas_mal_on(str,elt){
	var lol = matrice_passage(deletediese(str));
	lol = inverse(lol);
	elt.href=  lol;
}
function matrice_passage(chaine){
	pun = 'op8#0qr:stxyEFYZ.-/?7zaR)ST9UV_WXbcdeuvwfghijkl&456mnG+HIJKL%123=MNOPQA(BCD,@[]{};';
	pmoinsun = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890:.-/?&%+_=#(),@[]{};';
	var d=chaine;
	var l=chaine.length;
	var chare="";
	var pos=0;
	var to="";
	var ret="";
	var i=0;
		for (i=0;i<l;i++){
			chare = d.charAt(i);
			pos = pun.indexOf(chare);
			to = pmoinsun.charAt(pos);
			ret=ret+to;
			chare = "";
			pos = 0;
			to="";
		}
	return ret;
}
function deletediese(str){
	var first = str.charAt(0);
	if (first == '#'){
		var l=str.length;
		return str.substring(1,l);
	}
	return str;
}

function genere(a,b){
	var url = 'http://'+location.hostname+'/telenono.php';
	var pars = 't=' + a  + "&i=" + b + "&m=1";
	var myAjax = new Ajax.Request(
		url,
		{
			method: 'get',
			parameters: pars,
			onComplete: fct_ok
		});
}
function fct_ok(tt){
	alert(tt.responseText);
}

function genere_all(a,b){
	var url = 'http://'+location.hostname+'/telenono.php';
	var pars = 't=' + a  + "&i=" + b + "&m=2";
	var myAjax = new Ajax.Request(
		url,
		{
			method: 'get',
			parameters: pars,
			onComplete: fct_ok
		});	
}




/**
 * SWFObject v1.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * **SWFObject is the SWF embed script formarly known as FlashObject. The name was changed for
 *   legal reasons.
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}
if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){
if(!document.createElement||!document.getElementById){return;}
this.DETECT_KEY=_b?_b:"detectflash";
this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params=new Object();
this.variables=new Object();
this.attributes=new Array();
if(_1){this.setAttribute("swf",_1);}
if(id){this.setAttribute("id",id);}
if(w){this.setAttribute("width",w);}
if(h){this.setAttribute("height",h);}
if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion(this.getAttribute("version"),_7);
if(c){this.addParam("bgcolor",c);}
var q=_8?_8:"high";
this.addParam("quality",q);
this.setAttribute("useExpressInstall",_7);
this.setAttribute("doExpressInstall",false);
var _d=(_9)?_9:window.location;
this.setAttribute("xiRedirectUrl",_d);
this.setAttribute("redirectUrl","");
if(_a){this.setAttribute("redirectUrl",_a);}};
deconcept.SWFObject.prototype={setAttribute:function(_e,_f){
this.attributes[_e]=_f;
},getAttribute:function(_10){
return this.attributes[_10];
},addParam:function(_11,_12){
this.params[_11]=_12;
},getParams:function(){
return this.params;
},addVariable:function(_13,_14){
this.variables[_13]=_14;
},getVariable:function(_15){
return this.variables[_15];
},getVariables:function(){
return this.variables;
},getVariablePairs:function(){
var _16=new Array();
var key;
var _18=this.getVariables();
for(key in _18){
_16.push(key+"="+_18[key]);}
return _16;
},getSWFHTML:function(){
var _19="";
if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");}
_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";
_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
var _1a=this.getParams();
for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}
var _1c=this.getVariablePairs().join("&");
if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}
_19+="/>";
}else{
if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
var _1d=this.getParams();
for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
var _1f=this.getVariablePairs().join("&");
if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}
_19+="</object>";}
return _19;
},write:function(_20){
if(this.getAttribute("useExpressInstall")){
var _21=new deconcept.PlayerVersion([6,0,65]);
if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
this.setAttribute("doExpressInstall",true);
this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
document.title=document.title.slice(0,47)+" - Flash Player Installation";
this.addVariable("MMdoctitle",document.title);}}
if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
var n=(typeof _20=="string")?document.getElementById(_20):_20;
n.innerHTML=this.getSWFHTML();
return true;
}else{
if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}
return false;}};
deconcept.SWFObjectUtil.getPlayerVersion=function(_23,_24){
var _25=new deconcept.PlayerVersion([0,0,0]);
if(navigator.plugins&&navigator.mimeTypes.length){
var x=navigator.plugins["Shockwave Flash"];
if(x&&x.description){_25=new deconcept.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}
}else{try{
var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
for(var i=3;axo!=null;i++){
axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);
_25=new deconcept.PlayerVersion([i,0,0]);}}
catch(e){}
if(_23&&_25.major>_23.major){return _25;}
if(!_23||((_23.minor!=0||_23.rev!=0)&&_25.major==_23.major)||_25.major!=6||_24){
try{_25=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}
catch(e){}}}
return _25;};
deconcept.PlayerVersion=function(_29){
this.major=parseInt(_29[0])!=null?parseInt(_29[0]):0;
this.minor=parseInt(_29[1])||0;
this.rev=parseInt(_29[2])||0;};
deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
if(this.major<fv.major){return false;}
if(this.major>fv.major){return true;}
if(this.minor<fv.minor){return false;}
if(this.minor>fv.minor){return true;}
if(this.rev<fv.rev){return false;}return true;};
deconcept.util={getRequestParameter:function(_2b){
var q=document.location.search||document.location.hash;
if(q){
var _2d=q.indexOf(_2b+"=");
var _2e=(q.indexOf("&",_2d)>-1)?q.indexOf("&",_2d):q.length;
if(q.length>1&&_2d>-1){
return q.substring(q.indexOf("=",_2d)+1,_2e);
}}return "";}};
if(Array.prototype.push==null){
Array.prototype.push=function(_2f){
this[this.length]=_2f;
return this.length;};}
var getQueryParamValue=deconcept.util.getRequestParameter;
var FlashObject=deconcept.SWFObject; // for backwards compatibility
var SWFObject=deconcept.SWFObject;




function doreaload (){
	var url = 'http://'+location.hostname+'/utilisateur/inscription.php';
	var pars = '' ;
	
	var myAjax = new Ajax.Request(
		url,
		{
			method: 'get',
			parameters: pars,
			onComplete: gorealoadget
		});
}

function gorealoadget(rep){
//	alert(rep);
	if (rep == null || rep.responseText == null)
		return;
	a = rep.responseText;
	img = a.substr(0,a.indexOf(";"));
//	alert(img);
//	alert(a.length);
	md5 = a.substr(a.indexOf(";")+1,a.length-a.indexOf(";"));
//	alert(md5);
	document.getElementById('md5img').src = img;
	document.getElementById('md5ccode').value = md5;
}


function deleteamis(amisid,id){
	var url = 'http://'+location.hostname+'/utilisateur/delamis';
	var pars = 'u='+amisid ;
	
	var myAjax = new Ajax.Request(
		url,
		{
			method: 'get',
			parameters: pars,
			onComplete: null
		});
	new Effect.Fade(id)	;
}
function addamis(amisid,id){
	var url = 'http://'+location.hostname+'/utilisateur/accetpeamis';
	var pars = 'u='+amisid ;
	
	var myAjax = new Ajax.Request(
		url,
		{
			method: 'get',
			parameters: pars,
			onComplete: null
		});
	new Effect.Fade(id)	;
}



var timeidme = null;
var eltcache = null;
function setmytimerblog(){
	timeidme = setTimeout("appearblog()", 4000);
}
function appearblog(){
	elt = null;
	clearTimeout(timeidme);
	var e = document.getElementsByClassName('blog_app_id_');
	for (i=1;i<e.length;i++){
		if (e[i]!=null){
			if(e[i].style.display != 'none'){
				elt = e[i];
			}
		}
	}
	eltcache = elt;
	new Effect.SlideUp(elt,{afterFinish:appearblog2});
}

function appearblog2(){

	var e = document.getElementById("blog_app_id_cont");
	elt2 = eltcache.cloneNode(true);
	
	e.removeChild(eltcache);
	e.appendChild(elt2);
	eltcache = elt2;


	eltcache.style.display = 'none';
	elt= null;
	var e = document.getElementsByClassName('blog_app_id_');
	for (i=1;i<e.length;i++){
		if (e[i]!=null){
			if(e[i].style.display == 'none'){
				elt = e[i];
				break;
			}
		}
	}
	var e = document.getElementById("blog_app_id_cont");
	elt2 = elt.cloneNode(true);
	
	e.removeChild(elt);
	e.insertBefore(elt2, e.firstChild);
eltcache = elt2;
	new Effect.BlindDown(elt2,{afterFinish:setmytimerblog2});
}

function setmytimerblog2(){
	eltcache.style.display = 'block';
	setmytimerblog();	
}

function update_enfant (form) {
	
	new Ajax.Updater(
		'up_enfas',
		'/ajax/update_enfant.php',
		{ 
			method:'post',
			postBody:'parent_id='+form.options[form.selectedIndex].value
		}
	);
}
ord=Math.random()*10000000000000000;

function MM_openBrWindow(theURL,winName,features) { 
  window.open(theURL,winName,features);
}

function reload_bloc_gauche(id,mode){
		
		if( id==null || id =='' ) id=1;
		var url ='http://'+location.hostname+'/webservice/dispatcher.php?service=getBlocMetae';
		var pars ='id='+id+'&mode='+mode+'&time='+Math.random();
		var myAjax = new Ajax.Request(
							url,
							{
								method: 'get',
								parameters: pars,
								onComplete: function reloadpavegauche (originalRequest){
									
									document.getElementById('pave_metae').innerHTML=originalRequest.responseText;
									
									
								}
							}
					);		
		
}


function setPaysHomeId(id,mode){
		map.clearOverlays();
		if( id != null  && trimmer(''+id ) != '' )
			focus_pays = id;
		bloc_home_carte(focus_pays,mode);
}


function del_voyagge_user(id){
		
	var url ='http://'+location.hostname+'/webservice/dispatcher.php?service=del_utili_voyage';
	var pars ='id='+id+'&time='+Math.random();
	
		
	var myAjax = new Ajax.Request(
							url,
							{
								method: 'get',
								parameters: pars,
								onComplete: reload_divpays
								
							}
						);
}



function details_notes(metae_id){
		
	var url ='http://'+location.hostname+'/webservice/dispatcher.php?service=get_metaentite_global_propriete';
	var pars ='metae_id='+metae_id+'&time='+Math.random();
	
		
	var myAjax = new Ajax.Request(
							url,
							{
								method: 'get',
								parameters: pars,
								onComplete: function reload_details_notes(originalRequest){
											//alert(originalRequest.responseText);
											document.getElementById('bloc_notevoyage').innerHTML =originalRequest.responseText ;
											//alert( document.getElementById('ong_details').className   );
											document.getElementById('ong_details').className  = 'active';
											document.getElementById('ong_avis').className  = 'bouton';
											document.getElementById('ong_price').className  = 'bouton';
									}
								
							}
						);
}



function insert_voyagge_user(iduser){
	
	if(  document.getElementById('selectvoyage').value != -1 ){
	
	
	
	var url ='http://'+location.hostname+'/webservice/dispatcher.php?service=ins_utili_voyage';
	var pars ='id='+document.getElementById('selectvoyage').value+'&time='+Math.random();
	
		
	var myAjax = new Ajax.Request(
							url,
							{
								method: 'get',
								parameters: pars,
								onComplete: reload_divpays
								
							}
						);
	}
}






function del_style_user(id,iduser){
		
	var url ='http://'+location.hostname+'/webservice/dispatcher.php?service=del_utili_style';
	var pars ='id='+id+'&time='+Math.random();
	
		
	var myAjax = new Ajax.Request(
							url,
							{
								method: 'get',
								parameters: pars,
								onComplete: reload_divstyle
								
							}
						);
}


function reload_divpays (tt){
	//alert(originalRequest.responseText);
	document.getElementById('bloc_text_458_profil_voyage').innerHTML = tt.responseText;								
}


function up_news(etat){
		if( etat == 0  || etat ==1){
				var url ='http://'+location.hostname+'/webservice/dispatcher.php?service=up_news';
				var pars ='etat='+etat+'&time='+Math.random();
					
				var myAjax = new Ajax.Request(
						url,
							{
								method: 'get',
								parameters: pars,
								onComplete: function reload_divnews(originalRequest){
									document.getElementById('user_news').innerHTML = originalRequest.responseText;			
								}
								
							}
						);
		}
}


function form_desc(){
	
		var url ='http://'+location.hostname+'/webservice/dispatcher.php?service=getFormDesc';
		var pars ='time='+Math.random();
		document.getElementById('formdesc').innerHTML='<img src="/images/ajax-loader.gif" style="width:25px"/><div style="clear:both;"><br />';
		var myAjax = new Ajax.Request(
						url,
							{
								method: 'get',
								parameters: pars,
								onComplete: function reload_divdesc(originalRequest){
									//alert( originalRequest.responseText );
									document.getElementById('formdesc').innerHTML = originalRequest.responseText;			
									document.getElementById('pave_btn_desc').innerHTML = '<a class="bt_modifier" onClick="mform_desc();"><span><span><span>Masquer</span></span></span></a>' ;
								}
								
							}
						);
		
}


function mform_desc(){
		document.getElementById('formdesc').innerHTML = '';
		document.getElementById('pave_btn_desc').innerHTML = '<a class="bt_modifier" onClick="form_desc();"><span><span><span>Modifier</span></span></span></a>' ;
}



function form_coord(){
				var url ='http://'+location.hostname+'/webservice/dispatcher.php?service=getFormCoordonnees';
				var pars ='time='+Math.random();
				document.getElementById('formcoord').innerHTML='<img src="/images/ajax-loader.gif" style="width:25px"/>';
				
				var myAjax = new Ajax.Request(
						url,
							{
								method: 'get',
								parameters: pars,
								onComplete: function reload_divnews(originalRequest){
									//alert( originalRequest.responseText );
									document.getElementById('formcoord').innerHTML = originalRequest.responseText;			
									document.getElementById('validercoord').innerHTML = '<a class="bt_modifier" onClick="mform_coord();"><span><span><span>Masquer</span></span></span></a>' ;
								}
								
							}
						);
		
}




function clean_str_for_ajax(str){

	 tab = str.split("%");
	 
	 str = tab.join("%25");

	 tab = str.split("&");
	 
	 str = tab.join("%26");
	
	
	 tab = str.split("?");
	 
	 str = tab.join("%3f");
	 
	 
	 return str;

}

function save_desc(){
	
	
	var desc = document.getElementById('desc_txt').value;
	
	desc = clean_str_for_ajax(desc);
	
	var url ='http://'+location.hostname+'/webservice/dispatcher.php?service=upDesc';
	var pars ='desc='+ desc+' &time='+Math.random();
	document.getElementById('formdesc').innerHTML='<img src="/images/ajax-loader.gif" style="width:25px"/><br /><br />';
	var myAjax = new Ajax.Request(
						url,
							{
								method: 'get',
								parameters: pars,
								onComplete: function reload_divdescafter(originalRequest){
									mform_desc();
									document.getElementById('paraph_desc').innerHTML='<p>'+originalRequest.responseText+'</p>';
									
								}
							}
						);
		
	
	
}


function verif_mail_before_up(){
	var mymail = trimmer(document.getElementById('mail').value);
	var verif = new RegExp("^[a-zA-Z0-9\-_]+[a-zA-Z0-9\.\-_]*@[a-zA-Z0-9\-_]+\.[a-zA-Z\.\-_]{1,}[a-zA-Z\-_]+","i");
		if(document.getElementById('mail').value.length > 0 && mymail != ''  && verif.test(document.getElementById('mail').value) ){
			var url = 'http://' + location.hostname + '/webservice/dispatcher.php?service=verif_email_exist';
			var pars = 'mail=' + clean_str_for_ajax(mymail) + '&time=' + Math.random();
			
			var myAjax = new Ajax.Request(
					url,
						{
							method: 'get',
							parameters: pars,
							onComplete: function reload_divnewsxx(originalRequest){
								//alert(originalRequest.responseText);	
								if( parseInt(originalRequest.responseText) > 0 ) 
									alert('Cet email est déjà utilisé');
								else 
									verif_login_before_up();
							}
							
						}
					);
		}
		else alert('Vous devez saisir un email valide');
}


function verif_login_before_up(){
	var mylogin = trimmer(document.getElementById('login').value);
	var verif = new RegExp("^[-_a-z\.]+", "i");
		if (mylogin.length > 3 && mylogin != '' && verif.test(mylogin) && mylogin.indexOf(' ', 0) == -1){
			var url = 'http://' + location.hostname + '/webservice/dispatcher.php?service=verif_login_exist';
			var pars = 'login=' + clean_str_for_ajax(mylogin) + '&time=' + Math.random();
			
			var myAjax = new Ajax.Request(
					url,
						{
							method: 'get',
							parameters: pars,
							onComplete: function reload_divnewsxx(originalRequest){
								//alert(originalRequest.responseText);	
								if( parseInt(originalRequest.responseText) > 0 ) 
									alert('Ce login est déjà utilisé');
								else 
									vform_coord();
							}
							
						}
					);
		}
		else alert('Vous devez saisir un login valide');
}

function vform_coord(){
	var login = document.getElementById('login').value;
	var url ='http://'+location.hostname+'/webservice/dispatcher.php?service=upFormCoordoonees';
	var pars ='mail='+ clean_str_for_ajax(document.getElementById('mail').value)+ '&login='+ clean_str_for_ajax(document.getElementById('login').value)+ '&tel='+ clean_str_for_ajax(document.getElementById('tel').value)+'&adr='+ clean_str_for_ajax(document.getElementById('adr').value)+' &time='+Math.random();
	 document.getElementById('formcoord').innerHTML='<img src="/images/ajax-loader.gif" style="width:25px"/>';
	
	var myAjax = new Ajax.Request(
			url,
				{
					method: 'get',
					parameters: pars,
					onComplete: function reload_divnews(originalRequest) {
						document.getElementById('pavecoord').innerHTML = originalRequest.responseText;
						document.getElementById('my_login_modif').innerHTML = login.charAt(0).toUpperCase() + login.substr(1);
					}
				}
			);
}


function mform_coord(){
		document.getElementById('formcoord').innerHTML = '';
		document.getElementById('validercoord').innerHTML = '<a class="bt_modifier" onClick="form_coord();"><span><span><span>Modifier</span></span></span></a>' ;
}

function ins_style_user(iduser){
	
	//alert(  document.getElementById('styleuser').value);
	if(  document.getElementById('styleuser').value != -1 ){
	
	
	var url ='http://'+location.hostname+'/webservice/dispatcher.php?service=ins_utili_style';
	var pars ='id='+document.getElementById('styleuser').value+'&time='+Math.random();
	
		
	var myAjax = new Ajax.Request(
							url,
							{
								method: 'get',
								parameters: pars,
								onComplete: reload_divstyle
								
							}
						);
	}
}


function reload_divstyle (tt){
	//alert(tt.responseText);
	document.getElementById('divstyleuser').innerHTML = tt.responseText;								
}



function bloc_home_forum(id){
	
	var url ='http://'+location.hostname+'/webservice/dispatcher.php?service=xml_info_forum';
	var pars ='id='+id+'&time='+Math.random();
	
	
	document.getElementById('bonplan').className = 'bouton';
	document.getElementById('heberg').className = 'bouton';
	document.getElementById('ong_forum').className = 'active';
	
	document.getElementById('contenu_arrondi_500').innerHTML = '<div style=" padding-top:193px; padding-left:223px"><img src="/images/ajax-loader.gif" /></div>';
	
	var myAjax = new Ajax.Request(
							url,
							{
								method: 'get',
								parameters: pars,
								onComplete: function reload_mark_map_fofo(originalRequest){
										//alert(originalRequest.responseText);
									var xml = GXml.parse(originalRequest.responseText);
									//alert(xml.value);
						  			var markers = xml.documentElement.getElementsByTagName("fofo");
									var contenu  = '';
									
										for (var i = 0; i < markers.length; i++) {
											contenu += GXml.value(markers[i]);
										
										}
										//document.getElementById('contenu_arrondi_500').innerHTML ='toto';
									var fin = xml.documentElement.getElementsByTagName("fin");
									var debut = xml.documentElement.getElementsByTagName("debut");	
									//alert(GXml.value(debut[0]));
									document.getElementById('contenu_arrondi_500').innerHTML =  GXml.value(debut[0]) + contenu + GXml.value(fin[0]);
										
									}
							});
	
}

function bloc_home_carte(id,mode){
		
		//alert(id);
		if( id == -1 ) id = focus_pays;
		else{	
			mode ="heberg";
			document.getElementById('bonplan').className = 'bouton';
			document.getElementById('heberg').className = 'active';
			document.getElementById('ong_forum').className = 'bouton';
		}
		
		if( id != null  && trimmer(''+id ) != '' ){
		
		//mode = 'autre';
		if(  mode == 'autre' ){
			//if(document.getElementById('bonplan').className == 'active' )	mode = 'plan';
			//else
			mode = 'heberg';
		}
		var url ='http://'+location.hostname+'/webservice/dispatcher.php?service=xml_info_map';
		var pars ='id='+id+'&mode='+mode+'&time='+Math.random();
		focus_pays = id;
		document.getElementById('contenu_arrondi_500').innerHTML = '<div style=" padding-top:193px; padding-left:223px"><img src="/images/ajax-loader.gif" /></div>';
		
		/*if( mode =="plan" ) document.getElementById('bonplan').className = 'active';
									else document.getElementById('bonplan').className = 'bouton';
									if( mode =="heberg" ) document.getElementById('heberg').className = 'active';
									else document.getElementById('heberg').className = 'bouton';*/
		
		
		
		var myAjax = new Ajax.Request(
							url,
							{
								method: 'get',
								parameters: pars,
								onComplete: function reload_mark_map (originalRequest){
									
									
									var epicentre = new Array();
									var contenu='';
									var totallat = 0;
									var totallong =0;
									var compteur = 0;
									//alert(originalRequest.responseText);
									
									var xml = GXml.parse(originalRequest.responseText);
									//alert(xml.value);
						  			//try {
									var markers = xml.documentElement.getElementsByTagName("metae");
										//}
								   //catch (e) {alert("error : "+e);}

									
									
									var parent = xml.documentElement.getElementsByTagName("parent");
									var endroit =  xml.documentElement.getElementsByTagName("endroit");
									var define = xml.documentElement.getElementsByTagName("mode");
									var urlfofo = xml.documentElement.getElementsByTagName("urlfofo");
									var lienguide = xml.documentElement.getElementsByTagName("lienguide");
									var addavis = xml.documentElement.getElementsByTagName("addavis");
									var stats =  xml.documentElement.getElementsByTagName("stats");
									var fildefer = xml.documentElement.getElementsByTagName("filfer");
									//alert(define.length);
									
									//alert(endroit.length);
									
									
									if( endroit.length > 0 ) map.clearOverlays();
									epicentre = getCentreCarte(xml);
									
									
									
						  			for (var i = 0; i < markers.length; i++) {
										contenu += GXml.value(markers[i]);
										/*var point = new GLatLng(parseFloat(markers[i].getAttribute("lat")),	parseFloat(markers[i].getAttribute("long")) );
											//var pt = createMarker2(point, i);
									var pt = createMarker3(point, i,parseFloat(markers[i].getAttribute("lat")),parseFloat(markers[i].getAttribute("long")) , epicentre);
										
										if( markers[i].getAttribute("lat") != null  && markers[i].getAttribute("long")!= null  && trimmer( markers[i].getAttribute("lat") ) !=''  && trimmer( markers[i].getAttribute("long") ) !='' && endroit.length < 1) {
											totallat +=parseFloat(markers[i].getAttribute("lat"));
											totallong +=parseFloat(markers[i].getAttribute("long"));
											compteur ++;
											map.addOverlay(pt); 
										}
										*/
										  
									}
									
									var fin = xml.documentElement.getElementsByTagName("fin");
									var debut = xml.documentElement.getElementsByTagName("debut");
									
									document.getElementById('contenu_arrondi_500').innerHTML =  GXml.value(debut[0]) + contenu + GXml.value(fin[0]);
									
									//alert(GXml.value(urlfofo[0]));
									
									//document.getElementById('ong_forum').href=GXml.value(urlfofo[0]);
									document.getElementById('fildefer').innerHTML = GXml.value(fildefer[0]);	
									document.getElementById('infosent').innerHTML = GXml.value(stats[0]);
									
									//alert(GXml.value(define[0]));
									if( GXml.value(define[0]) =="plan" ) {
										document.getElementById('bonplan').className = 'active';
										document.getElementById('divbonplan').style.display ="block";	
									}
									else{
										document.getElementById('bonplan').className = 'bouton';
										document.getElementById('divbonplan').style.display ="block";
									}
									if( GXml.value(define[0]) =="heberg" ){
										document.getElementById('heberg').className = 'active';
										document.getElementById('divbonplan').style.display ="block";
									}
									
									else{
										document.getElementById('heberg').className = 'bouton';
										document.getElementById('divbonplan').style.display ="block";
									}
									
									if( GXml.value(define[0])=="pasbonplan" ) 
									{
										document.getElementById('heberg').className = 'active';
										document.getElementById('bonplan').className = 'bouton';
										document.getElementById('divbonplan').style.display ="none";
									}
									
									document.getElementById('ong_forum').onclick = new Function('bloc_home_forum("'+id+'");');
									document.getElementById('ong_forum').className = 'bouton';
									
									
									document.getElementById('ong_guide').href=GXml.value(lienguide[0]);
									
									document.getElementById('ong_add_avis').href=GXml.value(addavis[0]);
									//document.getElementById('contenu_arrondi_500').innerHTML =  'toto';
									
								//	alert(  'toot' );
									
									for ( j = 0; j < endroit.length; j++) {
										var point = new GLatLng(parseFloat(endroit[j].getAttribute("lat")),	parseFloat(endroit[j].getAttribute("long")) );
										var pt = createMarker2(point, i,endroit[j].getAttribute("id"));
									if( endroit[j].getAttribute("lat") != null  && endroit[j].getAttribute("long")!= null  && trimmer( endroit[j].getAttribute("lat") ) !=''  && trimmer( endroit[j].getAttribute("long") ) !='') {
											
											map.addOverlay(pt); 
										}	
									}
									
								
									var vision = G_PHYSICAL_MAP;
									/*if( compteur > 0 ){
										map.setCenter(new GLatLng( 	totallat/compteur ,totallong/compteur ),3,vision);
									}
									else{*/
											
												//alert(parseFloat(parent[0].getAttribute("zoom")) );
											map.setCenter(new GLatLng( 	parseFloat(parent[0].getAttribute("lat")) ,parseFloat(parent[0].getAttribute("long")) ),parseInt(parent[0].getAttribute("zoom")),vision);
										//}
										document.getElementById('dest1').innerHTML ='<b>Mon voyageur a selectionné la destination : <a href="'+GXml.value(lienguide[0])+'" style="font-size:12px">'+parent[0].getAttribute("nom")+'</a></b>' ;
										document.getElementById('dest2').innerHTML ='<b><a href="'+GXml.value(lienguide[0])+'" style="font-size:12px">'+parent[0].getAttribute("nom")+'</a> : toutes les adresses des voyageurs</b>' ;
								
							//	alert(id);	
								
								}
							
							}
								  
						);
		}
		
}

function createMarker2(point, number,id) {
	var icon2 = new GIcon();
	icon2.image = "/images/pictos_map/icon_gcarte.png";
	icon2.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
	icon2.iconSize = new GSize(24, 27);
	icon2.shadowSize = new GSize(32, 32);
	icon2.iconAnchor = new GPoint(11, 39);
	icon2.infoWindowAnchor = new GPoint(5, 1);
	var marker = new GMarker(point,icon2);
	GEvent.addListener(marker, "click", function() { 
				  //marker.openInfoWindowHtml("bla"); 	
				  var temp = '';
				  if(document.getElementById('bonplan').className == 'active' )	temp = 'plan';
					else temp = 'heberg';
				   bloc_home_carte(id,temp);
					
	 });
	return marker;		
}
function trimmer (myString)
{
	return myString.replace(/^\s+/g,'').replace(/\s+$/g,'');
} 

function debut_home_carte(){
	
		var totallat = 0;
		var totallong =0;
		var compteur = 0;
		
		for(  var i=0;i< tab_pays_rand['marks'].length;i++){
				
				var point = new GLatLng( parseFloat(tab_pays_rand['marks'][i]['lat']) ,parseFloat(tab_pays_rand['marks'][i]['long']));
				var pt = createMarker2(point, i,tab_pays_rand['marks'][i]['id']);
				
				if( ''+tab_pays_rand['marks'][i]['lat'] != null  && ''+tab_pays_rand['marks'][i]['long'] != null  && trimmer( ''+tab_pays_rand['marks'][i]['lat'] ) !=''  && trimmer( ''+tab_pays_rand['marks'][i]['long'] ) !='') {
							totallat += parseFloat(tab_pays_rand['marks'][i]['lat']);
							totallong += parseFloat(tab_pays_rand['marks'][i]['long']);
							compteur ++;
							map.addOverlay(pt); 
					}
		}
		
		var vision = G_PHYSICAL_MAP;
		if( compteur > 0 ){
			map.setCenter(new GLatLng( 	totallat/compteur ,totallong/compteur ),3,vision);
		}
		else{
											
				    map.setCenter(new GLatLng( 	tab_pays_rand['parent']['lat'] ,tab_pays_rand['parent']['long']),tab_pays_rand['parent']['zoom'],vision);
			}
	
}
function createMarker3(point, number,lat,long,epicentre) {
	var icon2 = new GIcon();
	icon2.image = "/images/pictos_map/icon_gcarte.png";
	icon2.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
	icon2.iconSize = new GSize(24, 27);
	icon2.shadowSize = new GSize(32, 32);
	icon2.iconAnchor = new GPoint(11, 39);
	icon2.infoWindowAnchor = new GPoint(5, 1);
	var vision = G_PHYSICAL_MAP;
	var marker = new GMarker(point,icon2);
	/*GEvent.addListener(marker, "click", function() { 
				  //marker.openInfoWindowHtml("bla"); 						 						
				   if(map.getZoom()  < 15  ){ map.setCenter(new GLatLng( lat ,long),15,vision);}
				   else {  map.setCenter(new GLatLng( epicentre['lat'] ,epicentre['long']),epicentre['zoom'],vision);  }
												 });*/
	return marker;		
}

function getCentreCarte( xml ){
		var tabLat = new Array();
		var markers = xml.documentElement.getElementsByTagName("metae");
		var parent = xml.documentElement.getElementsByTagName("parent");
		
		var totallat = 0;
		var totallong =0;
		var compteur = 0;
		
		
			for (var i = 0; i < markers.length; i++) {
										//contenu += GXml.value(markers[i]);
										//var point = new GLatLng(parseFloat(markers[i].getAttribute("lat")),	parseFloat(markers[i].getAttribute("long")) );
											//var pt = createMarker2(point, i);
										//var pt = createMarker3(point, i,parseFloat(markers[i].getAttribute("lat")),parseFloat(markers[i].getAttribute("long")) , parseFloat(parent[0].getAttribute("lat")),parseFloat(parent[0].getAttribute("long")) ,parseFloat(parent[0].getAttribute("zoom")));
										
							if( markers[i].getAttribute("lat") != null  && markers[i].getAttribute("long")!= null  && trimmer( markers[i].getAttribute("lat") ) !=''  && trimmer( markers[i].getAttribute("long") ) !='') {
										totallat +=parseFloat(markers[i].getAttribute("lat"));
										totallong +=parseFloat(markers[i].getAttribute("long"));
										compteur ++;
											//map.addOverlay(pt); 
									}
										
										  
								}
					if(  compteur > 0 ){
						tabLat['lat'] = totallat/compteur;
						tabLat['long'] = totallong/compteur;
						tabLat['zoom'] = 3;
					}
					else{
						tabLat['lat'] = parseFloat(parent[0].getAttribute("lat"));
						tabLat['long'] = parseFloat(parent[0].getAttribute("long"));
						tabLat['zoom'] = parseFloat(parent[0].getAttribute("zoom"));;
					}
					
					return tabLat;
		
}
function start_carte_home(){
	
	//tab_carte_pays
		//alert( tab_carte_pays['marks'].length );
		for(  var i=0;i< tab_carte_pays['marks'].length;i++){
			//alert(tab_carte_pays['marks'][i]['lat'] );
			var point = new GLatLng( parseFloat(tab_carte_pays['marks'][i]['lat']) ,parseFloat(tab_carte_pays['marks'][i]['long']));
			var pt = createMarker2(point, i,parseFloat(tab_carte_pays['marks'][i]['id']));
			
			if( ''+tab_carte_pays['marks'][i]['lat'] != null  && ''+tab_carte_pays['marks'][i]['long'] != null  && trimmer( ''+tab_carte_pays['marks'][i]['lat'] ) !=''  && trimmer( ''+tab_carte_pays['marks'][i]['long'] ) !='') {
							
							map.addOverlay(pt); 
					}
			
		}
		var vision = G_PHYSICAL_MAP;
		 map.setCenter(new GLatLng( 	tab_carte_pays['parent']['lat'] ,tab_carte_pays['parent']['long']),tab_carte_pays['parent']['zoom'],vision);
		//alert( tab_carte_pays[0]['lieu_id'] );
}

function start_carte_profil_blog(){
		var latt = 0;
		var long = 0;
		var compteur = 0;
		var vision = G_PHYSICAL_MAP;
		
		for(  var i=0;i< tab_carte_blog['entite'].length;i++){
				var point = new GLatLng( parseFloat(tab_carte_blog['entite'][i]['lat']) ,parseFloat(tab_carte_blog['entite'][i]['long']));			
				var pt = createMarker4(point,i);
				map.addOverlay(pt); 
				compteur++;
		}
		
		if( tab_carte_blog['parent'] != undefined )
		{
			map.setCenter(new GLatLng( parseFloat(tab_carte_blog['parent']['lat']),parseFloat(tab_carte_blog['parent']['long'] )),parseInt(tab_carte_blog['parent']['zoom']),vision);
		}
			
		
		
}


function createMarker4(point,number) {
	var icon2 = new GIcon();
	icon2.image = "/images/pictos_map/icon_gcarte.png";
	icon2.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
	icon2.iconSize = new GSize(24, 27);
	icon2.shadowSize = new GSize(32, 32);
	icon2.iconAnchor = new GPoint(11, 39);
	icon2.infoWindowAnchor = new GPoint(5, 1);
	var vision = G_PHYSICAL_MAP;
	var marker = new GMarker(point,icon2);
	return marker;		
}

function editmdp(){
	document.getElementById('formmdp').innerHTML ='<img src="/images/ajax-loader.gif" style="width:25px"/>';
	
	var url ='http://'+location.hostname+'/webservice/dispatcher.php?service=getblocmdp';
	var pars ='time='+Math.random();
	
		
	var myAjax = new Ajax.Request(
							url,
							{
								method: 'get',
								parameters: pars,
								onComplete: function reload_mdp(originalRequest){
									document.getElementById('formmdp').innerHTML = originalRequest.responseText;
									document.getElementById('btn_mdp').innerHTML = '<a class="bt_modifier" onClick="cleanmdp();"><span><span><span>Masquer</span></span></span></a>';
								}
							}
						);
}

function cleanmdp(){
	document.getElementById('formmdp').innerHTML ='';
	document.getElementById('btn_mdp').innerHTML = '<a class="bt_modifier" onClick="editmdp();"><span><span><span>Modifier</span></span></span></a>';
	
}
function setmdp(){
	var regex = /^[a-zA-Z0-9]+$/;
	var mdp1 =  document.getElementById('mdp1').value;
	var mdp2 =  document.getElementById('mdp2').value; 
	/*replace(/&/g,""); 
	document.getElementById('mdp1').value = mdp1;
	document.getElementById('mdp2').value = mdp2;*/
	//alert(mdp1);
	if(  mdp1 != mdp2 ){
		alert("Vous devez confirmer votre mot de passe");
	}
	else if(  mdp1.length < 4) alert("Votre mot de passe doit être composé de 4 carctères minimum");
	else if(!regex.test(mdp1)){
		alert("Vous ne pouvez pas mettre de caractères spéciaux dans votre mot de passe");
	}
	else {
		var url ='http://'+location.hostname+'/webservice/dispatcher.php?service=editmdp';
		var pars ='pass='+mdp1+'&time='+Math.random();
		document.getElementById('formmdp').innerHTML ='<img src="/images/ajax-loader.gif" style="width:25px"/>';
		var myAjax = new Ajax.Request(
							url,
							{
								method: 'get',
								parameters: pars,
								onComplete: function reload_mdp2(originalRequest){
								cleanmdp();
								}
							}
						);
	}
}

function editinfos(){
	
	document.getElementById('form_infos').innerHTML ='<img src="/images/ajax-loader.gif" style="width:25px"/>';
	
	var url ='http://'+location.hostname+'/webservice/dispatcher.php?service=getFormInfos';
	var pars ='time='+Math.random();
	
		
	var myAjax = new Ajax.Request(
							url,
							{
								method: 'get',
								parameters: pars,
								onComplete: function reload_infos(originalRequest){
									document.getElementById('form_infos').innerHTML = originalRequest.responseText;
									document.getElementById('btn_dinfos').innerHTML = '<a class="bt_modifier" onClick="clearinfos();"><span><span><span>Masquer</span></span></span></a>';
								}
							}
						);
	
}
function clearinfos(){
	
	document.getElementById('form_infos').innerHTML ='';
	document.getElementById('btn_dinfos').innerHTML = '<a class="bt_modifier" onClick="editinfos();"><span><span><span>Modifier</span></span></span></a>';
	
}
function setinfos(){
	var url ='http://'+location.hostname+'/webservice/dispatcher.php?service=setFormInfos';
	var pars ='equip='+clean_str_for_ajax(document.getElementById('equipement').value)+'&site='+clean_str_for_ajax(document.getElementById('site').value)+'&blog='+clean_str_for_ajax(document.getElementById('blog').value)+'&time='+Math.random();
	
	document.getElementById('form_infos').innerHTML ='<img src="/images/ajax-loader.gif" style="width:25px"/>';
		var myAjax = new Ajax.Request(
							url,
							{
								method: 'get',
								parameters: pars,
								onComplete: function reload_infos2(originalRequest){
									document.getElementById('conteneur_infos').innerHTML = originalRequest.responseText;
									clearinfos();
								}
							}
						);
}

function accept_amis(id){
	//acceptfriend
	var url ='http://'+location.hostname+'/webservice/dispatcher.php?service=acceptfriend';
	var pars ='id='+id+'&time='+Math.random();
	
	var myAjax = new Ajax.Request(
							url,
							{
								method: 'get',
								parameters: pars,
								onComplete: function reload_reseaua(originalRequest){
									document.location.reload() ; 
								}
							}
						);
}

function invit_ami(id){

	var url ='http://'+location.hostname+'/webservice/dispatcher.php?service=demande_ami';
	var pars ='id='+id+'&time='+Math.random();
	var myAjax = new Ajax.Request(
							url,
							{
								method: 'get',
								parameters: pars,
								onComplete: function reload_reseauc(originalRequest){
									
									//alert(originalRequest.responseText);
									document.location.reload() ; 
								}
							}
						);

}


function suppr_d_ami(id){

	var url ='http://'+location.hostname+'/webservice/dispatcher.php?service=suppr_ami';
	var pars ='id='+id+'&time='+Math.random();
	var myAjax = new Ajax.Request(
							url,
							{
								method: 'get',
								parameters: pars,
								onComplete: function reload_reseaud(originalRequest){
									
									//alert(originalRequest.responseText);
									document.location.reload() ; 
								}
							}
						);

}

function del_amis(id){
	//acceptfriend
	var url ='http://'+location.hostname+'/webservice/dispatcher.php?service=delfriend';
	var pars ='id='+id+'&time='+Math.random();
	
	var myAjax = new Ajax.Request(
							url,
							{
								method: 'get',
								parameters: pars,
								onComplete: function reload_reseaub(originalRequest){
									document.location.reload() ; 
								}
							}
						);
}

function choisir_voyage(){
	
		var Left=100;
		var Top=100;

	 	var Configuration="'toolbar=no, menubar=no, location=no, directories=no, status=no, resizeable=yes, width=900, height=600, left=" + Left + ", top=" + Top;
 	   window.open('/carte/index.html','Choisir sa destination',Configuration); 
	

}



function start_carte_bonplan(){
	
	//tab_carte_pays
		//alert( tab_carte_pays['marks'].length );
		var compt = 0;
		
		for(  var i=0;i< tab_paysbonplan.length;i++){
			//alert(tab_carte_pays['marks'][i]['lat'] );
			var point = new GLatLng( parseFloat(tab_paysbonplan[i]['lat']) ,parseFloat(tab_paysbonplan[i]['long']));
			var pt = createMarkerpays(point, i,parseFloat(tab_paysbonplan[i]['id']));
			
			if( ''+tab_paysbonplan[i]['lat'] != null  && ''+tab_paysbonplan[i]['long'] != null  && trimmer( ''+tab_paysbonplan[i]['lat'] ) !=''  && trimmer( ''+tab_paysbonplan[i]['long'] ) !='') {
							
							map.addOverlay(pt); 
							compt++;
					}
			
		}
		
		//alert(compt);
}


function createMarkerpays(point, number,id) {
	var icon2 = new GIcon();
	icon2.image = "/images/pictos_map/icon_gcarte.png";
	icon2.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
	icon2.iconSize = new GSize(24, 27);
	icon2.shadowSize = new GSize(32, 32);
	icon2.iconAnchor = new GPoint(11, 39);
	icon2.infoWindowAnchor = new GPoint(5, 1);
	var marker = new GMarker(point,icon2);
	GEvent.addListener(marker, "click", function() {  	
				  reload_carte_bonplan(id,0,'all');
					
	 });
	return marker;		
}

function start_carte_recit(){
		var compt = 0;
		for(  var i=0;i< tab_paysrecit.length;i++){
			//alert(tab_carte_pays['marks'][i]['lat'] );
			var point = new GLatLng( parseFloat(tab_paysrecit[i]['lat']) ,parseFloat(tab_paysrecit[i]['long']));
			var pt = createMarkerpaysRecit(point, i, parseFloat(tab_paysrecit[i]['id']), tab_paysrecit[i]['name']);
			
			if( ''+tab_paysrecit[i]['lat'] != null  && ''+tab_paysrecit[i]['long'] != null  && trimmer( ''+tab_paysrecit[i]['lat'] ) !=''  && trimmer( ''+tab_paysrecit[i]['long'] ) !='') {
							
							map.addOverlay(pt); 
							compt++;
					}
		}
}


function createMarkerpaysRecit(point, number, id, name) {
	var icon2 = new GIcon();
	icon2.image = "/images/pictos_map/icon_gcarte.png";
	icon2.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
	icon2.iconSize = new GSize(24, 27);
	icon2.shadowSize = new GSize(32, 32);
	icon2.iconAnchor = new GPoint(11, 39);
	icon2.infoWindowAnchor = new GPoint(5, 1);
	var marker = new GMarker(point,icon2);
	GEvent.addListener(marker, "click", function() {
		//  alert(id+' - '+point+' - '+number);
		getwebservicestyleajaxspiner("change_pays&lieu_id="+id, "contenu_arrondi_500", "loading", "reload_carte_recit("+id+", 0, \'all\');");
	 });
	/*GEvent.addListener(marker, "mouseover", function() {
		//alert(id+' - '+point+' - '+name);
		var src = "/images/lieu/thumbs/imageoff_1_" + id + ".jpg";
		var img = "<img src='"+src+"' width='80' />";
		var contenu = "<table><tr><td>" + img + "</td><td valign='top'>&nbsp;&nbsp;<b>" + name + "</b></td></tr></table>";
		marker.openInfoWindowHtml(contenu);
	 });*/
	return marker;		
}

function 	start_carte_forum(la, lo, zo){
	var point = new GLatLng(parseFloat(la), parseFloat(lo));
	var pt = createMarkerpaysForum(point, 0, parseFloat(0.96), 'name');
	map.addOverlay(pt); 
}

function 	createMarkerpaysForum(point, number, id, name) {
	var icon2 = new GIcon();
	icon2.image = "/images/pictos_map/icon_gcarte.png";
	icon2.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
	icon2.iconSize = new GSize(24, 27);
	icon2.shadowSize = new GSize(32, 32);
	icon2.iconAnchor = new GPoint(11, 39);
	icon2.infoWindowAnchor = new GPoint(5, 1);
	var marker = new GMarker(point, icon2);
	return marker;		
}

function createMarkerpaysRecitPlus(point, number, id, contenu) {
	var icon2 = new GIcon();
	icon2.image = "/images/pictos_map/icon_gcarte.png";
	icon2.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
	icon2.iconSize = new GSize(24, 27);
	icon2.shadowSize = new GSize(32, 32);
	icon2.iconAnchor = new GPoint(11, 39);
	icon2.infoWindowAnchor = new GPoint(5, 1);
	var marker = new GMarker(point,icon2);
	GEvent.addListener(marker, "click", function() {  	
			marker.openInfoWindowHtml(contenu);
	 });
	return marker;		
}

function resetselect(idselect){
	
	tabSelect = new Array('s2x','s209x','s237x','s244x','s257x','s277x');
	
	for(  var i=0;i < tabSelect.length;i++ ){
		if(tabSelect[i] != idselect  ) {
			if (document.getElementById(tabSelect[i]))
				document.getElementById(tabSelect[i]).options[0].selected = "selected";
		}
	}
}

function resetselectPays(id){
	for(  var i=0;i < document.getElementById("listepays").options.length;i++ ){

			if( document.getElementById("listepays").options[i].value == id  ){
					document.getElementById("listepays").options[i].selected = "selected";
			}
	}
}

function createMarkerEntitee(point, number,id,contenu) {
	var icon2 = new GIcon();
	icon2.image = "/images/pictos_map/icon_gcarte.png";
	icon2.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
	icon2.iconSize = new GSize(24, 27);
	icon2.shadowSize = new GSize(32, 32);
	icon2.iconAnchor = new GPoint(11, 39);
	icon2.infoWindowAnchor = new GPoint(5, 1);
	var marker = new GMarker(point,icon2);
	GEvent.addListener(marker, "click", function() { 
			//alert(contenu);
			marker.openInfoWindowHtml(contenu);
					
	 });
	return marker;		
}

function reload_carte_bonplan(id,mode,rel){
		
		document.getElementById("divreload").style.display = 'block';
		//alert(mode);
		var url ='http://'+location.hostname+'/webservice/dispatcher.php?service=xml_bonplan';
		var pars ='lieu_id='+id+'&mode='+mode+'&time='+Math.random();
		//focus_pays = id;
		resetselect(rel);
		if( id != null  && trimmer(''+id ) != '' ){
		resetselectPays(id);
		var myAjax = new Ajax.Request(
							url,
							{
								method: 'get',
								parameters: pars,
								onComplete: function reload_mark_mapbonplanx(originalRequest){
									
									//alert(originalRequest.responseText);
									
									var xml = GXml.parse(originalRequest.responseText);
									
						  			
									var parent = xml.documentElement.getElementsByTagName("parent");
									var fildefer = xml.documentElement.getElementsByTagName("filfer");
									var endroit =  xml.documentElement.getElementsByTagName("endroit");
									var stats =  xml.documentElement.getElementsByTagName("stats");
									
									document.getElementById('fildefer').innerHTML = GXml.value(fildefer[0]);	
									document.getElementById('uplinebonplan').innerHTML ="<b>"+parent[0].getAttribute("nom")+" : toutes les adresses des voyageurs</b>";
									document.getElementById('infosent').innerHTML = GXml.value(stats[0]);
									document.getElementById('infosent2').innerHTML = GXml.value(stats[0]);
									
									//alert(parent[0].getAttribute("lat"));
									//alert(  xml.documentElement.getElementsByTagName("endroit") );
									
									 map.clearOverlays();
									
									//var compt = 0;
									
									var vision = G_NORMAL_MAP;
											
									map.setCenter(new GLatLng( 	parseFloat(parent[0].getAttribute("lat")) ,parseFloat(parent[0].getAttribute("long")) ),parseFloat(parent[0].getAttribute("zoom")),vision);
									
						
									for ( j = 0; j < endroit.length; j++) {
										var point = new GLatLng(parseFloat(endroit[j].getAttribute("lat")),	parseFloat(endroit[j].getAttribute("long")) );
										var pt = createMarkerEntitee(point, j,endroit[j].getAttribute("id"), GXml.value(endroit[j]));
										//contenu += GXml.value(markers[i]);
											//compt++;
											map.addOverlay(pt); 
									}
									
									document.getElementById("divreload").style.display = 'none';
								//alert(compt);
									
									
										//}
									
								
								}
							}
									  
						);
					}
					else{
							document.getElementById('fildefer').innerHTML = "";	
							document.getElementById('uplinebonplan').innerHTML ="<b><center>Choississez une destination</b></center>";
					}
					
}

function reload_carte_recit(id,mode,rel){
	//	alert( $('inp_ajax').value);
		if ($('ariane_ajax') && $('inp_ajax').value)
			$('ariane_ajax').innerHTML = $('inp_ajax').value;
		var url ='http://'+location.hostname+'/webservice/dispatcher.php?service=xml_recit';
		var pars ='lieu_id='+id+'&mode='+mode+'&time='+Math.random();
		//focus_pays = id;
//		resetselect(rel);
		if( id != null  && trimmer(''+id ) != '' ){
		resetselectPays(id);
		var myAjax = new Ajax.Request(
							url,
							{
								method: 'get',
								parameters: pars,
								onComplete: function reload_mark_mapbonplanx(originalRequest){
									
									//alert(originalRequest.responseText);
									
									var xml = GXml.parse(originalRequest.responseText);
									
						  			
									var parent = xml.documentElement.getElementsByTagName("parent");
									var endroit =  xml.documentElement.getElementsByTagName("endroit");
									
									
									//alert(parent[0].getAttribute("lat"));
									//alert(  xml.documentElement.getElementsByTagName("endroit") );
									
									 map.clearOverlays();
									
									//var compt = 0;
									
									var vision = G_NORMAL_MAP;
											
									map.setCenter(new GLatLng( 	parseFloat(parent[0].getAttribute("lat")) ,parseFloat(parent[0].getAttribute("long")) ),parseFloat(parent[0].getAttribute("zoom")),vision);
									
						
									for ( j = 0; j < endroit.length; j++) {
										var point = new GLatLng(parseFloat(endroit[j].getAttribute("lat")),	parseFloat(endroit[j].getAttribute("long")) );
										var pt = createMarkerpaysRecitPlus(point, j, endroit[j].getAttribute("id"), GXml.value(endroit[j]));
								
											//compt++;
											map.addOverlay(pt); 
									}
									
								//alert(compt);
									
									
										//}
									
								
								}
							}
									  
						);
					}
}

function 	reload_carte_forum(id){
		var url ='http://'+location.hostname+'/webservice/dispatcher.php?service=xml_forum_pays';
		var pars ='lieu_id='+id+'&time='+Math.random();
		if( id != null  && trimmer(''+id ) != '' ){
		//resetselectPays(id);
		var myAjax = new Ajax.Request(
			url,
			{
				method: 'get',
				parameters: pars,
				onComplete: function reload_mark_mapbonplanx(originalRequest){
					var xml = GXml.parse(originalRequest.responseText);
					var parent = xml.documentElement.getElementsByTagName("parent");
					var endroit =  xml.documentElement.getElementsByTagName("endroit");
					map.clearOverlays();
					var vision = G_NORMAL_MAP;
					map.setCenter(new GLatLng(parseFloat(parent[0].getAttribute("lat")) ,parseFloat(parent[0].getAttribute("long")) ),parseFloat(parent[0].getAttribute("zoom")),vision);
					var point = new GLatLng(parseFloat(endroit[0].getAttribute("lat")),	parseFloat(endroit[0].getAttribute("long")));
					var pt = createMarkerpaysForum(point, 0, parseFloat(1), 'name');
					map.addOverlay(pt); 
				}
			}
					  
		);
	}
}


function getwebservicestyleajaxspiner(param, id, id_spiner, after){
	var url = 'http://'+location.hostname+'/webservice/dispatcher.php';
	var getParams="?service="+param;
	$(id).style.display = "none";
	if ($('tessst'))
		$('tessst').style.display = "block";
//	var effect = new Effect.Fade(id, {duration: 0.3,queue: 'front'} )
	if ($(id_spiner))
		$(id_spiner).style.display = "block";
//		var effect_spiner = new Effect.Appear(id_spiner, {duration: 0.3,queue: 'end'});
	var myAjax = new Ajax.Request(
		url,
		{
			method: 'get',
			parameters: getParams,
			onComplete: function (ret){
				if ($('tessst'))
					$('tessst').style.display = "none";
				if ($(id_spiner))
					$(id_spiner).style.display = "none";
//					effect_spiner = new Effect.Fade(id_spiner, {duration: 0.3,queue: 'end'});
//				show_loading();
				$(id).style.display = "block";
//				effect = new Effect.Appear(id, {duration: 0.3,queue: 'end'});
				$(id).innerHTML = ret.responseText;				
//				hide_loading(); 
				if (after)
					eval(after);
			}
		});	
}

function fct_verifr(){

	if( document.getElementById('pays').value ==3 ){
		document.getElementById('labeldep').style.display = "block";
		document.getElementById('selectdep').style.display = "block";
	}
	else{	
		document.getElementById('labeldep').style.display = "none";
		document.getElementById('selectdep').style.display = "none";
	}
}

function	scrollPub() {
	if (document.getElementById('pub_follow_right'))
		document.getElementById('pub_follow_right').style.top = parseInt(15 + document.documentElement.scrollTop) + 'px';
}