  // Copyrigth 2002 Peopleware (www.peopleware.lu)
  // All right reserved. Could not be used without a writted authorisation
  //
  // Author: nr@peopleware.lu && gs@audaxis.com
  //
  
  function displayCenterPopUp(baseurl, popUpName, popUpWidth, popUpHeight) {
  	screenXWindow 	= (screen.width - popUpWidth) / 2;
  	screenYWindow 	= (screen.height - popUpHeight) /2;
  	
	netFiche = window.open (baseurl, "", 'top='+screenYWindow+',left='+screenXWindow+',resizable=yes,scrollbars=yes,status=yes,width='+popUpWidth+',height='+popUpHeight);
	netFiche.focus();  
  }

  function displayCenterFixPopUp(baseurl, popUpName, popUpWidth, popUpHeight) {
  	screenXWindow 	= (screen.width - popUpWidth) / 2;
  	screenYWindow 	= (screen.height - popUpHeight) /2;
  	
	netFiche = window.open (baseurl, popUpName, 'toolbar=no, directories=no, location=no,status=no, menubar=no, resizable=no,scrollbars=no, top='+screenYWindow+',left='+screenXWindow+',width='+popUpWidth+',height='+popUpHeight);
	netFiche.focus();  
  }

  function openPopupNetFicheVlanId(baseurl,id) {
  	displayCenterPopUp(baseurl+'?adID='+id, 'NetFiche'+id, 600, 400);
  }  
  
  function openPopupNetFiche(baseurl,id) {
  	displayCenterPopUp(baseurl+'?ID='+id, 'NetFiche'+id, 600, 400);
  }
  
  function openPopupNetFiche_new(baseurl,id) {
  	displayCenterPopUp(baseurl, 'NetFiche'+id, 600, 400);
  } 
  
  function openPopupAlbum (photo1, photo2, photo3, photo4, photo5,photo6, photo7, photo8, photo9, photo10,photo11, photo12, photo13, photo14, photo15,photo16,server) {
  	 	var url = '/vlan-immo/album_photo.jsp?'
  	 	var existPhoto = false;
  	 	if (photo1!='nopicture' && photo1 !='') {
	  	 	if (existPhoto==true) { url+='&';}
  	 		url+='picture1='+photo1+'_n_new.JPG';
  	 		existPhoto = true;
  	 	}
  	 	if (photo2!='nopicture' && photo2 !='') {
	  	 	if (existPhoto==true) { url+='&';}
  	 		url+='picture2='+photo2+'_n_new.JPG';
  	 		existPhoto = true;
  	 	}
  	 	if (photo3!='nopicture' && photo3 !='') {
	  	 	if (existPhoto==true) { url+='&';}
  	 		url+='picture3='+photo3+'_n_new.JPG';
  	 		existPhoto = true;
  	 	}
 	 	if (photo4!='nopicture'  && photo4 !='') {
	  	 	if (existPhoto==true) { url+='&';}
  	 		url+='picture4='+photo4+'_n_new.JPG';
  	 		existPhoto = true;
  	 	}
  	 	if (photo5!='nopicture'  && photo5 !='') {
	  	 	if (existPhoto==true) { url+='&';}
  	 		url+='picture5='+photo5+'_n_new.JPG';
  	 		existPhoto = true;
  	 	}

  	 	if (photo6!='nopicture'  && photo6 !='') {
	  	 	if (existPhoto==true) { url+='&';}
  	 		url+='picture6='+photo6+'_n_new.JPG';
  	 		existPhoto = true;
  	 	}
  	 	if (photo7!='nopicture' && photo7 !='') {
	  	 	if (existPhoto==true) { url+='&';}
  	 		url+='picture7='+photo7+'_n_new.JPG';
  	 		existPhoto = true;
  	 	}
  	 	if (photo8!='nopicture' && photo8 !='') {
	  	 	if (existPhoto==true) { url+='&';}
  	 		url+='picture8='+photo8+'_n_new.JPG';
  	 		existPhoto = true;
  	 	}
 	 	if (photo9!='nopicture'  && photo9 !='') {
	  	 	if (existPhoto==true) { url+='&';}
  	 		url+='picture9='+photo9+'_n_new.JPG';
  	 		existPhoto = true;
  	 	}
  	 	if (photo10!='nopicture'  && photo10 !='') {
	  	 	if (existPhoto==true) { url+='&';}
  	 		url+='picture10='+photo10+'_n_new.JPG';
  	 		existPhoto = true;
  	 	}

  	 	if (photo11!='nopicture' && photo11 !='') {
	  	 	if (existPhoto==true) { url+='&';}
  	 		url+='picture11='+photo11+'_n_new.JPG';
  	 		existPhoto = true;
  	 	}
  	 	if (photo12!='nopicture' && photo12 !='') {
	  	 	if (existPhoto==true) { url+='&';}
  	 		url+='picture12='+photo12+'_n_new.JPG';
  	 		existPhoto = true;
  	 	}
  	 	if (photo13!='nopicture' && photo13 !='') {
	  	 	if (existPhoto==true) { url+='&';}
  	 		url+='picture13='+photo13+'_n_new.JPG';
  	 		existPhoto = true;
  	 	}
 	 	if (photo14!='nopicture'  && photo14 !='') {
	  	 	if (existPhoto==true) { url+='&';}
  	 		url+='picture14='+photo14+'_n_new.JPG';
  	 		existPhoto = true;
  	 	}
  	 	if (photo15!='nopicture'  && photo15 !='') {
	  	 	if (existPhoto==true) { url+='&';}
  	 		url+='picture15='+photo15+'_n_new.JPG';
  	 		existPhoto = true;
  	 	}

  	 	if (photo16!='nopicture'  && photo16 !='') {
	  	 	if (existPhoto==true) { url+='&';}
  	 		url+='picture16='+photo16+'_n_new.JPG';
  	 		existPhoto = true;
  	 	}

  	 	if (existPhoto==true) {
  	 		url+='&imagePath=/';
  	 		url+='&server='+server;
  	 		
  	 		displayCenterPopUp(url,'Album Photo',680,580);
  	 	}
  }
