//<![CDATA[
<!--
// **** Executing the Effect(Script)
//
// The effect is executed by an event call to function 'rmsAnimator('left','tst1',20,260,'sin',2000);'
// where:
// parameter 0 = 'left', 'top', 'width', 'height', 'color', 'background-Color', 'opacity' etc.             (string)
//               Note: the first character after the hyphen must be upper case, all others lower case.
//                     With the exception of opacity and color the property value units is in 'px'.
// parameter 1 = the unique ID name or element object.                                                     (string or element object)
// parameter 2 = the start position of the effect.                                                         (digits, for opacity minimum 0, maximum 100)
// parameter 3 = the finish position of the effect.                                                        (digits, for opacity minimum 0, maximum 100)
// parameter 4 = (optional) there are two types of progressive change 'sin' and 'cos' plus a liner change. ('sin', 'cos' or liner, defaults to liner)
//                'sin' progression starts fast and ends slow.
//                'cos' progression starts slow and ends fast.
// parameter 5 = (optional) period of time between the start and finish of the effect in milliseconds.     (digits or defaults to 2000 milliSeconds)
// parameter 6 =  The script may be used to animate border color and size for 'border'                     (string)
//                parameter 0 = border, border-Top, border-Bottom, border-Left or border-Right. (string)
//                parameter 6 is required the default border value.
//                example: 'solid #ffffff 1px'. Note type, color in HEX and size separated by spaces.




var rmsOOPCnt=0;

document.onmouseover = doEffect;
document.onmouseout = doEffect;

function doEffect(event)
{
	event = (event) ? event : (window.event) ? window.event : '';
	if( event )
	{
		rmsobjElem = (event.target) ? event.target : event.srcElement;
		if( rmsobjElem.className == 'forumlink' )
		{
			rmsAnimator('color', rmsobjElem, '#E76257', '#FFFFFF', 'sin', 500);
		}
		else if( rmsobjElem.className == 'topictitle' )
		{
			rmsAnimator('color', rmsobjElem, '#FFFFFF', '#E76257', 'sin', 500);
		}
	}
}

function rmsAnimator(rmsmde,rmsobj,rmssrt,rmsfin,rmscurve,rmstime,rmsborder){
 if (typeof(rmsobj)=='string'){ rmsobj=document.getElementById(rmsobj); }
 if (!rmsobj||(!rmssrt&&!rmsfin)||rmssrt==rmsfin) return;
 var rmsoop=rmsobj[rmsmde.replace('-','')+'oop'];
 if (rmsoop){
  rmssrt=rmsNuRGB(rmssrt); rmsfin=rmsNuRGB(rmsfin);
  if (rmsCkArray(rmssrt,rmsoop.data[1])&&rmsCkArray(rmsfin,rmsoop.data[2])) rmsoop.update([rmsoop.data[0],rmssrt],rmscurve,rmstime,rmsborder);
  else rmsoop.update([rmssrt,rmsfin],rmscurve,rmstime,rmsborder);
 }
 else rmsobj[rmsmde.replace('-','')+'oop']=new rmsAnimatorOOP(rmsmde,rmsobj,rmssrt,rmsfin,rmscurve,rmstime,rmsborder);
}

function rmsAnimatorOOP(rmsmde,rmsobj,rmssrt,rmsfin,rmscurve,rmstime,rmsborder){
 if (rmsStyleValue(rmsobj,'position')=='static'&&(rmsmde=='left'||rmsmde=='top')) rmsobj.style.position='relative';
 this.units=rmssrt.toString().replace(/\d/g,'')||'px';
 this.to=null;
 this.obj=rmsobj;
 this.mde=rmsmde;
 this.update([rmsNuRGB(rmssrt),rmsNuRGB(rmsfin)],rmscurve,rmstime,rmsborder);
}

rmsAnimatorOOP.prototype.update=function(rmssrtfin,rmscurve,rmstime,rmsborder){
 clearTimeout(this.to);
 rmscurve=rmscurve||this.curve||'';
 this.time=rmstime||this.time||2000;
 if (rmssrtfin[0]==rmssrtfin[1]) return;
 for (var rms0=0;rms0<rmssrtfin.length;rms0++){
  var rmsobj=document.getElementById(rmssrtfin[rms0]);
  if (rmsobj){ rmssrtfin[rms0]=rmsStyleValue(rmsobj,rmsmde); if (!this.mde.match('olor')) rmssrtfin[rms0]=parseInt(rmssrtfin[rms0]); }
  if (rmssrtfin[rms0]==0) rmssrtfin[rms0]=0.00001;
 }
 if (this.mde=='opacity'&&(rmssrtfin[0]<0||rmssrtfin[0]>100||rmssrtfin[0]<0||rmssrtfin[0]>100)) return;
 if (rmsborder) this.brd=rmsborder.split(' ');
 this.curve=rmscurve.charAt(0).toLowerCase();
 var rmsmatch=rmssrtfin[0].toString();
 this.data=[[],rmssrtfin[0],rmssrtfin[1]];
 for (var rms0 in this.data[1]) this.data[0].push(this.data[1][rms0]);
 this.srttime=new Date().getTime();
 this.inc=Math.PI/(2*this.time);
 this.cng();
}

rmsAnimatorOOP.prototype.cng=function(){
 var rmsms=new Date().getTime()-this.srttime;
 for (var rms0 in this.data[2]){ this.data[0][rms0]=(this.curve=='s')?Math.floor((this.data[2][rms0]-this.data[1][rms0])*Math.sin(this.inc*rmsms)+this.data[1][rms0]):(this.curve=='c')?(this.data[2][0])-Math.floor((this.data[2][rms0]-this.data[1][rms0])*Math.cos(this.inc*rmsms)):(this.data[2][rms0]-this.data[1][rms0])/this.time*rmsms+this.data[1][rms0]; }
 this.cngstyle(this.data[0]);
 if (rmsms<this.time) this.to=setTimeout(function(rmsoop){return function(){rmsoop.cng();}}(this), 10);
 else this.cngstyle(this.data[2]);
}

rmsAnimatorOOP.prototype.cngstyle=function(rmspar){
 if (this.mde.match('border')){
  if (rmspar.length==1) this.obj.style[this.mde.replace('-','')]=this.brd[0]+' '+this.brd[1]+' '+rmspar[0]+this.units;
  if (rmspar.length==3) this.obj.style[this.mde.replace('-','')]=this.brd[0]+' rgb('+rmspar[0]+','+rmspar[1]+','+rmspar[2]+') '+this.brd[2];
 }
 else if (this.mde.match('olor')) this.obj.style[this.mde.replace('-','')]='rgb('+rmspar[0]+','+rmspar[1]+','+rmspar[2]+')';
 else if (this.mde!='opacity') this.obj.style[this.mde]=rmspar[0]+this.units;
 else this.opacity(rmspar[0]);
}

rmsAnimatorOOP.prototype.opacity=function(rmsopc){
 if (rmsopc<0||rmsopc>100) return;
 if (this.obj.style.MozOpacity!=null) this.obj.style.MozOpacity=(rmsopc/100)-.001;
 else if (this.obj.style.opacity!=null) this.obj.style.opacity=(rmsopc/100)-.001;
 else if (this.obj.style.filter!=null) this.obj.style.filter='alpha(opacity='+rmsopc+')';
 else if (this.obj.KHTMLOpacity!=null) this.obj.KHTMLOpacity=(rmsopc/100)-.001;
}

function rmsStyleValue(rmsel,rmsp){
 if (rmsel.currentStyle) return rmsel.currentStyle[rmsp.replace('-','')];
 return document.defaultView.getComputedStyle(rmsel,null).getPropertyValue(rmsp.toLowerCase());
}

function rmsNuRGB(rmscol)
{
	if( !rmscol.toString().match('#') )
	{
		return [parseInt(rmscol)];
	}
	rmscol=parseInt(rmscol.substring(1,3),16)+', '+parseInt(rmscol.substring(3,5),16)+','+parseInt(rmscol.substring(5,7),16);
	rmscol=rmscol.replace(/[rgb()\s]/g,'').split(',');
	return [parseInt(rmscol[0]), parseInt(rmscol[1]), parseInt(rmscol[2])];
}

function rmsCkArray(rmsary,rmsdata)
{
	for( var rms0 = 0; rms0 < rmsary.length; rms0++ )
	{
		if( rmsary[rms0] != rmsdata[rms0] )
		{
			return false;
		}
	}
	return true;
}
//-->
//]]>