function PopupImage(img) {
	w=open("",'image','width=1000,height=600,toolbar=no,scrollbars=no,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 PopupPage(page,largeur,hauteur,options) {
  var top=(screen.height-hauteur)/2;
  var left=(screen.width-largeur)/2;
  window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
}

function PopupNews(page,titre) {
  var top=(screen.height-600)/2;
  var left=(screen.width-1000)/2;
  window.open(page,titre,"top="+top+",left="+left+",width=1000,height=600,toolbar=0, location=0, directories=0, status=0, scrollbars=1, resizable=1, copyhistory=0, menuBar=0");
}

function PopupVilles(page,titre) {
  var top=(screen.height-600)/2;
  var left=(screen.width-1000)/2;
  window.open(page,titre,"top="+top+",left="+left+",width=1000,height=600,toolbar=0, location=0, directories=0, status=0, scrollbars=1, resizable=1, copyhistory=0, menuBar=0");
}

function PopupLocalisation(adresse) {
  var top=(screen.height-600)/2;
  var left=(screen.width-1000)/2;
  window.open("localisation.php?"+adresse,"","top="+top+",left="+left+",width=1000,height=600,scrollbars=yes");
}

function PopupMP3() {
  var top=(screen.height-340)/2;
  var left=(screen.width-190)/2;
  window.open("http://radioaria.relay-network.com/8006/player.php","","top="+top+",left="+left+",width=290,height=160,scrollbars=yes");
}

function Commentaires(no_lien) {
  var top=(screen.height-600)/2;
  var left=(screen.width-1000)/2;
  window.open("./addcommentaire.php?no_lien="+no_lien,"","top="+top+",left="+left+",width=600,height=600,scrollbars=yes");
}

function checkdate( month, day, year ) {
 
    var myDate = new Date();
 
    myDate.setFullYear( year, month, day );
 
    return ( myDate.getMonth() != month );
}

function is_numeric( mixed_var ) {
 
    return !isNaN( mixed_var );
}
