//used to switch the class of elements on the fly.
function change(id, newClass) {
identity=document.getElementById(id);
identity.className=newClass;
}

// used to hide and show elements. 
function show(idLayer) { document.getElementById(idLayer).style.display='block'; }
function showInline(idLayer) { document.getElementById(idLayer).style.display='inline'; }
function hide(idLayer) { document.getElementById(idLayer).style.display='none'; }


function wesGo()
{
	goOpaque("dvSheet");
	setTimeout("goTransparent('dvSheet')",500);
}


function goOpaque(strID)
{
	fadeToMax(strID,0,100);
}
function goTransparent(strID)
{
	fadeToMax(strID,100,0);
}
function fadeToMax(strID,intStart,intMax)
{
	var speed = 2;
	var timer = 0;
	if(intStart<intMax)
	{
		for(i=intStart;i<=intMax;i++)
		{
			setTimeout("setOpacity('" + strID + "'," + i + ")",2 * timer);
			timer++;
		}
	}
	else if(intStart>intMax)
	{
		for(i=intStart;i>=intMax;i--)
		{
			setTimeout("setOpacity('" + strID + "'," + i + ")",2 * timer);
			timer++;
		}
	}
}
function setOpacity(strID,intW)
{
	document.getElementById(strID).style.opacity = intW/100;
	document.getElementById(strID).style.filter = "alpha(opacity=" + intW + ")";
}



function servHover(strID)
{
	goOpaque("dvSheet");
	setTimeout("hideAll()",350);
	setTimeout("showObj('" + strID + "')",350);
	setTimeout("goTransparent('dvSheet')",350);
}

function servSelect(strID)
{
	
	document.getElementById('aRoman').style.backgroundPosition = "100% 100%";
	document.getElementById('aBarrages').style.backgroundPosition = "100% 100%";
	document.getElementById('aFlorals').style.backgroundPosition = "100% 100%";
	document.getElementById('aMines').style.backgroundPosition = "100% 100%";
	document.getElementById('aFountains').style.backgroundPosition = "100% 100%";
	document.getElementById('aCakes').style.backgroundPosition = "100% 100%";
	document.getElementById('aStrobes').style.backgroundPosition = "100% 100%";
	
	document.getElementById(strID).style.backgroundPosition = "0% 0%";
	
}


function showObj(strID)
{
	document.getElementById(strID).style.display = "block";
}

function hideObj(strID)
{
	document.getElementById(strID).style.display = "none";
}
function hideAll()
{
	hideObj('expert-roman');
	hideObj('expert-barrages');
	hideObj('expert-florals');
	hideObj('expert-mines');
	hideObj('expert-fountains');
	hideObj('expert-cakes');
	hideObj('expert-strobes');
}
