function popuphome() {  PopupCentrer('popup/woodhome.htm',400,300,'')
}
function popuphome1() {  PopupCentrer('popup/jazznote.htm',400,300,'')
}
function popuphome3() {  PopupCentrer('popup/grib/demo.php3',400,300,'')
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function fenferm(URL,nom,features) { 
mafenetre=window.open(URL,nom,features);
setTimeout("mafenetre.close()",20000); // DELAI EN MILLISECONDES
}
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();
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

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

function PopupCentrer(page,largeur,hauteur,option) {
    var top=(screen.height-hauteur)/2;
    var left=(screen.width-largeur)/2;
    window.open(page,'',option+', width='+largeur+', height='+hauteur+', left='+left+', top='+top);
}
function popupcentrerstatus(page,largeur,hauteur,option) {
    var top=(screen.height-hauteur)/2;
    var left=(screen.width-largeur)/2;
    window.open(page,'',option+' status=yes , width='+largeur+', height='+hauteur+', left='+left+', top='+top);
}



function ChgCouleurBarre()
{
if (document.body.clientWidth<event.clientX)
 with(document.body.style)
 {
  scrollbarDarkShadowColor="#450601";
  scrollbar3dLightColor="#7D0A01";
  scrollbarArrowColor="#D85E54";
   scrollbarFaceColor="#CE433A";
  scrollbarHighlightColor="#D85E54";
  scrollbarShadowColor="#A8A7A7";
  scrollbarTrackColor="#740B02";
 }
else 
 with(document.body.style)
 {
 scrollbarDarkShadowColor="#450601";
  scrollbar3dLightColor="#7D0A01";
  scrollbarArrowColor="#D85E54";
  scrollbarFaceColor="#B31407";
  scrollbarHighlightColor="#D85E54";
  scrollbarShadowColor="#A8A7A7";
  scrollbarTrackColor="#740B02";
 }
}
if (document.all)
{
 document.onmousemove=ChgCouleurBarre;
}

function changeFormulaire(nom, param) {
    var form = MM_findObj(nom);
    var chmp;
    if (param) {
        form.param.value = param;
    }
    if (form) form.submit();
}

function Ouvre_meteo_grand(ladate) {
    var top=(screen.height-320)/2;
    var left=(screen.width-320)/2;
    var fen = window.open('','','toolbar=no, location=no, directories=no, status=yes, scrollbars=yes, resizable=no, copyhistory=no, width=320, height=320, left='+left+', top='+top);
    fen.document.write('<html>');
    fen.document.write('<head><title>Météo Nationale</title></head>');
    fen.document.write('<body scroll="no" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">');
    fen.document.write('<a href="javascript:window.close()"><img src="http://www.meteoconsult.fr/image/carte/fra/fra_'+ladate+'.gif" alt="Cliquer pour fermer" border=0></a>');
    fen.document.write('</body></html>');
}   

function trMouseOver(obj) {
	obj.style.background = '#ffffff';
}

function trMouseOut(obj) {
	obj.style.background = 'transparent';
}

function go(adr) {
	parent.location = adr;
}

function ScanCookie(variable)
	{
	cook = document.cookie;
	variable += "=";
	place = cook.indexOf(variable,0);
	if (place <= -1)
		return("0");
	else
		{
		end = cook.indexOf(";",place)
		if (end <= -1)
			return(unescape(cook.substring(place+variable.length,cook.length)));
		else
			return(unescape(cook.substring(place+variable.length,end)));
		}
	}

function CreationCookie(nom,valeur,permanent)
	{
	if(permanent)
		{
		dateExp = new Date(2020,11,11);
		dateExp = dateExp.toGMTString();
		ifpermanent = '; expires=' + dateExp + ';';
		}
	else
		ifpermanent = '';
	document.cookie = nom + '=' + escape(valeur) + ifpermanent;
}
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function PopupImage(img) {
	titre="Popup Image";
	var top=(screen.height-400)/2;
  	var left=(screen.width-400)/2;
	//w=open("",'image','width=400,height=400,toolbar=no,scrollbars=no,resizable=yes');
	w=open("","image","top="+top+",left="+left+",width=400,height=400,toolbar=no,scrollbars=no,resizable=yes");	
	w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE></HEAD>");
	w.document.write("<SCRIPT language=javascript>function checksize()  { if (document.images[0].complete) {  window.resizeTo(document.images[0].width+12,document.images[0].height+30); window.focus();} else { setTimeout('check()',250) } }</"+"SCRIPT>");
	w.document.write("<BODY onload='checksize()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0><IMG src='"+img+"' border=0>");
	w.document.write("");
	w.document.write("</BODY></HTML>");
	w.document.close();
}

function addFav()
	{
	
		url_site="http://www.commerce-desvilles.com";
		titre_site = "commerce des villes";
		document.write('<A class= "text1" HREF="#" onClick="window.external.AddFavorite(url_site, titre_site);return(false);">CDV en Favoris</A>')
		
	
	}
function AfficheHomePage()
	
		{
		document.write('<A HREF="# " class= "text1" onClick="HomePage(this);return(false);" >CDV en Accueil</A>');
		}
	
function HomePage(obj)
	{
	obj.style.behavior='url(#default#homepage)';
	obj.setHomePage('http://www.commerce-desvilles.com');
	}
	
var randomlinks=new Array()
randomlinks[1]="http://www.orpimone.com"
randomlinks[2]="http://www.rion-immo.com"
randomlinks[3]="http://www.orpihalle.com" 
randomlinks[4]="http://www.orpicathedrale.com" 
randomlinks[5]="http://www.immobiliercapbreton.com" 
randomlinks[6]="http://www.cabinetbaylaucq.com"
randomlinks[7]="http://www.c2p.biz"  
randomlinks[8]="http://www.restaurantparasol.com" 
randomlinks[9]="http://www.jcd40.com" 
randomlinks[10]="http://www.lezephyr.com" 
randomlinks[11]="http://www.hoteldelaplage.net"
randomlinks[12]="http://www.envy-hossegor.com" 
randomlinks[13]="http://www.macarons-adam.com" 
randomlinks[14]="http://www.boa-boa.com" 
randomlinks[15]="http://www.macarons-adam.com" 
randomlinks[16]="http://www.macarons-adam.com"
randomlinks[17]="http://www.flainvest.com" 
randomlinks[18]="http://www.flainvest.biz" 
randomlinks[19]="http://www.capbreton-hotel.com"
randomlinks[20]="http://www.wood-home.biz" 
randomlinks[21]="http://www.jungul.net" 
randomlinks[22]="http://www.woodhome.fr"
randomlinks[23]="http://www.silo-france.fr"
randomlinks[24]="http://www.hotelalienor.com" 
randomlinks[25]="http://www.lesvoletsbleus.net" 
randomlinks[26]="http://www.jazz-note.com" 
randomlinks[27]="http://www.barlabouee.com" 
randomlinks[28]="http://www.rion-immo.com" 
randomlinks[29]="http://www.aupy.biz"
randomlinks[30]="http://www.lenapoli.com" 
randomlinks[31]="http://www.lescop1dabord"
randomlinks[32]="http://www.lebordeaux.com" 
randomlinks[33]="http://www.landesimmo.com"
randomlinks[0]="http://www.immolandes.com"
function randomlink(){
window.location=randomlinks[Math.floor(Math.random()*randomlinks.length)]
}
 
 var randomlinks2=new Array()
 randomlinks2[1]="clindoeil/envy/pop.htm"
 randomlinks2[2]="clindoeil/aartdeco/pop.htm"
 randomlinks2[3]="clindoeil/baylaucq/pop.htm"
 randomlinks2[4]="clindoeil/c2p/pop.htm"
 randomlinks2[5]="clindoeil/crepebretonne/pop.htm"
 randomlinks2[0]="clindoeil/ips/pop.htm"
function randomlink2(){
 return randomlinks2[Math.floor(Math.random()*randomlinks2.length)]
 }
 
var randomlinks3=new Array()
randomlinks3[0]="/commerces/c6748/clip.htm"
randomlinks3[1]="/commerces/c31/clip.htm"
randomlinks3[2]="/commerces/c6665/clip.htm"
randomlinks3[3]="/commerces/c6662/clip.htm"
function randomlink3(){
 return randomlinks3[Math.floor(Math.random()*randomlinks3.length)]
}

var randomlinks4=new Array()
randomlinks4[0]="/popup/grib/demo.php3"
randomlinks4[1]="/popup/macarons.htm"
randomlinks4[2]="/popup/grib/demo.php3"
function randomlink4(){
 return randomlinks4[Math.floor(Math.random()*randomlinks4.length)]
}	
