// 1k DHTML API - standards version

// gE()
// (Get Element)	gE(i)
// i - Element id (s)	Returns a reference to the named element (even nested elements in NS4). This reference is used by the other functions.

// sE()
// (Show Element)	sE(e)
// e - Element ref.	Makes the element visible.

// hE()
// (Hide Element)	hE(e)
// e - Element ref.	Makes the element invisible.

// sZ()
// (Set Z-index)	sZ(e,z)
// e - Element ref.
// z - New z-index (i)	Assigns a new z-index to the element.

// sX()
// (Set X)	sX(e,x)
// e - Element ref.
// x - New x-coord (i)	Changes the element's horizontal position.

// sY()
// (Set Y)	sY(e,y)
// e - Element ref.
// y - New y-coord (i)	Changes the element's vertical position.

// sW()
// (Set Width)	sW(e,w)
// e - Element ref.
// w - New width (i)	Changes the element's width.

// sH()
// (Set Height)	sH(e,h)
// e - Element ref.
// w - New height (i)	Changes the element's height.

// sC()
// (Set Clip)	sC(e,t,r,b,l)
// e - Element ref.
// t - New top clip (i)
// r - New right clip (i)
// b - New bottom clip (i)
// l - New left clip (i)	Changes the element's clipping values. Not supported in Opera and IE4.0 Mac.

// wH()
// (Write HTML)	wH(e,h)
// e - Element ref.
// h - New HTML content (s)	Writes new content to the element erasing the old content. Buggy in IE4.x Mac. Not supported in Opera.

// Changes:
// =============================================Thomas Miliopoulos=====21-MAI-2003=======

// Renaming:
// d -> doc
// l -> document.layers
// px -> pix

// New Functions:
// gH(e) - Get Height
// gW(e) - Get Width
// gAH() - Get Available Height
// gAW() - Get Available Width
// cE() - Center Element

doc=document;l=doc.layers;op=navigator.userAgent.indexOf('Opera')!=-1;pix='px';
function gE(e,f){if(document.layers){f=(f)?f:self;var V=f.document.layers;if(V[e])return V[e];for(var W=0;W<V.length;)t=gE(e,V[W++]);return t;}if(doc.all)return doc.all[e];return doc.getElementById(e);}
function sE(e){document.layers?e.visibility='show':e.style.visibility='visible';}
function hE(e){document.layers?e.visibility='hide':e.style.visibility='hidden';}
function sZ(e,z){document.layers?e.zIndex=z:e.style.zIndex=z;}
function sX(e,x){document.layers?e.left=x:op?e.style.pixelLeft=x:e.style.left=x+pix;}
function sY(e,y){document.layers?e.top=y:op?e.style.pixelTop=y:e.style.top=y+pix;}
function sW(e,w){document.layers?e.clip.width=w:op?e.style.pixelWidth=w:e.style.width=w+pix;}
function sH(e,h){document.layers?e.clip.height=h:op?e.style.pixelHeight=h:e.style.height=h+pix;}
function sC(e,t,r,b,x){document.layers?(X=e.clip,X.top=t,X.right=r,X.bottom=b,X.left=x):e.style.clip='rect('+t+pix+' '+r+pix+' '+b+pix+' '+x+pix+')';}
function wH(e,h){if(document.layers){Y=e.document;Y.open();Y.write(h);Y.close();}if(e.innerHTML)e.innerHTML=h;}

function gW(e){if(document.layers){return e.clip.width;}else{if(op){return e.style.pixelWidth;}else{return e.offsetWidth;}}}
function gH(e){if(document.layers){return e.clip.height;}else{if(op){return e.style.pixelHeight;}else{return e.offsetHeight;}}}
function gAH(){if(document.layers){return window.innerHeight;}else{return document.body.clientHeight;}}
function gAW(){if(document.layers){return window.innerWidth;}else{return document.body.clientWidth;}}
function cE(e){sX(e,parseInt((parseInt(gAW())-parseInt(gW(e)))/2));sY(e,parseInt((parseInt(gAH())-parseInt(gH(e)))/2));return e;}

