function window_open(strUrl,strTitle,intWidth,intHeight)
{
	var intTop,intLeft;
		
	intTop = (window.screen.height - intHeight)/2;
	intLeft = (window.screen.width - intWidth)/2;
	window.open(strUrl,strTitle,'height='+intHeight+',width='+intWidth+',resizable=yes,toolbar=no,status=yes,scrollbars=yes,dependent=yes,left=' + intLeft + ',top=' + intTop );
	//window.open(
}

function popup_open(strUrl,strTitle,intWidth,intHeight)
{
	var intTop,intLeft;
		
	intTop = (window.screen.height - intHeight)/2;
	intLeft = (window.screen.width - intWidth)/2;
	window.open(strUrl,strTitle,'height='+intHeight+',width='+intWidth+',resizable=no,toolbar=no,status=no,scrollbars=no,dependent=no,left=' + intLeft + ',top=' + intTop );
	//window.open(
}

function lit_cook(nom)
{
    var arg=nom+"=";
    var alen=arg.length;
    var clen=document.cookie.length;
    var i=0;
    
    while (i<clen)
    {
        var j=i+alen;
        
        if (document.cookie.substring(i, j)==arg)
        {
            var endstr=document.cookie.indexOf (";", j);
            if (endstr==-1) endstr=document.cookie.length;
            var myReturn = unescape(document.cookie.substring(j, endstr));
            if (myReturn.length > 0)
            {            
                return decodeURL(myReturn);
            }
            else
            {
                return "";
            }
        }
           
        i=document.cookie.indexOf(" ",i)+1;
        
        if (i==0) break;
    }
    return "";
}
function decodeURL(url) {
return unescape(decodeURI(url.replace(/\+/g,' ')).replace(/&/g,'&'))
}

function MailNoSpam(strUser,strDomaine)
{
	var strEmail = strUser;
	strEmail += "@";
	strEmail += strDomaine;				
	document.write("<A class=link1 href=' mailto:" + strEmail + "'>" + strEmail + "</A>");
}

// calcule le décalage à gauche
function calculateOffsetLeft(r){
  return calculateOffset(r,"offsetLeft")
}

// calcule le décalage vertical
function calculateOffsetTop(r){
  return calculateOffset(r,"offsetTop")
}

function calculateOffset(r,attr){
  var kb=0;
  while(r){
    kb+=r[attr];
    r=r.offsetParent
  }
  return kb
}


