function Remplace(str,find,rep){
while(str.indexOf(find) > -1){str = str.replace(find,rep)} 
return(str);
}



function PopUpCover(mypict,myname,w,h,features) { 

  if(screen.width){
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  }else{winl = 0;wint =0;}
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=' + h + ',';
  settings += 'width=' + w + ',';
  settings += 'top=' + wint + ',';
  settings += 'left=' + winl + ',';
  settings += features;  
  
  

var name = Remplace(myname,"_"," ");

win = window.open('',myname,settings);
win.window.focus();
win.document.write( "<html><head><title>"+name+"</title>\n" );
win.document.write( "</head><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>" );
win.document.write( "<a href='javascript:window.close();'><img src='"+mypict+"' border=0></a>" );
win.document.write( "</body></html>" );
}


function PopUpIndex(mypict,myname,w,h,features) { 

  if(screen.width){
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  }else{winl = 0;wint =0;}
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=' + h + ',';
  settings += 'width=' + w + ',';
  settings += 'top=' + wint + ',';
  settings += 'left=' + winl + ',';
  settings += features;  
  
  

var name = Remplace(myname,"_"," ");

win = window.open('',myname,settings);
win.window.focus();
win.document.write( "<html><head><title>"+name+"</title>\n" );
win.document.write( "</head><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>" );
win.document.write( "<img src='"+mypict+"' border=0>" );
win.document.write( "</body></html>" );
}


function newWindow(mypage,myname,w,h,features) {

  if(screen.width){
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  }else{winl = 0;wint =0;}
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=' + h + ',';
  settings += 'width=' + w + ',';
  settings += 'top=' + wint + ',';
  settings += 'left=' + winl + ',';
  settings += features;
  win = window.open(mypage,myname,settings);
  win.window.focus();

  
}

function PopUpPoster(mypict,myname,w,h,features,illustrateur) {
  if(screen.width){
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  }else{winl = 0;wint =0;}
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=' + h + ',';
  settings += 'width=' + w + ',';
  settings += 'top=' + wint + ',';
  settings += 'left=' + winl + ',';
  settings += features;
  win = window.open('',myname,settings);
  win.window.focus();
  win.document.write( "<html><head><title>"+myname+"</title>\n" );
  win.document.write( "<link rel='StyleSheet' href='style.css'></head><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0><table width=100% height=100%><tr><td valign=middle align=center>" );
  win.document.write( "<a href='javascript:window.close();'><img src='"+mypict+"' border=0 alt='"+myname+"'></a></td></tr>" );
  win.document.write( "<tr><td align='right' class='txt_grey' height='20' style='font-size:8pt;' >Illustration :&nbsp;"+illustrateur+"</td></tr>" );
  win.document.write( "</table></body></html>" );
}

function ChangeImage(id,name) {

var tag_img = document.getElementById('id');

change = tag_img.src="images/albums/" + name;

}

var submitRolls = new Object();

function submitroll(src, oversrc, name)
{
this.src=src;
this.oversrc=oversrc;
this.name=name;
this.alt="Submit Query";
this.write=submitroll_write;
}

function submitroll_write()
{
var thisform = 'document.forms[' + (document.forms.length - 1) + ']';
submitRolls[this.name] = new Object();
submitRolls[this.name].over = new Image();
submitRolls[this.name].over.src = this.oversrc;
submitRolls[this.name].out = new Image();
submitRolls[this.name].out.src = this.src;

document.write
	(
	'<A onMouseOver="if (document.images)document.images[\'' + this.name + "'].src=submitRolls['" + this.name + '\'].over.src"' + 
	' onMouseOut="if (document.images)document.images[\'' + this.name + "'].src=submitRolls['" + this.name + '\'].out.src"' + 
	' HREF="javascript:'
	);

if (this.sendfield)
	{
	if (! this.sendvalue)
		this.sendvalue = 1;
	document.write(thisform, ".elements['", this.sendfield, "'].value='", this.sendvalue, "';");
	}

document.write(thisform + '.submit();void(0);"');
if (this.msg)document.write(' onClick="return confirm(\'' , this.msg, '\')"');

document.write(' onClick="return verify(document.forms[0]);"');
 
document.write('>');

document.write('<IMG SRC="' + this.src + '" ALT="' + this.alt + '" BORDER=0 NAME="' + this.name + '"');
if (this.height)document.write(' HEIGHT=' + this.height);
if (this.width)document.write(' WIDTH='  + this.width);
if (this.otheratts)document.write(' ' + this.otheratts);
document.write('></A>');
if (this.sendfield)
	{
	document.write('<INPUT TYPE=HIDDEN NAME="' + this.sendfield + '">');
	document.forms[document.forms.length - 1].elements[this.sendfield].value='';
	}
}


function gotoIndex(lang) {

var page_index;
page_index="index.php";
location.href=page_index+"?lang="+lang;

}


var ele_actif = false;
var started = false;

function slideEle(id) {

if (ele_actif) {
Effect.BlindUp(ele_actif,{duration:0.5,transition:Effect.Transitions.sinusoidal});
}

ele = $(id);
if (ele.style.display == "none" && started == false) {
started = true;
Effect.BlindDown(id,{duration:0.5,transition:Effect.Transitions.sinusoidal});
ele_actif = id;
started = false;
}

}

