
var theDoc = document

function browser() {
	nav = navigator
	bwOS = nav.platform
	bwName = nav.appName
	bwVer = parseInt(nav.appVersion);
	this.mac=(bwOS.match('Mac')) ? true:false;
	this.ie =(bwName.match('Microsoft')) ? true:false;
	this.ie4=(theDoc.all && !theDoc.getElementById) ? true:false;
	this.ns =(bwName==("Netscape")) ? true:false;
	this.ns4=((bwName==("Netscape")) && (bwVer==4)) ? true:false;
	this.ns5=((bwName==("Netscape")) && (bwVer>=5)) ? true:false;
	this.dom=theDoc.getElementById?true:false;
}
is = new browser();

function getFrame(vId) {
  if(is.dom)
    return (parent.document.getElementById[vId]);
  else {
    return eval('parent.frames['+id+']');
  }
}

function getRef(vId) {
  if(is.dom)
    return (document.getElementById[vId]);
  else {
    return eval('document.'+id);
  }
}

function getRefFormInput(vForm,vInput) {
  return eval("document"+"."+vForm+"."+vInput)
}

function winPopup(url, largeur, hauteur, scroll, winTitle) {
  var parametres = 'TOOLBAR=NO,LOCATION=NO,DIRECTORIES=NO,STATUS=NO,MENUBAR=NO,SCROLLBARS='+ scroll +',RESIZABLE=YES,COPYHISTORY=NO,WIDTH='+ largeur +',HEIGHT='+ hauteur;
  var w = window.open(url, winTitle, parametres);
  w.focus();
}

function rol(id,etat) {
  if (document.images) document.images[id].src = eval( id+"_"+etat+".src" )
  else return
}

function divMaker(id) {
  this.elm = is.dom?theDoc.getElementById(id):is.ie4?theDoc.all[id]:is.ns4?eval('document.'+id):0;
  this.css = is.dom?this.elm.style:is.ie4?this.elm.style:is.ns4?this.elm:0;
  this.doc = (is.dom || is.ie4)?theDoc:is.ns4?this.css.document:0;
  this.x = (is.dom || is.ie4)?this.elm.offsetLeft:is.ns4?this.css.left:0;
  this.y = (is.dom || is.ie4)?this.elm.offsetTop:is.ns4?this.css.top:0;
  this.w = (is.dom || is.ie4)?this.elm.offsetWidth:is.ns4?this.css.clip.width:0;
  this.h = (is.dom || is.ie4)?this.elm.offsetHeight:is.ns4?this.css.clip.height:0;
	this.moveTo = moveTo;
	this.show = show;
	this.hide = hide;
	this.isVisible = 0;
}
function show() {
	this.css.visibility = (is.ns4) ? 'show' : 'visible';
	this.isVisible = 1;
}
function hide() {
	this.css.visibility = (is.ns4) ? 'hide' : 'hidden';
	this.isVisible = 0;
}