// Standard functions - derived from the Dithered 1k JS library: http://www.dithered.com/javascript/
d=document;l=d.layers;op=navigator.userAgent.indexOf('Opera')!=-1;var ie=d.all?1:0;var w3c=d.getElementById?1:0;
//if(ie) w3c = 0;
// Get element
function gE(e,f){if(l){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;}g=(f)?f:d;if(g.all)return g.all[e];return g.getElementById(e);}
// Show element
function sE(e){l?e.visibility='show':e.style.visibility='visible';}
// Hide element
function hE(e){l?e.visibility='hide':e.style.visibility='hidden';}
// Get X position
function gX(e){if(l){return e.left;}else if(ie){return e.style.pixelLeft;}else{s=getComputedStyle(e,null);return parseInt(s.getPropertyValue('left'));}}
// Get Y position
function gY(e){if(l){return e.top;}else if(ie){return e.style.pixelTop;}else{s=getComputedStyle(e,null);return parseInt(s.getPropertyValue('top'));}}
// Get width
function gW(e){if(l) return e.clip.width; else return e.offsetWidth;}
// Get height
function gH(e){if(l) return e.clip.height; else return e.offsetHeight;}
// Set depth
function sZ(e,z){l?e.zIndex=z:e.style.zIndex=z;}
// Set X position
function sX(e,x){l?e.left=x:op?e.style.pixelLeft=x:e.style.left=x;}
// Set Y position
function sY(e,y){l?e.top=y:op?e.style.pixelTop=y:e.style.top=y;}
// Set width
function sW(e,w,m){if(!m)m=0;l?e.clip.width=w:op?e.style.pixelWidth=w:e.style.width=w-m;}
// Set height
function sH(e,h,m){if(!m)m=0;l?e.clip.height=h:op?e.style.pixelHeight=h:e.style.height=h-m;}
// Set layer clipping area
function sC(e,t,r,b,x){l?(X=e.clip,X.top=t,X.right=r,X.bottom=b,X.left=x):e.style.clip='rect('+t+' '+r+' '+b+' '+x+')';}
// Write HTML
function wH(e,h){if(l){Y=e.document;Y.open();Y.write(h);Y.close();}else if(e.innerHTML){e.innerHTML='';e.innerHTML=h;}}
// Move layer
function mL(e,x,y){sX(e,x);sY(e,y);}
// Resize layer
function rL(e,w,h,m){if(ie)m=0;sW(e,w,m);sH(e,h,m);}
// Browser width
function bW(){if(!ie) return window.innerWidth;else return document.body.clientWidth;}
// Browser height
function bH(){if(!ie) return window.innerHeight;else return document.body.clientHeight;}
// Roll image over
function rO(n,i,s){e=gE(n);e.src=(s==1)?imgDir+i+"-over.gif":imgDir+i+".gif";}
// Swap image
function sI(n,i){e=gE(n);e.src=imgDir+i+".jpg";}
// Preload images
function pI(){d.pli=new Array();var i,j=d.pli.length,a=pI.arguments;for(i=0;i<a.length;i++) if(a[i].indexOf("#")!=0){d.pli[j]=new Image;d.pli[j++].src=a[i];}}
// Change object class
function cC(n,c){e=gE(n);e.className=c;}
// Change object display (more than just hiding)
function dE(n,s,n1,c1,c2){e=gE(n);if(!s)s=(e.style.display!='none')?-1:1;e.style.display=(s==1)?'':'none';
		if(c2!=undefined && e.style.display!='none'){
			cC(n1,c2);
		}
		if(c1!=undefined && e.style.display=='none'){
			cC(n1,c1);
		}
}