function NewWindow(mypage, myname, w, h, scroll, resizable) 
		{
			var winl = (screen.width - w) / 2;
			var wint = (screen.height - h) / 2;
			winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable='+resizable+'';		
			win = window.open(mypage, myname, winprops);
			if (parseInt(navigator.appVersion) >= 4) 
				{ 
					win.window.focus();
				}
		}
		
function frejus_map()
{
	if(document.itineris.itineris_input.value != "")
		{
		NewWindow('http://maps.google.fr/maps?lsm=1&daddr=1196+Boulevard+de+la+Mer,+83600+Fr%C3%A9jus&geocode=CeSaGS9acQdiFdCFlgIdwOZmACkjl34fXr3OEjEz16uBmqcahA&dirflg=&saddr=' + document.itineris.itineris_input.value + '&vps=1&f=li&hl=fr&jsv=223a&sll=43.419088,6.743744&sspn=0.005455,0.00912','google','800','600','yes','yes');
		}		
}

function draguignan_map()
{
	if(document.itineris.itineris_input.value != "")
		{
		NewWindow('http://maps.google.fr/maps?lsm=1&daddr=15+Rue+de+l%27Observance,+83300+Draguignan&geocode=CaQ9cosMYGAsFY9emAIdoK5iACk1DKjpjavOEjF52DZG6NAziQ&dirflg=&saddr=' + document.itineris.itineris_input.value + '&vps=1&f=li&hl=fr&jsv=223a&sll=43.540111,6.467232&sspn=0.005444,0.00912','google','800','600','yes','yes');
		}		
}

function roquebrune_map()
{
	if(document.itineris.itineris_input.value != "")
		{
		NewWindow('http://maps.google.fr/maps?lsm=1&daddr=15+Grande+Rue+Andr%C3%A9+Cabasse,+83520+Roquebrune-sur-Argens&geocode=CaRAiatnn7TNFVfmlgId_EdlAClLY2CYNLvOEjH3Apg5ZhzBsQ&dirflg=&saddr=' + document.itineris.itineris_input.value + '&vps=1&f=li&hl=fr&jsv=223a&sll=43.443799,6.637564&sspn=0.005453,0.00912','google','800','600','yes','yes');
		}		
}

function stemaxime_map()
{
	if(document.itineris.itineris_input.value != "")
		{
		NewWindow('http://maps.google.fr/maps?lsm=1&daddr=4+Route+Jean+Corona,+83120+Sainte-Maxime&geocode=CTOl_fE_FpvBFUXrlAId1T5lACmjsvQ77LjOEjG3Ok7B47SanQ&dirflg=&saddr=' + document.itineris.itineris_input.value + '&vps=1&f=li&hl=fr&jsv=223a&sll=43.313989,6.635221&sspn=0.005464,0.00912','google','800','600','yes','yes');
		}		
}

function privacy()
{
	NewWindow('http://' + window.location.host +'/privacy.php','UFC','650','590','yes','no');
}

function aide_titre_court()
{
	NewWindow('pop/titre-court.php','Rédacteur','650','590','yes','no');
}

function aide_photo()
{
	NewWindow('pop/photo.php','Rédacteur','650','590','yes','no');
}

function aide_titre_long()
{
	NewWindow('pop/titre-long.php','Rédacteur','650','590','yes','no');
}

function aide_texte()
{
	NewWindow('pop/texte.php','Rédacteur','650','590','yes','no');
}

function aide_description()
{
	NewWindow('pop/description.php','Rédacteur','650','590','yes','no');
}

function aide_categorie()
{
	NewWindow('pop/categorie.php','Rédacteur','650','590','yes','no');
}

function aide_signature()
{
	NewWindow('pop/signature.php','Rédacteur','650','590','yes','no');
}

function aide_breve()
{
	NewWindow('pop/breve.php','Rédacteur','650','590','yes','no');
}

function aide_relief()
{
	NewWindow('pop/mise-en-avant.php','Rédacteur','650','590','yes','no');
}

function france_bleu_provence()
{
	NewWindow('http://players.tv-radio.com/radiofrance/playerfrancebleu.php?tag=france_bleu_provence_mp3','France','350','350','yes','no');
}

function afficheErreur(message)
{
	
	divRef = document.getElementById("erreurSaisie");
	if (divRef) divRef.innerHTML = "<img src='images/attention.gif' align='bottom'> " + message;
}

function afficheErreur2(message)
{
	
	divRef = document.getElementById("erreurSaisie2");
	if (divRef) divRef.innerHTML = "<img src='images/attention.gif' align='bottom'> " + message;
}

function afficheErreur3(message)
{
	
	divRef = document.getElementById("erreurSaisie3");
	if (divRef) divRef.innerHTML = "<img src='images/attention.gif' align='bottom'> " + message;
}

function afficheSucces(message)
{
	
	divRef = document.getElementById("erreurSaisie");
	if (divRef) divRef.innerHTML = "<img src='images/ok.png' align='bottom'> " + message;
}

function afficheSucces2(message)
{
	
	divRef = document.getElementById("erreurSaisie2");
	if (divRef) divRef.innerHTML = "<img src='images/ok.png' align='bottom'> " + message;
}

function afficheSucces3(message)
{
	
	divRef = document.getElementById("erreurSaisie3");
	if (divRef) divRef.innerHTML = "<img src='images/ok.png' align='bottom'> " + message;
}

function resetError()
{
 		divRef = document.getElementById("erreurSaisie");
 		if (divRef) divRef.innerHTML = "<img src='images/reset.gif' align='bottom'> &nbsp;";
 		
	
}

function resetError2()
{
 		divRef = document.getElementById("erreurSaisie2");
 		if (divRef) divRef.innerHTML = "<img src='images/reset.gif' align='bottom'> &nbsp;";
 		
	
}

function resetError3()
{
 		divRef = document.getElementById("erreurSaisie3");
 		if (divRef) divRef.innerHTML = "<img src='images/reset.gif' align='bottom'> &nbsp;";
 		
	
}

/*function enforce_fields(){
	var select_value = document.getElementById("select_map_select").value;
	
        if(select_value == '')
          {
	   return false;
	  }
	  return true;

}*/

function file(fichier)
{
if(window.XMLHttpRequest) // FIREFOX
xhr_object = new XMLHttpRequest();
else if(window.ActiveXObject) // IE
xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
else
return(false);
xhr_object.open("GET", fichier, false);
xhr_object.send(null);
if(xhr_object.readyState == 4) return(xhr_object.responseText);
else return(false);
}


function redirect()
{

		var index = document.select_folder.select_folder_select.selectedIndex;				
		var nomindex=document.select_folder.select_folder_select.options[index].value;
		if (nomindex=='index')
		{
		location.href = "http://" + window.location.host +"/";
		}
		else
		{
		location.href = "http://" + window.location.host + "/categorie.php?page="+ nomindex;
		}
}

