function NewWindow(mypage,myname,w,h,scroll,pos,resize){
var win=null;
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;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable='+resize+'';
win=window.open(mypage,myname,settings);
}
function popupPage(url) {
windowprops = "height=500,width=600,location=no,scrollbars=no,menubars=no,toolbars=no,resizable=yes";
window.open(url, "Profil", windowprops);
}
function PopupImage(img) {
	titre="Popup Image";
	w=open("",'image','width=400,height=400,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+50); window.focus();} else { setTimeout('checksize()',250) } }</"+"SCRIPT><META HTTP-EQUIV='imagetoolbar' CONTENT='no'></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 popup(url, titre, largeur, hauteur)
{
window.open(url, titre, 'toolbar=no, location=no, directories=no, status=no, scrollbars=1, resizable=yes, copyhistory=no, width='+largeur+', height='+hauteur+', left=0, top=0');
}
function chat(url, titre, largeur, hauteur)
{
window.open(url, titre, 'toolbar=no, location=no, directories=no, status=no, scrollbars=0, resizable=yes, copyhistory=no, width='+largeur+', height='+hauteur+', left=50, top=0');
}
function plans(url, titre, largeur, hauteur)
{
window.open(url, titre, 'toolbar=no, location=no, directories=no, status=no, scrollbars=0, resizable=no, copyhistory=no, width='+largeur+', height='+hauteur+', left=50, top=50');
}
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();
}
MM_reloadPage(true);