// JavaScript Document





// Clickable stars adding
function changeUpTo(limit, maxLimit, onClass, offClass) {
	for (i=1; i <= maxLimit; i++) {
    document.getElementById('star_'+i).className = offClass;
	}

	for (i=1; i <= limit; i++) {
    document.getElementById('star_'+i).className = onClass;
	}
}


// Clickable phones adding
function changeUpToPhone(limit, maxLimit, onClass, offClass) {
	for (i=1; i <= maxLimit; i++) {
    document.getElementById('phone_'+i).className = offClass;
	}

	for (i=1; i <= limit; i++) {
    document.getElementById('phone_'+i).className = onClass;
	}
}

// Clickable timelog adding
function changeUpToTime(limit, maxLimit, onClass, offClass) {
	for (i=1; i <= maxLimit; i++) {
    document.getElementById('time_'+i).className = offClass;
	}

	for (i=1; i <= limit; i++) {
    document.getElementById('time_'+i).className = onClass;
	}
}

// Clickable Steps adding
function changeUpToo(limit, maxLimit, onClass, offClass) {
	for (i=1; i <= maxLimit; i++) {
    document.getElementById('step_'+i).className = offClass;
	}

	for (i=1; i <= limit; i++) {
    document.getElementById('step_'+i).className = onClass;
	}
}

// Clickable Steps Links adding
function changeUpTooL(limit, maxLimit, onClass, offClass) {
	for (i=1; i <= maxLimit; i++) {
    document.getElementById('step_point_'+i).className = offClass;
	}

	for (i=1; i <= limit; i++) {
    document.getElementById('step_point_'+i).className = onClass;
	}
}

// Clickable pie Links adding

var cStyle;
var presentStyle;
function toggleStyleArrows(whichLayer)
{
	if (document.getElementById)
	{
		// this is the way the standards work
		if (presentStyle != null)
		{
			var lastOne = document.getElementById(presentStyle).style;
			lastOne.backgroundPosition = "0px 0px";
		}
		var style2 = document.getElementById(whichLayer).style;
		style2.backgroundPosition = "0px -20px";
		presentStyle = whichLayer;
	}
}


function toggleStyleForeward(onLayer, offLayer)
{
	if (document.getElementById) // Checks for NS4
	{
		var style1 = document.getElementById(onLayer).style
		style1.backgroundPosition = style1.backgroundPosition? "0px 0px":"0px -25px";
		document.getElementById(offLayer).style.backgroundPosition? "0px 0px":"0px 0px";
	}
}



// Clickable Photoes
var currentStyleClickable;

function toggleStylePhotos(whichLayer)
{
	if (document.getElementById)
	{
		// this is the way the standards work
		if (currentStyle != null)
		{
			var lastOne = document.getElementById(currentStyle).style;
			lastOne.backgroundPosition = "0px 0px";
		}
		var style2 = document.getElementById(whichLayer).style;
		style2.backgroundPosition = "0px -75px";
		currentStyle = whichLayer;
	}
}


// Clickable Photoes


function toggleStylePhotosSmall(whichLayer)
{
	if (document.getElementById)
	{
		// this is the way the standards work
		if (currentStyle != null)
		{
			var lastOne = document.getElementById(currentStyle).style;
			lastOne.backgroundPosition = "0px 0px";
		}
		var style2 = document.getElementById(whichLayer).style;
		style2.backgroundPosition = "0px -75px";
		currentStyle = whichLayer;
	}
}

// Steps old
var currentStyle;

function toggleStyleSteps(whichLayer)
{
	if (document.getElementById)
	{
		// this is the way the standards work
		if (currentStyle != null)
		{
			var lastOne = document.getElementById(currentStyle).style;
			lastOne.backgroundPosition = "0px 0px";
		}
		var style2 = document.getElementById(whichLayer).style;
		style2.backgroundPosition = style2.backgroundPosition? "0px 0px":"0px -25px";
		
		currentStyle = whichLayer;
	}
}



// Decoration
var currentDecoration;

function toggleStyleDecoration2(whichLayer)
{
	if (document.getElementById)
	{
		// this is the way the standards work
		if (currentDecoration != null)
		{
			var lastOne = document.getElementById(currentDecoration).style;
			lastOne.textDecoration = "";
		}
		var style2 = document.getElementById(whichLayer).style;
		style2.textDecoration = style2.textDecoration? "":"underline";
		
		

		
		currentDecoration = whichLayer;		
	}
}

// Decoration
var currentDecoration2;

function toggleStyleDecoration(whichLayer)
{
	if (document.getElementById)
	{
		// this is the way the standards work
		if (currentDecoration2 != null)
		{
			var lastOne = document.getElementById(currentDecoration2).style;
			lastOne.textDecoration = "";
		}
		var style2 = document.getElementById(whichLayer).style;
		style2.textDecoration = style2.textDecoration? "":"underline";
		
		
		
		
		currentDecoration2 = whichLayer;		
	}
}




<!-- div show/hide
var currentExpanded;

function toggleLayer(whichLayer)
{
	if (document.getElementById)
	{
		// this is the way the standards work
		if (currentExpanded != null)
		{
			var lastOne = document.getElementById(currentExpanded).style;
			lastOne.display = "";
		}
		var style2 = document.getElementById(whichLayer).style;
		style2.display = style2.display? "":"inline";
		currentExpanded = whichLayer;		
	}
}