
//// resize popup

function PopupImage(img) {
	titre="euroloisirs81 - www.euroloisirs81.com";
	w=open("",'image','width=400,height=400,toolbar=no,scrollbars=no,resizable=yes');	
	w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE></HEAD>");
	w.document.write("<SCRIPT language=javascript>function checksize()  { if (document.images[0].complete) {  window.resizeTo(document.images[0].width+12,document.images[0].height+30); window.focus();} else { setTimeout('check()',250) } }</"+"SCRIPT>");
	w.document.write("<BODY onload='checksize()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0><IMG src='"+img+"' border=0>");
	w.document.write("");
	w.document.write("</BODY></HTML>");
	w.document.close();
}




//// popup

function PopupCentrer(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);
}


// BARRE DE TACHE

var hellotext=" bienvenue chez Euroloisirs81 " 
var thetext=""
var started=false
var step=0
var times=1
function welcometext()
{
times--
if (times==0)
{
if (started==false)
{
started = true;
window.status = hellotext;
setTimeout("anim()",1);
}
thetext = hellotext;
}}
function showstatustext(txt)
{
thetext=txt;
setTimeout("welcometext()",4000)
times++
}
function anim()
{
step++
if (step==7) {step=1}
if (step==1) {window.status=' >=>= '+thetext+' =<=< '}
if (step==2) {window.status=' =>=> '+thetext+' <=<= '}
if (step==3) {window.status=' >=>= '+thetext+' =<=< '}
if (step==4) {window.status=' =>=> '+thetext+' <=<= '}
if (step==5) {window.status=' >=>= '+thetext+' =<=< '}
if (step==6) {window.status=' =>=> '+thetext+' <=<= '}
setTimeout("anim()",200);
}
welcometext()


//// empecher la selection du texte sur la page
 
function disableselect(e){
return false
}
function reEnable(){
return true
}
//if IE4+
document.onselectstart=new Function ("return false")
//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}

//// pas de clik droit


function NoError(){return true;}
window.onerror=NoError;
 
if (window.Event)
document.captureEvents(Event.MOUSEUP);
function nocontextmenu() {
    event.cancelBubble = true
    event.returnValue = false;
    return false;
}
 
function norightclick(e) {
    if (window.Event) {
    if (e.which == 2 || e.which == 3)
    return false;
    } 
else
    if (event.button == 2 || event.button == 3) { 
    event.cancelBubble = true
    event.returnValue = false;
    return false;
    }
}
 
document.oncontextmenu = nocontextmenu; 
document.onmousedown = norightclick;


