var obj;
var x = 0;
var y = 0;
var test = (navigator.appName.substring(0,3)=="Net")? true : false;

function Show(ID){
	if(document.layers){
		obj = document.getElementById(ID)
	}else if(document.getElementById && !document.all){
		obj = document.getElementById(ID).style
	}else if(document.all){
		obj = document.all.getElementById(ID).style
	}
	obj.display = 'block';
	obj.top = y+"px";
	obj.left = x+"px";
	return true;
}
function Hide(ID){
	if(document.layers){
		obj = document.getElementById(ID)
	}else if(document.getElementById && !document.all){
		obj = document.getElementById(ID).style
	}else if(document.all){
		obj = document.all.getElementById(ID).style
	}
	obj.display = 'none';
	return true;
}

function Souris(e){
	x = (test) ? e.pageX : event.x+document.body.scrollLeft;
	y = (test) ? e.pageY : event.y+document.body.scrollTop;
	if(obj) obj.top = y+"px";
	if(obj) obj.left = x+"px";
}
function CheckFormValues(champ, allow, option, show){
	var regexp = '^(['+allow+']+)?$'+option;
	var myregexp = new RegExp(regexp);
	if(myregexp.test(champ.value)==true) return true;
	else {
		if(show==true) alert("Ce champ ne peut contenir que les caracteres "+allow+" !");
		//champ.value = champ.value.substr(0, champ.value.length-1);
		var str = champ.value;
		champ.value = '';
		for(i=0;i<=champ.value.length;i++){
			if(myregexp.test(str[i])==true) champ.value += str[i];
		}
		return false;
	}
}

if(test) document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = Souris;
