//browsercheck
function checkBrowser(){
	this.ver=navigator.appVersion
	this.dom=document.getElementById?1:0
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie4=(document.all && !this.dom)?1:0;
	this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
	return this
}
bw=new checkBrowser()

//Object constructor
function makeObj(obj,nest){
    nest=(!nest) ? '':'document.'+nest+'.'
    this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0;
    this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0;
    this.obj = obj + "Object"
    eval(this.obj + "=this")
    return this
}

function _show_div(obj){
 if((cur!=null)&&(obj!=cur))
  cur.css.visibility='hidden';
 obj.css.visibility='visible';
 cur = obj;
}

function _hide_div(obj){
 obj.css.visibility='hidden';
}

// fonctions de localisation

 function locate_1(_lobj){
  return new Array(_lobj.pageX, _lobj.pageY);
 }

 function place_1(_lobj, x, y){
  _lobj.left = x;
  _lobj.top = y;
 }

 function locate_2(_lobj){
 var _lx = _lobj.offsetLeft, _ly = _lobj.offsetTop;
 if(_lobj.offsetParent.offsetLeft>0){
  while(_lobj.offsetParent){
   _lx += _lobj.offsetParent.offsetLeft;
   _ly += _lobj.offsetParent.offsetTop;
   _lobj = _lobj.offsetParent;
  }
 }
 else{
  while(_lobj.parentElement){
   _lx += _lobj.parentElement.offsetLeft;
   _ly += _lobj.parentElement.offsetTop;
   _lobj = _lobj.parentElement;
  }
 }
 return new Array(_lx, _ly);
 }

 function place_2(_lobj, x, y){
  _lobj.style.left = x;
  _lobj.style.top = y;
 }

 function locate_3(_lobj){
  var _lx = _lobj.offsetLeft, _ly = _lobj.offsetTop;
  while(_lobj.offsetParent){
   _lx += _lobj.offsetParent.offsetLeft;
   _ly += _lobj.offsetParent.offsetTop;
   _lobj = _lobj.offsetParent
  }
  return new Array(_lx, _ly);
 }

 function place_3(_lobj, x, y){
  _lobj.style.left = x;
  _lobj.style.top = y;
 }


