// JavaScript Document

function menu_c(id){
	document.location="?p="+id;
}
function menu_o(id, over){
	if(over){
		document.getElementById('b_'+id).style.backgroundColor=document.getElementById(id).style.backgroundColor;
	}else{
		document.getElementById('b_'+id).style.backgroundColor="#FFF";
	}
}
function go(url){
	document.location=url;
}


var contact, cursor, x, y;
function contact_init(){
	barre=document.getElementById("contact_barre");
	contact=document.getElementById("contact");
	barre.onmousedown=down;
	contact.style.top="100px";
	contact.style.left="300px";
}
function down(e){
	if (!e){e = window.event;}
	x=e.clientX-parseInt(contact.style.left);
    y=e.clientY-parseInt(contact.style.top);
	document.onmousemove=move;
	document.onmouseup=up;
}
function move(e){
	if (!e) e = window.event;
	var xtemp=e.clientX-x>0?e.clientX-x:0;
	var ytemp=e.clientY-y>0?e.clientY-y:0;
	
	xtemp=xtemp<1000-451?xtemp:1000-451; //parent.contact.style...
	contact.style.left=xtemp+'px';
	contact.style.top=ytemp+'px';
}
function up(e){
    document.onmousemove=null;
    document.onmouseup=null;
}
function rendezvous(){
	document.getElementById("contact").style.display=document.getElementById("contact").style.display=="none"||document.getElementById("contact").style.display==""?"block":"none";
}

