
//				VARIABLE CUSTOMIZABLE
//=============================================================

//=============================================================

//=============================================================

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

//				CLASS RASTAMART
//=============================================================
//	----------	Layer		----------
//=============================================================

function RastaMartLay(objLay) {
	this.layer = objLay;
	this.css = this.layer.style;
	return this;
}

//	----------	Show-Hide	----------
RastaMartLay.prototype.openIt = function () { if (document.layers) this.layer.visibility="show"; else this.css.visibility="visible"; }
RastaMartLay.prototype.closeIt = function () { if (document.layers) this.layer.visibility="hidden"; else this.css.visibility="hidden"; }

//	----------	X	 		----------
RastaMartLay.prototype.getX = function () { if (document.layers) return this.layer.left; else return this.css.left.replace(/px/, "").replace(/pt/, ""); }
RastaMartLay.prototype.setX = function (X) { if (document.layers) this.layer.left = X; else this.css.left = X+"px"; }

//	----------	Y			----------
RastaMartLay.prototype.getY = function () { if (document.layers) return this.layer.top; else return this.css.top.replace(/px/, "").replace(/pt/, ""); }
RastaMartLay.prototype.setY = function (Y) { if (document.layers) this.layer.top = Y; else this.css.top = Y+"px"; }

//	----------	X,Y			----------
RastaMartLay.prototype.setPos = function (X,Y) { if (document.layers) this.layer.left = X; else this.css.left = X+"px"; if (document.layers) this.layer.top = Y; else this.css.top = Y+"px"; }

//	----------	WIDTH		----------

RastaMartLay.prototype.getWidth = function () { 
	if (document.layers) return this.layer.clip.width; 
	else return this.layer.offsetWidth; }

RastaMartLay.prototype.setWidth = function (Width) { 
	if (document.layers) this.layer.clip.width = Width; 
	else this.css.width = Width; 
}

//	----------	HEIGHT		----------
RastaMartLay.prototype.getHeight = function () { if (document.layers) return this.layer.clip.height; else return this.layer.offsetHeight; }
RastaMartLay.prototype.setHeight = function (Height) { if (document.layers) this.layer.clip.height = Height; else this.css.height = Height; }

//	----------	Content		----------
RastaMartLay.prototype.setCont = function (cont){
	if (!document.layers){this.layer.innerHTML = cont;}else{this.layer.document.open("text/html"); this.layer.document.write(cont); this.layer.document.close();}
}

//	----------	Z-Index		----------
RastaMartLay.prototype.getZIndex = function (){ if (!document.layers) return this.css.zIndex; else return this.layer.zIndex;}
RastaMartLay.prototype.setZIndex = function (nbr){ if (!document.layers) this.css.zIndex = nbr; else this.layer.zIndex = nbr;}

//	----------	bgColor		----------
RastaMartLay.prototype.setBg = function (color){ if (document.all) this.css.backgroundColor = color;}

//	----------	fontColor	----------
RastaMartLay.prototype.setFontColor = function (color){ if (document.all) this.css.color = color;}

//	----------	Curseur		----------
RastaMartLay.prototype.setPointer = function (newCursor) { if (document.all) this.css.cursor = newCursor; }

//=============================================================
//	----------	Window		----------
//=============================================================
function RastaMartWindow() {
	this.win = window;
	return this
}
RastaMartWindow.prototype.getWidth = function () { if (window.document.all) return window.document.body.clientWidth; else return window.innerWidth; }
RastaMartWindow.prototype.getHeight = function () { if (window.document.all) return window.document.body.clientHeight; else return window.innerHeight; }
RastaMartWindow.prototype.getScrollX = function () { if (document.layers) return window.pageXOffset; else return window.document.body.scrollLeft; }
RastaMartWindow.prototype.getScrollY = function () { if (document.all) return window.document.body.scrollTop; else return window.pageYOffset; }

//			FONCTION POSITION CURSEUR
//		(Xpos et Ypos ont toujours la valeur de la souris)
//=============================================================
function MoveHandler() {
	if (document.all) {
		Xpos = window.document.body.scrollLeft+event.x;
		Ypos = window.document.body.scrollTop+event.y;
	}
}
if (document.all) window.document.onmousemove = MoveHandler;
