//dreamweaver code that works on nn4
function RollRestore() { //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 RollFindObj(n, d) { //v4.01
  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=RollFindObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

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

/* this is not a rollover but i don't want to make another file */

function mainSelRedirect(obj){
	var i = obj.selectedIndex;
	var val = obj.options[i].value;
	var found = false;
	var url = '#';

	switch(val){
		//case '1': url=''; found = true; break;
		//case '2': url=''; found = true; break;
		//case '3': url=''; found = true; break;
		case '4': url='p21_mon_quartier_correspond.html'; found = true; break;
		//case '5': url=''; found = true; break;
		//case '6': url=''; found = true; break;
	}

	if (found == true){
		document.location.href = url;
	}
	
}

function GetYPositionObj(obj){
	return obj.offsetParent.offsetTop + obj.offsetParent.offsetParent.offsetParent.offsetParent.offsetParent.offsetTop;
}

function OuvrirFenetre(url,nom,details) { window.open(url,nom,details)} 
function PopupImage(img) {
	titre="Ville de La Roche-sur-Yon";
	w=open("",'image','width=400,height=400,toolbar=no,scrollbars=auto,resizable=yes');	
	w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE>");
	w.document.write("<SC"+"RIPT language=java"+"script> function checksize()  { if (document.images['img'].complete) {  window.resizeTo(document.images[0].width+12,document.images[0].height+30); window.focus();} else { setTimeout('checksize()',250) } }</"+"SCRIPT></HEAD>");
	w.document.write("<BODY onload='checksize()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0><IMG src='"+img+"' border=0 name='img'>");
	w.document.write("");
	w.document.write("</BODY></HTML>");
	w.document.close();
}

function searchlink(SearchString,adress){

Resultat = SearchString.indexOf('accessible_');

if (Resultat != -1) {
   adress = "accessible_" + adress ;
}

location.href = adress;
}



