function openpop(mypage,myname,w,h,scroll,pos,posval)
{
	if(pos=="random")
		{
		LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;
		TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;
		position="top='+TopPosition+',left='+LeftPosition+'";
		}
	if(pos=="center")
		{
		LeftPosition=(screen.width)?(screen.width-w)/2:100;
		TopPosition=(screen.height)?(screen.height-h)/2:100;
		position='top='+TopPosition+',left='+LeftPosition+'';
		}
	if(pos=="topleft")
		{
		position='top='+posval+',left='+posval+'';
		}
	else if((pos!="center" && pos!="random" && pos!="topleft") || pos==null)
		{
		LeftPosition=0;
		TopPosition=0;
		position='';
		}
	settings='width='+w+',height='+h+','+position+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
	var win=null;
	win=window.open(mypage,myname,settings);
}

var cleared = 0;
var i=0;
var a="<span style=\"position:absolute;top:100px;left:0px;visibility:hidden;\">";
var b="</span>";

var encours = new Image(); encours.src = "/images/interface/loading.gif"; encours.width="165"; encours.height="54";
var fin = new Image(); fin.src = "/images/interface/vide.gif"; fin.width="165"; fin.height="54"; 
function bascule(from, to) { document[from].src = to.src; }

today=new Date();
annee=today.getFullYear();

function PopupImage(img) {
	titre="Neptune Biarritz - Zoom";
	w=open("",'zoom','width=405, height=435, 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 clearField(field){
if (cleared != 1) {
field.value = "";
cleared=1;}
else {cleared = 0;}
}

function cop(debut,fin) {
document.write(debut + fin);
}

function roll(){if (i==1){
i=0;
document.writeln(b);
}else
{document.writeln(a);
i++;
}
}