// When a limited link is clicked, decrement the amount of clicks left.// If clicksLeft is decremented to zero, warn user via the link that the next// click will result in going to Bing.com.// If clicksLeft is greater than zero, change the text of the link accordingly.function clickLimitedLink(theAnchorID, clicksLeft){	var theAnchor = gE(theAnchorID);	clicksLeft--;	if(clicksLeft == 0)	{		theAnchor.href = "http://www.bing.com/";		theAnchor.innerHTML = "If you click me one more time, I will send you to Bing's domain!!!";		theAnchor.title = "I double-dog dare you to click me!!!";	}	else	{		theAnchor.href = "javascript:clickLimitedLink('" + theAnchorID + "', "			+ clicksLeft + ")";		theAnchor.innerHTML = "You may only click me " + clicksLeft + " more time"			+ (clicksLeft > 1 ? "s" : "") + " before I am forced to retaliate.";		theAnchor.title = "Your time is limited buddy.";	}}// If the anchor has the word "on" in its text, change the background color to// green and the anchor's text accordingly.// If the anchor doesn't have the word "on" in its text, change the background// color to white and the anchor's text accordingly.function clickToggleLink(theAnchorID){	var theAnchor = gE(theAnchorID);	if(theAnchor.innerHTML.indexOf("on") > 0)	{		theAnchor.innerHTML = "Click me to turn me off.";		document.body.style.backgroundColor = "#8F8";	}	else	{		theAnchor.innerHTML = "Click me to turn me on again!!!";		document.body.style.backgroundColor = "#FFF";	}}// Provides a shortcut for the often heavily used getElementById method.function gE(id){ return document.getElementById(id); }
