 function CheckUIElements()
    {
            var yMenu1From, yMenu1To, yOffset, timeoutNextCheck;
            var wndWidth = parseInt(document.body.clientWidth);
    
                yMenu1From   = parseInt (D1.style.top, 10);
                yMenu1To     = document.body.scrollTop + 100; 
    
            timeoutNextCheck = 500;
    
            if ( yMenu1From != yMenu1To ) {
                   yOffset = Math.ceil( Math.abs( yMenu1To - yMenu1From ) / 20 );
                if ( yMenu1To < yMenu1From )
                        yOffset = -yOffset;
    
    	D1.style.top = parseInt (D1.style.top, 10) + yOffset;
    
                timeoutNextCheck = 10;
        }   
    
        setTimeout ("CheckUIElements()", timeoutNextCheck);
    }
    
function MovePosition()
    {
        var wndWidth = parseInt(document.body.clientWidth);
    
                D1.style.top = document.body.scrollTop + 180;
    
                D1.style.visibility = "visible";
    
        CheckUIElements();
    
        return true;
    }    
function marquerewrite(id){
document.location.href = id+'-m.php4'
}
function trim(string) 
{ 
return string.replace(/(^\s*)|(\s*$)/g,''); 
} 
function popupcentree(page,largeur,hauteur,options)
{
var top=(screen.height-hauteur)/2;
var left=(screen.width-largeur)/2;
window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
}
window.onload=montre;
function montre(id) {
        var d = document.getElementById(id);
                for (var i = 1; i<=17; i++) {
                        if (document.getElementById('smenu'+i)) {
                                document.getElementById('smenu'+i).style.display='none';
                        }
                }
        if (d) {d.style.display='block';}
}
function montreprog(id) {
        var d = document.getElementById(id);
                for (var i = 1; i<=10; i++) {
                        if (document.getElementById('smprog'+i)) {
                                document.getElementById('smprog'+i).style.display='none';
                        }
                }
        if (d) {d.style.display='block';}
}

function verifentier(id)
{
 if(isNaN(document.getElementById(id).value) == true)
 {
  alert("Seuls des nombres entiers sont acceptés dans ce champ");
  document.getElementById(id).value='1';
 }
 
if(trim(document.getElementById(id).value)=='')
 {
  alert("La valeur minimum est 1");
  document.getElementById(id).value='1';
 }
}

function setVariables() {
imgwidth=150;  
imgheight=322;  
if (navigator.appName == "Netscape") {
horz=".left";
vert=".top";
docStyle="document.";
styleDoc="";
innerW="window.innerWidth";
innerH="window.innerHeight";
offsetX="window.pageXOffset";
offsetY="window.pageYOffset";
}
else {
horz=".pixelLeft";
vert=".pixelTop";
docStyle="";
styleDoc=".style";
innerW="document.body.clientWidth";
innerH="document.body.clientHeight";
offsetX="document.body.scrollLeft";
offsetY="document.body.scrollTop";
   }
}
function checkLocation() {
objectXY="branding";
var availableX=eval(innerW);
var availableY=eval(innerH);
var currentX=eval(offsetX);
var currentY=eval(offsetY);
x=availableX-(imgwidth+310)+currentX;
y=availableY-(imgheight+500)+currentY;

evalMove();
setTimeout("checkLocation()",05);
}
function evalMove() {
eval(docStyle + objectXY + styleDoc + horz + "=" + x);
eval(docStyle + objectXY + styleDoc + vert + "=" + y);
}
function OuvrirPopup(page) {
        window.open(page,'popup','width=369,height=310,toolbar=false,scrollbars=false');
        }
		
function disableselect(e){ 
return false 
} 
function reEnable(){ 
return true 
} 
  

document.onselectstart=new Function ("return false") 
  
if (window.sidebar){ 
document.onmousedown=disableselect 
document.onclick=reEnable 
} 


function right(e) { 
   if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)) 
      return false; 
   else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2
|| event.button == 3)) { 
      alert('Cette fonction est désactivée !'); 
      return false; 
   } 
   return true; 
} 
document.onmousedown=right; 
if (document.layers) { 
   window.captureEvents(Event.MOUSEDOWN); 
} 
window.onmousedown=right; 