function testimonialSubmit() {
    var txt = trim(document.getElementsByName("feedback")[0].value);
    
    if(txt.length == 0 || txt == 'enter text') {
        alert('You didn\'t type a message!');
        return(false);
    }
    else{
    	alert(getElementById("feedback").value);
    	return(false);
    }
    if(txt.length > 500) {
        alert('Please limit your message to 500 characters.');
        return(false);
    }
    alert(txt);
    return(false);
}


function toggleLoginField(theField) {
	if (theField.name == "email") {
		if (theField.value == "Email") {
			theField.value = "";
		}
	} else if (theField.name == "password") {
		if (theField.value == "Password") {
			if (theField.type != "password") {
				//theField.type = "password";
				theField.value = "";
			}
		}
		
	}

}

function choosegift(gameId, name, cost, length, image_name)
{
	doodabs_balance = document.send_gift.doodabs_balance.value;
	doodabs_total = doodabs_balance - cost;

	document.getElementById("preview_box").style.display = "block";	
	document.getElementById("error_box").style.display = "none";	
	
	document.send_gift.gft_id.value = gameId;
	document.getElementById("preview_gift").src = image_name;
	document.getElementById("gift_name").innerHTML = name;
	document.getElementById("gift_cost").innerHTML = cost;
	//document.getElementById("gift_cost2").innerHTML = cost;
	document.getElementById("gift_length").innerHTML = length;

	if(doodabs_total >= 0)
	{
		document.getElementById("gift_total").innerHTML = "You will have <b>" + doodabs_total + "</b>  Doodabs after sending this gift.";
	}
	if(document.send_gift.comment.value != '')
	{
		document.getElementById("send_gift_button").className = "button3";
		document.getElementById("send_gift_button").disabled = false;	
	}
		
	if(doodabs_total < 0)
	{		
		document.getElementById("error_box").style.display = "block";
	}
		
	document.send_gift.comment.focus();
}

function checkMessage()
{	
	if(document.getElementById("gift_cost").innerHTML != '')
	{
		document.getElementById("send_gift_button").className = "button3";
		document.getElementById("send_gift_button").disabled = false;
	}
}

function doClear(theText)
{	
	theText.value = "";
	theText.focus();
}
