// JavaScript Document

function Url(url,name){
window.open(url,name,'width=750,height=500,scrollbars')
}
function cb1(val,name){
url=''+val;
window.open(url,name,'width=548,height=500,scrollbars')
}
function comm(val,name){
url=''+val;
window.open(url,name,'width=800,height=500,scrollbars')
}


var msg="";
function disableIE() {if (document.all) {alert(msg);return false;}
}
function disableNS(e) {
  if (document.layers||(document.getElementById&&!document.all)) {
    if (e.which==2||e.which==3) {alert(msg);return false;}
  }
} 
if (document.layers) {
  document.captureEvents(Event.MOUSEDOWN);document.onmousedown=disableNS;
} else {
  document.onmouseup=disableNS;document.oncontextmenu=disableIE;
}
document.oncontextmenu=new Function("alert(msg);return false");


function PopupImage(img) {
	titre="";
	w=open("",'image','width=400,height=400,toolbar=no,scrollbars=yes,resizable=yes');	
	w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE><meta http-equiv=imagetoolbar content=no></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 OnContextMenu='return false;'><a href=# ><IMG src='"+img+"' border=0 onClick=javascript:self.close()></a>");
	w.document.write("");
	w.document.write("</BODY></HTML>");
	w.document.close();
}
function fullwin(where){
   var newwin = window.open(where,"newwin",'fullscreen=yes,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=0,width=' + screen.width + ',height=' + screen.height);
   newwin.moveTo(0,0);newwin.focus();
 }
   function OpenLayer(id){
   if(document.getElementById(id).style.display == "block") {
    document.getElementById(id).style.display = "none" ;

   } else {
    document.getElementById(id).style.display = "block" ;

   }
   window.status =  document.getElementById(id).style.display;
 }
 

function CheckLen(Target) 
	{
		// calcule et affiche le nbre de caracteres saisi pour le message a envoyer
		StrLen = Target.value.length
		if (StrLen > 200 )
		{
			Target.value = Target.value.substring(0,200);
			CharsLeft = 200;
		}
		else 
		{
			CharsLeft = StrLen;
		}
		document.f.caracteres.value = CharsLeft;
	}
	
	
		
navvers = navigator.appVersion.substring(0,1);

if (navvers > 3)
{
navok = true;
}
else
{
navok = false;
}



var msg1 = "";
var spacer = " ";
var pos = 0;
function ScrollMessage()
{
window.status = msg1.substring(pos, msg1.length) + spacer + msg1.substring(0,pos);
pos++;
if (pos > msg1.length) pos = 0;
window.setTimeout("ScrollMessage()", 10);
}
ScrollMessage();


function OpenLayer(id){
   if(document.getElementById(id).style.display == "block") {
    document.getElementById(id).style.display = "none" ;

   } else {
    document.getElementById(id).style.display = "block" ;

   }
   window.status =  document.getElementById(id).style.display;
 }


