// JavaScript functions for West Coast Poppin (c) 2008 WestCoastPoppin.com

// This function handles what happens when a user clicks into a textbox for a login username
function usernameClick(obj)
{
	// obj = the textbox the customer clicked into
	
	// Make sure we have a valid parameter: obj
	if(!obj || !obj.value || obj.value.length == 0)
	{
		return;
	}
	
	// Check the value against the default value
	if(obj.value == "username")
	{
		// Clear out the textbox if this is the default value
		obj.value = "";
		obj.style.color = "#000";
	}
}

// This function handles what happens when a user clicks out of a textbox for a login username
function usernameBlur(obj)
{
	// obj = the textbox the customer clicked out of

	// Make sure we have a valid parameter: obj
	if(!obj || !obj.value || obj.value.length > 0)
	{
		return;
	}
	
	// Reset the textbox value to the default
	obj.value = "username";
	obj.style.color = "#bbb";
}

// This function gets an element on the page based on the id
function getElement(id)
{
    if (document.getElementById)
        var returnVar = document.getElementById(id);
    else if (document.all)
        var returnVar = document.all[id];
    else if (document.layers)
        var returnVar = document.layers[id];
    return returnVar;
}