
<!--
// by Vic Phillips http://www.vicsjavascripts.org.uk

// Initialise by a <BODY> or window onload event for each slide element
// e.g.
// <body onload="zxcSlideH('Test1',10,100,20);zxcSlideH('Test2',10,100,100);">
// where
// parameter 0 = the unique ID name of the 'Slide' element. (string)
// parameter 1 = the minimum height. (digits)
// parameter 2 = the maximum height. (digits)
// parameter 3 = the slide speed, 10 = fast, 100 = slow. (digits)


// To Activate
//
// e.g.
// <input type="button" name="" value="Change" onmouseover="zxcSlideHDo('Test1',1);" onmouseout="zxcSlideHDo('Test1',-1);">
// where
// parameter 0 = the unique ID name of the 'Slide' element. (string)
// parameter 1 = to slide open = > 0, to slide close = < 0. (digits)



// **** Functional Code - NO NEED to Change



var zxcOOPCnt=0;


function zxcSlideH(zxcid,zxcmin,zxcmax,zxcdly){
var zxcobj=document.getElementById(zxcid);
window['zxcSlide'+zxcid]=new zxcOOPMMHeight(zxcobj,zxcmin,zxcmax,zxcdly);
}

function zxcSlideHDo(zxcid,zxcd){
var zxcobj=window['zxcSlide'+zxcid];
clearTimeout(zxcobj.to);
if (zxcd>0){ zxcobj.obj.style.display=''; }
zxcobj.cngh(zxcd);
}

function zxcOOPMMHeight(zxcobj,zxcmin,zxcmax,zxcdly){
this.obj=zxcobj;
this.ref='zxcmmh'+zxcobj.id;
window[this.ref]=this;
this.h=[zxcmin,zxcmax];
this.dly=zxcdly||20;
this.to=null;
this.d=1;
}

zxcOOPMMHeight.prototype.cngh=function(zxcd){
this.d=zxcd||this.d;
this.hnow=parseInt(this.obj.style.height);
if ((this.d>0&&this.hnow<this.h[1])||(this.d<0&&this.hnow>this.h[0])){
this.obj.style.height=(this.hnow+=this.d)+'px';
this.setTimeOut('cngh();',this.dly);
}
else {
if (this.d<0){ this.obj.style.height=this.h[0]; this.obj.style.display='none'; }
if (this.d>0){ this.obj.style.height=this.h[1]; }
}
}

zxcOOPMMHeight.prototype.setTimeOut=function(zxcf,zxcd){
this.to=setTimeout('window.'+this.ref+'.'+zxcf,zxcd);
}


//-->
