// JavaScript Document
//Transcendent Design copyright 2008
//tdesignonline.com
//richardandrewlee@yahoo.com

var ll2=document.getElementById('lnav2').getElementsByTagName('a');
	for(z=0;z<ll2.length;z++)
	{
		ll2[z].setAttribute('class','rollover')
		ll2[z].style.backgroundPosition= "160px 0px";
		ll2[z].onmouseover = rollerin;
		ll2[z].onmouseout = rollerout;
	}
	


	var ll=document.getElementById('lnav').getElementsByTagName('a');
	for(z=0;z<ll.length;z++)
	{
		ll[z].setAttribute('class','rollover')
		ll[z].style.backgroundPosition= "160px 0px";
		ll[z].onmouseover = rollerin;
		ll[z].onmouseout = rollerout;
	}
	
	var nl=document.getElementById('navbar').getElementsByTagName('a');
	for(y=0;y<nl.length;y++)
	{
		nl[y].onmouseover = rollin;
		nl[y].onmouseout = rollout;
		
	}



function  rollerin()
{
	var vars = this;
	var a=160;
	function one()
	{
		a=a/1.35;
		if(a<0)
		{
			return false;
		}
		vars.style.backgroundPosition=a+"px 0px";
		rolltimer=setTimeout(one,50);
	}
	one();
}

function  rollerout()
{
	clearTimeout(rolltimer);
	var vars2 = this;
	var b=1;
	function two()
	{
		b=b*2;
		if(b>300)
		{
		
			return false;
		}
		vars2.style.backgroundPosition=b+"px 0px";
		rollouttimer=setTimeout(two,50);
	}
	two();
}
//main navigation begin

function  rollin()
{
	var bg1=this;
	bg1.style.backgroundColor="#784d24"
}






function  rollout()
{
	//clearTimeout(intimer);
	var bg2=this;
	var bgb=8;
	function white()
	{
		
		if (bgb==(-1))
		{
			bg2.style.backgroundColor="transparent";
			return false;
		}
		if (bgb==0)
		{
			bg2.style.backgroundColor="#ffffff";
		}
		else if(bgb==1)
		{
			bg2.style.backgroundColor="#efeae4"
		}
		
		else if(bgb==2)
		{
			bg2.style.backgroundColor="#e6ded5"
		}
		
		else if(bgb==3)
		{
			bg2.style.backgroundColor="#d5c7bb"
		}
		
		else if(bgb==4)
		{
			bg2.style.backgroundColor="#b8a28b"
		}		
				
		else if(bgb==5)
		{
			bg2.style.backgroundColor="#aa8f74"
		}
		else if(bgb==6)
		{
			bg2.style.backgroundColor="#9b7c5e"
		}
		
		else if(bgb==7)
		{
			bg2.style.backgroundColor="#784d24"

		}
		bgb--;
		intimer=setTimeout(white,33);
	}
	white();
}

