var PopUp = new Array();

PopUp[0] = 'Scripts/PorTaL-PopUp/NewsLetters-xXx-Menu-NewsLetters.html';

var PopURL = PopUp[Math.floor(Math.random()*(PopUp.length))];

var once_per_session = 1;

function get_cookie(Name) {
  var search = Name + "="
  var returnvalue = "";
  if (document.cookie.length > 0) {
   offset = document.cookie.indexOf(search)
    if (offset != -1) { // if cookie exists
      offset += search.length
      // set index of beginning of value
      end = document.cookie.indexOf(";", offset);
      // set index of end of cookie value
      if (end == -1)
         end = document.cookie.length;
      returnvalue=unescape(document.cookie.substring(offset, end))
      }
   }
  return returnvalue;
}

function LoadOrNot(){
  if (get_cookie('PopUp')=='') {
  setTimeout("LoadPopUp()",10000);
  document.cookie="PopUp=yes"
}
}

if (once_per_session==0)
LoadPopUp()
else
LoadOrNot()

//BrowserName = navigator.appName;
//BrowserVersion = navigator.appVersion;

var usePopDialog = true;

function LoadPopUp(width, height)
{
	width_window = (width) ? width : 550;
	height_window = (height) ? height : 208;
	
	var width_ecran = screen.width;
	var height_ecran = screen.height;
	var pos_left = Math.round((width_ecran/2)-(width_window/2));
	var pos_top = Math.round((height_ecran/2)-(height_window/2));

	if (window.showModalDialog)
	{
		window.showModalDialog(PopURL,"","dialogWidth:"+width_window+"px; dialogHeight:"+height_window+"px; left:"+pos_left+"; top:"+pos_top+";  help:no; status:no; toolbar:no; location:no; directories:no; menubar:no; scrollbars:no; resizable:no");
        }
        //if (BrowserName == "Netscape") 
	//{
 	//	document.write('<A HREF="#" onClick="window.open('mdp.html','Identifiants Perdu','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=500, height=400, left=400, top=300');return false;">Mot De Passe Perdus ?!</A>');
	//}
	else
        {
	        window.open(PopURL,"","width="+width_window+"px,height="+height_window+"px,left="+pos_left+",top="+pos_top+",help=0,status=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=0,resizable=0");
        }		
}