function alternateRowColors(id) { 
   if(document.getElementsByTagName) { 
      var table = document.getElementById(id); 
      var rows = table.getElementsByTagName("tr"); 
      for(i = 0; i < rows.length; i++) { 
         if (i % 2 == 0) { 
             rows[i].className = "p4hStepRowOdd"; 
         }
         else { 
             rows[i].className = "p4hStepRowEven"; 
         } 
      } 
   } 
}

function removeSpaces(string) {
   var tstring = "";
   string = '' + string;
   splitstring = string.split(" ");
   for (var i = 0; i < splitstring.length; i++) {
      tstring += splitstring[i];
   }
   return tstring;
} 



// Element Opacity (04-Mar-2005)
// by Vic Phillips http://www.vicsjavascripts.org.uk

// The effect is only valid for browsers which recognise the opacity property
// i.e. Mozilla Based Browsers plus IE5+, Netscape and Konkorer.
// The element must be a element which has opacity property
// (Images will need to be in a <DIV>)
// The initial opacity may be established from a <BODY> or window onload event call
// and  the effect applied or reversed from any event call.
// There may be as many application on a page as required.

// Application Notes

// **** Initialising the Opacity

// The element opacity may  established from a <BODY> or window onload event call
// The element must be allocated a unique ID name
// e.g. <body onload="zxcEleOpacity('Test1',50);">
// parameter 0 =  unique ID name of the element (string)
// parameter 1 =  the start opacity value (0 to 100) (digit)

// **** Executing the Effect
// e.g. <div id="Test1" onmouseover="zxcEleOpacity('Test1',100,10,100,20);" style="position:relative;width:100px;height:50px;background-color:red;" ></div>
// Where:
// parameter 0 =  object or unique ID name of the element     (object or string)
// parameter 1 =  the start opacity value (0 to 100)          (digit)
// parameter 2 =  the finish opacity value (0 to 100)         (digit)
// parameter 3 =  (optional) the speed (1 = fast, 500 = slow) (digit) (default 100 milliSec)
// parameter 4 =  (optional) the number of opacity steps      (digit) (default 50)

// To reverse the effect
// transpose parameter 1 and parameter 2
// The speed parameter 3 may also be changed

// All variable, function etc. names are prefixed with 'zxc' to minimise conflicts with other JavaScripts

// The Functional Code(about 2K) is best as an External JavaScript

// Tested with IE6 and Mozilla FireFox


// Functional Code - NO NEED to Change

var zxcOOPCnt=0;


function zxcEleOpacity(zxcm,zxcsrt,zxcfin,zxcd,zxcstp){
 if (typeof(zxcm)=='string'){ zxcm=document.getElementById(zxcm); }
 if (!zxcm.oop){
  zxcsrt=zxcsrt||100;
  zxcOpacity(zxcm.style,zxcsrt);
  zxcm.oop=new zxcOOPOpacEle(zxcm,zxcsrt,zxcfin,zxcd,zxcstp);
 }
 clearTimeout(zxcm.oop.to);
 zxcm.oop.fin=zxcfin||zxcm.oop.fin;
 zxcm.oop.srt=zxcsrt||zxcm.oop.srt;
 zxcm.oop.delay=zxcd||zxcm.oop.delay;
 zxcm.oop.stp=zxcstp||zxcm.oop.stp;
 zxcm.oop.dir=1;
 zxcm.oop.inc=zxcSteps(zxcm.oop.stp,[zxcm.oop.srt,zxcm.oop.fin]);
 zxcm.oop.cnt=0;
 if (zxcm.oop.srt>zxcm.oop.fin){ zxcm.oop.cnt=zxcm.oop.inc.length; zxcm.oop.dir=-1; }
 zxcm.oop.cngopac();
}

function zxcOOPOpacEle(zxcm,zxcsrt,zxcfin,zxcd,zxcstp){
 this.obj=zxcm.style;
 this.ref='zxcoopopac'+zxcOOPCnt++;
 window[this.ref]=this;
 this.updown=true;
 this.delay=zxcd||100;
 this.fin=zxcfin||10;
 this.srt=zxcsrt||100;
 this.stp=zxcstp||50;
 this.to=null;
}

zxcOOPOpacEle.prototype.cngopac=function(){
 zxcOpacity(this.obj,(this.inc[this.cnt]));
 if ((this.cnt>0&&this.dir<0)||(this.cnt<this.inc.length-1&&this.dir>0)){
   this.cnt+=this.dir;
   this.setTimeOut("cngopac();",this.delay);
  }
}

zxcOOPOpacEle.prototype.setTimeOut=function(zxcf,zxcd){
 this.to=setTimeout("window."+this.ref+"."+zxcf,zxcd);
}

function zxcOpacity(zxcobj,zxcop) {
 if (zxcop>100||zxcop<0){ return }
 if (zxcobj.MozOpacity!=null){ zxcobj.MozOpacity=(zxcop/100)-.001; }
 else if (zxcobj.opacity!=null){ zxcobj.opacity=(zxcop/100)-.001; }
 else if (zxcobj.filter!=null){ zxcobj.filter = 'alpha(opacity='+zxcop+')';	}
 else if (zxcobj.KHTMLOpacity!=null){ zxcobj.KHTMLOpacity=(zxcop/100)-.001; }
}

function zxcSteps(zxcstps,zxcsary){
 zxctary=[];
 for (zxc1=0;zxc1<zxcstps;zxc1++){
  zxctary[zxc1]=Math.floor(Math.abs((zxcsary[0]-zxcsary[1])/(zxcstps-1))*zxc1+Math.min(zxcsary[0],zxcsary[1]))
 }
 if (zxcsary[2]>zxcsary[3]){ zxctary=zxctary.reverse(); }
 return zxctary
}






