function openWindows(url,largeur,hauteur,scroll,gauche,haut){
	if (haut == null)
		haut = (screen.height - hauteur) / 2;
	
	if (gauche == null)
		gauche = (screen.width - largeur) /2 ;
		
	if (scroll == null)
		scroll = 'yes';
						
    open(url,'page','directories=no,location=no,height='+hauteur+',left='+ gauche+',menubar=no,resizable=yes,scrollbars='+scroll+',status=no,toolbar=no,top='+ haut+',width='+largeur);
	//window.close();

}
function openWindowsCookies(url1,largeur,hauteur,scroll,gauche,haut) {
	if (haut == null)
		haut = (screen.height - hauteur) / 2;
	
	if (gauche == null)
		gauche = (screen.width - largeur) /2 ;
		
	if (scroll == null)
		scroll = 'yes';
						
var Client = "VisicomMedia";
var Regions = "wb,eb";
var WinParam = "left="+ gauche+",width="+ largeur+",height="+ hauteur+",top="+ haut+",toolbar=no,location=no,status=no,scrollbars="+scroll+",resizable=yes";
var url = url1;

	document.cookie = "Test=Pass;";
	if(document.cookie){
		var gotCookie = false;
	  	var first = 0;
	  	var last = 0;
	  	var cookieString = document.cookie;
	  	var i = 0;
	  	var name = "visic";
	  	while (i <= cookieString.length) {
	  		first = i;
	    		last = first + name.length;
	    		if (cookieString.substring(first, last) == name) {
	      			gotCookie = true;
	      			break;
	    		}
	 		i++;
	  	}
	  	if (gotCookie != true) {
			createcookie();
			open(url,'VisicomMedia',WinParam); //window.focus();
	  	}
	}
}

function createcookie() {
	var ex = new Date();
	ex.setTime(ex.getTime() + (24 * 60 * 60 * 1000));
	ex = ex.toGMTString();
	document.cookie = "visic=True;expires="+ex+";";
}

