////////////////////////////////////////////////////////
///////////////////////////////////////////////////////

estIE=document.all;
estNN=!document.all&&document.getElementById;
estN4=document.layers;

Top_Position=350;
Left_Position=10;
drag="FromTop";
function SearchStyleobject(objectId) {
    if(document.getElementById && document.getElementById(objectId)) {
	return document.getElementById(objectId).style;
    } else if (document.all && document.all(objectId)) {
	return document.all(objectId).style;
    } else if (document.layers && document.layers[objectId]) {
	return document.layers[objectId];
    } else {
	return false;
    }
}
var the_timeout;

//sliding function
function sliding(){
  var the_style = SearchStyleobject("filesform");
  if (the_style){
    var pos_top = parseInt(the_style.top);
    var new_top = pos_top + 8;
    if (document.layers){
      the_style.top = new_top;
    }
    else {
      the_style.top = new_top + "px";
    }
    if (new_top < Top_Position){
      the_timeout = setTimeout('sliding();',1);
    }
  }
}

function whatHeight(){
 if (document.getElementById) {
	var divs = document.getElementById('filesform');
	maxHeight = divs.offsetHeight;
	divs.style.top = '-' + maxHeight + 'px';
	}
	else {
    maxHeight = 1000;
	divs.style.top = '-' + maxHeight + 'px';
    }
}
function Center(){
 if (document.getElementById) {
	var divs = document.getElementById('filesform');
	maxHeight = divs.offsetHeight;
	maxLeft = divs.offsetWidth;
	}
	else { // does not work in nn4
    maxHeight = 200;
	  maxLeft = 200;
}
if (parseInt(navigator.appVersion)>3) {
 	if (navigator.appName=="Netscape") {
  	winW = window.innerWidth;
  	winH = window.innerHeight;
 	}
 	if (navigator.appName.indexOf("Microsoft")!=-1) {
  	winW = document.body.offsetWidth;
  	winH = document.body.offsetHeight;
 	}
	}
	Left_Position=(winW-maxLeft)/2;
	Top_Position=(winH-maxHeight)/2;
}
function initialize(e){
  letout=estIE ? "BODY" : "HTML";
  which=estIE ? document.all.filesform : document.getElementById("filesform");  
  theLevel=estIE ? event.srcElement : e.target;  
  while (theLevel.id!="barreTitre"&&theLevel.tagName!=letout){
    theLevel=estIE ? theLevel.parentElement : theLevel.parentNode;
  }  
  if (theLevel.id=="barreTitre"){
    movesx=estIE ? event.clientX : e.clientX;
    movesy=estIE ? event.clientY : e.clientY;
    nowX=parseInt(which.style.left);
    nowY=parseInt(which.style.top);
    onpeut=true;
    document.onmousemove=makeit;
  }
}

function makeit(e){
  if (!onpeut) return;
  which.style.left=estIE ? nowX+event.clientX-movesx : nowX+e.clientX-movesx; 
  which.style.top=estIE ? nowY+event.clientY-movesy : nowY+e.clientY-movesy;
  return false;  
}

function HideMe(){
  if (estIE||estNN) document.getElementById("filesform").style.visibility="hidden";
  else if (estN4) document.filesform.visibility="hide";
}
function ShowMe(){
  if (estIE||estNN) document.getElementById("filesform").style.visibility="visible";
  else if (estN4) document.filesform.visibility="show";
}

function two_part() { 
//cutTheCookie();
HideMe();
}

function function_collect() {
//Center();
whatHeight();
ShowMe();
sliding();
}

function bmoi_fade_ver_1_1() {
	setTimeout("function_collect();", 6000);
}