<!--
// Rewritten dynamic animation script to support DOM 1 and 2 standards
// Only browsers that support DOM2 and ECMAScript-2 (Javascript 1.3)
// will run this script properly: Opera 5.x, Netscape 6.x, IE 5.x

animCancel = "skipanim";
// fpanimationPrefix = "fpAnim";
animateElements = new Array();
currentElement = 0;
speed = 15;
stepsZoom = 8;
stepsWord = 25;
stepsFly = 25;
stepsSpiral = 16;
stepsSpiralWord = 19;
stepsElastic = 32;
steps = stepsZoom;
step = 0;
cornerPhase=0;
outEffect=0;

elm = new Object;
this.doc = document;
this.elm = "element";
this.elm.id = "elmId";
this.name = name;
this.obj = this.elm.id + "Obj";
eval(this.obj+"=this");
window[this.obj] = this;

// Browser Tests for DHTML and DOM support
dynAgt=navigator.userAgent;
dynVer=navigator.appVersion;
dynDOM = (document.getElementById) ? true : false;
dynNS4 = (document.layers) ? true : false;
dynIE = (document.all) ? true : false;
dynIE4 = dynIE && !dynDOM;
dynMac = (navigator.appVersion.indexOf("Mac") != -1);
dynIE4M = dynIE4 && dynMac;
dynIE5 = dynIE && !dynMac;
dynOP5 = ((dynAgt.indexOf("Opera") != -1) && navigator.appName == ("Opera") &&  parseInt( navigator.appVersion ) == ("5"));
dynOPIE = ((dynAgt.indexOf("Opera") != -1) && (dynVer.indexOf("MSIE 5.0") != -1));
if (dynOPIE)
{
	dynOP5 = true;
	dynIE = false;
	dynIE5 = false;
}
dynIE5M = dynIE && dynMac && dynDOM;
dynIE5W = dynIE && !dynMac && dynDOM;
dynNS6 = (navigator.vendor == ("Netscape6") || navigator.product == ("Gecko"));
dynIEDTD = (dynIE && document.doctype) ? document.doctype.name.indexOf(".dtd")!=-1 : false;
dynIEnoDTD = dynIE && !dynIEDTD;

// Start of function definitions
function remSuffix(str)
{
	ind=str.indexOf("FP");
	str = str.substring(0,ind);
	return str;
}

function dynAnimOut(obj)
{
	outEffect=1;
	dynAnimation(this.obj);
	outEffect=0;
}

function dynAnimation(obj)
{
	animateElements = new Array();
	i = 0;
	for (j = 1; j <= (elemidArray.length); j++)
	{
		obj = new Object;
		this.elm = document.getElementById(elemidArray[j]);
		if (this.elm) this.obj=this.elm;
		elprops=this.obj.style;
		if (dynIE5)
		{
			scrollOffsetTop=document.body.scrollTop;
			docHeight=document.body.offsetHeight;
			docWidth=document.body.offsetWidth;
			elW=100;
			elH=this.obj.offsetHeight;
		}
		else if (dynOP5)
		{
			scrollOffsetTop=window.pageYOffset;
			docHeight=window.innerHeight;
			// docHeight=document.height;
			docWidth=window.innerWidth;
			// docWidth=document.width;
			elW=100;
			elH=0;
		}
		else if (dynNS6)
		{
			scrollOffsetTop=window.pageYOffset;
			docHeight=document.body.offsetHeight;
			docWidth=document.body.offsetWidth;
			elW=100;
			elH=this.obj.offsetHeight;
		}
		else
		{
			scrollOffsetTop=document.body.scrollTop;
			docHeight=document.body.offsetHeight;
			docWidth=document.body.offsetWidth;
			elW=100;
			elH=this.obj.offsetHeight;
		}
		if(outEffect)
		{
			animationId = this.obj.id.substring(9,this.obj.id.length);
		}
		else
		{
			animationId = this.obj.id.substring(6,this.obj.id.length);
		}
		animation=remSuffix(animationId);
		if(outEffect && (obj != this.obj))
		{
			if(this.elm.SRCID != obj.id)
			{
				continue;
			}
		}
		if (null != animation )
		{
			if(null!=this.obj.getAttribute(animCancel, false))
			{
				continue;
			}
			this.obj.startL=offsetL(this.elm);
			if(animation == "flyLeft")
			{
				elprops.pixelLeft = -offsetL(this.elm)-elW;
				elprops.pixelTop = 0;
			}
			else if(animation == "flyRight" || animation=="elasticRight")
			{
				elprops.pixelLeft = -offsetL(this.elm)+docWidth;
				elprops.pixelTop = 0;
			}
			else if(animation == "flyTop" || animation == "dropWord")
			{
				elprops.pixelLeft = 0;
				elprops.pixelTop = scrollOffsetTop-offsetT(this.elm)-elH;
			}
			else if(animation == "flyBottom" || animation == "elasticBottom")
			{
				elprops.pixelLeft = 0;
				elprops.pixelTop = scrollOffsetTop-offsetT(this.elm)+docHeight;
			}
			else if(animation == "flyTopLeft")
			{
				elprops.pixelLeft = -offsetL(this.elm)-elW;
				elprops.pixelTop = scrollOffsetTop-offsetT(this.elm)-elH;
			}
			else if(animation == "flyTopRight" || animation == "flyTopRightWord")
			{
				elprops.pixelLeft = -offsetL(this.elm)+docWidth;
				elprops.pixelTop = scrollOffsetTop-offsetT(this.elm)-elH;
			}
			else if(animation == "flyCorner")
			{
				elprops.pixelLeft = docWidth*0.2-offsetL(this.elm);
				elprops.pixelTop = scrollOffsetTop-offsetT(this.elm)+docHeight;
			}
			else if(animation == "flyBottomLeft")
			{
				elprops.pixelLeft = -offsetL(this.elm)-elW;
				elprops.pixelTop = scrollOffsetTop-offsetT(this.elm)+docHeight;
			}
			else if(animation == "flyBottomRight" || animation == "flyBottomRightWord")
			{
				elprops.pixelLeft = -offsetL(this.elm)+docWidth;
				elprops.pixelTop = scrollOffsetTop-offsetT(this.elm)+docHeight;
			}
			else if(animation == "spiral")
			{
				elprops.pixelLeft = -offsetL(this.elm)+docWidth;
				elprops.pixelTop = scrollOffsetTop-offsetT(this.elm)+docHeight;
			}
			else if((animation.indexOf("waveWords") != -1) || animation=="hopWords")
			{
				if(i)
				{
					prevEl=animateElements[i-1];
					elprops.r = offsetL(this.elm)-prevEl.startL;
				}
				else
				{
					elprops.r = offsetL(this.elm);
				}
			}
			else if(animation == "wipeLR" || animation == "wipeMID")
			{
				if (elprops.position=="absolute")
				{
					this.obj.sizeW=this.obj.offsetWidth;
					elprops.clip="rect(0 0 0 0)";
				}
			}
			else if(animation == "wipeTB")
			{
				if (elprops.position=="absolute")
				{
					elprops.clip="rect(0 0 0 0)";
				}
			}
			else if(animation == "zoomIn")
			{
				elprops.pixelLeft = 0;
				elprops.pixelTop = 0;
			}
			else if(animation == "zoomOut")
			{
				elprops.pixelLeft = 0;
				elprops.pixelTop = 0;
			}
			else
			{
				continue;
			}
			if(!outEffect)
			{
				this.obj.initLeft = elprops.pixelLeft;
				this.obj.initTop  = elprops.pixelTop;
				this.obj.endLeft  = 0;
				this.obj.endTop   = 0;
				elprops.visibility = "hidden";
			}
			else
			{
				this.obj.initLeft = 0;
				this.obj.initTop  = 0;
				this.obj.endLeft = elprops.pixelLeft;
				this.obj.endTop  = elprops.pixelTop;
				elprops.pixelTop = 0;
				elprops.pixelLeft = 0;
			}
			animateElements[i++] = this.elm;
		} // if (null != animation )
		if(animateElements.length < elemidArray.length)
		{
			if(outEffect)
			{
				window.setTimeout("animate(1);", speed, "Javascript");
			}
			else
			{
				window.setTimeout("animate(0);", speed, "Javascript");
			}
			if (animateElements.length = elemidArray.length)
			{
				continue;
			}
		}
	} // for (j = 1; j <= (elemidArray.length); j++)
}

function offsetL(obj)
{
	x = this.obj.offsetLeft;
	for (e = this.obj.offsetParent; e; e = e.offsetParent)
	{
		x += e.offsetLeft;
	}
	return x
} 

function offsetT(obj)
{
	y = this.obj.offsetTop;
	for (e = this.obj.offsetParent; e; e = e.offsetParent)
	{
		y += e.offsetTop;;
	}
	return y;
}

function animate(animOut)
{
	this.elm = animateElements[currentElement];
	if(animOut)
	{
		animationId = this.obj.id.substring(9,this.obj.id.length);
	}
	else
	{
		animationId = this.obj.id.substring(6,this.obj.id.length);
	}
	animation=remSuffix(animationId)
	if (this.elm) this.obj=this.elm;
	elprops=this.obj.style;
	if(!step && !animOut)
	{
		elprops.visibility="visible";
	}
	step++;
	if(animation == "spiral")
	{
		steps = stepsSpiral;
		v = step/steps;
		rf = 1.0 - v;
		t = v * 2.0*Math.PI;
		rx = Math.max(Math.abs(this.obj.initLeft), 200);
		ry = Math.max(Math.abs(this.obj.initTop),  200);
		elprops.pixelLeft = Math.ceil(-rf*Math.cos(t)*rx);
		elprops.pixelTop  = Math.ceil(-rf*Math.sin(t)*ry);
	}
	else if(animation == "waveWordsL" || animation=="hopWords" || animation == "waveWords")
	{
		steps = stepsSpiralWord;
		v = step/steps;
		rf = (1.0 - v);
		t = v * 1.0*Math.PI;
		elprops.pixelLeft = Math.ceil(-rf*Math.cos(t)*elprops.r);
		elprops.pixelTop  = Math.ceil(-rf*Math.sin(t)*elprops.r);
	}
	else if(animation == "waveWordsR")
	{
		steps = stepsSpiralWord;
		v = step/steps;
		rf = (1.0 - v);
		t = v * 1.0*Math.PI;
		elprops.pixelLeft = Math.ceil(-rf*Math.cos(t)*elprops.r);
		elprops.pixelTop  = Math.ceil( rf*Math.sin(t)*elprops.r);
	}
	else if(animation == "zoomIn")
	{
		steps = stepsZoom;
		elprops.fontSize = Math.ceil(50+50*step/steps) + "%";
		elprops.pixelLeft = 0;
	}
	else if(animation == "zoomOut")
	{
		steps = stepsZoom;
		fontSz=Math.ceil(100+200*(steps-step)/steps) + "%";
		elprops.fontSize = fontSz;
		elprops.pixelLeft = 0;
	}
	else if(animation == "elasticRight")
	{
		steps = stepsElastic;
		v = step/steps;
		rf=Math.exp(-v*7);
		t = v * 1.5*Math.PI;
		rx =Math.abs(this.obj.initLeft);
		elprops.pixelLeft = rf*Math.cos(t)*rx;
		elprops.pixelTop  = 0;
	}
	else if(animation == "elasticBottom")
	{
		steps = stepsElastic;
		v = step/steps;
		rf=Math.exp(-v*7);
		t = v * 2.5*Math.PI;
		ry =Math.abs(this.obj.initTop);
		elprops.pixelLeft = 0;
		elprops.pixelTop  = rf*Math.cos(t)*ry;
	}
	else if(animation == "wipeLR")
	{
		steps = stepsElastic;
		if(elprops.position=="absolute")
		{
			elprops.clip = "rect(0 "+ step/steps*100 +"% 100% 0)";
		}
	}
	else if(animation == "wipeTB")
	{
		steps = stepsElastic;
		if(elprops.position=="absolute")
		{
			elprops.clip = "rect(0 100% "+step/steps*this.obj.offsetHeight+"px 0)";
		}
	}
	else if(animation == "wipeMID")
	{
		steps = stepsElastic
		if(elprops.position=="absolute")
		{
			elprops.clip = "rect(0 "+this.obj.sizeW/2*(1+step/steps)+"px 100% "+this.obj.sizeW/2*(1-step/steps)+")";
		}
	}
	else if(animation == "flyCorner")
	{
		if(!cornerPhase)
		{
			steps = stepsElastic/2;
			v = step/steps;
			rf=Math.exp(-v*7);
			t = v * 2.5*Math.PI;
			ry =Math.abs(this.obj.initTop);
			elprops.pixelTop  = rf*Math.cos(t)*ry;
		}
		else
		{
			steps = stepsFly;
			dl = this.obj.initLeft / steps;
			elprops.pixelLeft = elprops.pixelLeft - dl;
			elprops.pixelTop = 0;
		}
	}
	else
	{
		steps = stepsFly;
		if(animation == "dropWord" || animation == "flyTopRightWord" || animation == "flyBottomRightWord")
		{
			steps = stepsWord;
		}
		dl = (this.obj.endLeft - this.obj.initLeft) / steps;
		dt = (this.obj.endTop  - this.obj.initTop)  / steps;
		elprops.pixelLeft = elprops.pixelLeft + dl;
		elprops.pixelTop = elprops.pixelTop + dt;
	}
	if (step >= steps) 
	{
		if(!(animation == "wipeLR"	||
			animation  == "wipeTB"	||
			animation  == "wipeMID"	||
			(animation == "flyCorner" && !cornerPhase)))
		{
			elprops.pixelLeft = this.obj.endLeft;
			elprops.pixelTop = this.obj.endTop;
		}
		if(animOut)
		{
			elprops.visibility="hidden";
		}
		step = 0
		if(animation=="flyCorner" && !cornerPhase)
		{
			cornerPhase=1;
		}
		else
		{
			cornerPhase=0;
			currentElement++;
		}
	}
	elprops.left=elprops.pixelLeft;
	elprops.top =elprops.pixelTop;
	if(currentElement < animateElements.length)
	{
		if(animOut)
		{
			window.setTimeout("animate(1);", speed, "Javascript");
		}
		else
		{
			window.setTimeout("animate(0);", speed, "Javascript");
		}
	}
	else
	{
		currentElement=0;
	}
}

function rollIn(obj)
{
	this.obj.initstyle=this.obj.style.cssText;this.obj.style.cssText=this.obj.fprolloverstyle;
}

function rollOut(obj)
{
	this.obj.style.cssText=this.obj.initstyle;
}

function clickSwapStyle(obj)
{
	ts=this.obj.style.cssText;
	this.obj.style.cssText=this.obj.fprolloverstyle;
	this.obj.fprolloverstyle=ts;
}

function clickSwapImg(obj)
{
	ts=this.obj.src;
	this.obj.src=this.obj.lowsrc;
	this.obj.lowsrc=ts;
}
//-->



