function send_shout () {
	if ( document.shoutform.shout.value == '' || document.shoutform.shout.value == 'Enter your message here' ) {
		alert( 'You must enter a message.' );
		return false;
	}
	
	disable_send();
	
	setTimeout( 'enable_send()', 10000 );
	
	return true;
}

function disable_send () {
	document.getElementById('send').style.fontWeight = 'normal';
	document.shoutform.send.disabled = true;
}

function enable_send () {
	document.getElementById('send').style.fontWeight = 'bold';
	document.shoutform.send.disabled = false;
}

function change_color () {
	/*if ( document.shoutform.color.value == 'FFFFFF' || document.shoutform.color.value == '00FF00' || document.shoutform.color.value == '00C0FF' || document.shoutform.color.value == 'FFFF7F' ) {
		document.getElementById('shout').style.background = '#000';
	}
	else {
		document.getElementById('shout').style.background = '#FFF';
	}
	
	if ( document.shoutform.color.value == '' ) {
		document.getElementById('shout').style.color = '#000';
	}*/
	
	document.getElementById('shout').style.color = '#' + document.shoutform.color.value;
}

function onshoutload () {
    try { 
        document.shoutform.shout.value = "";
    } catch (e) {}
}

function smile ( smile ) {
	document.shoutform.shout.value += smile;
}

function refreshmsgs () {
	var curDate = new Date().getTime();
	
	if ( typeof refreshmsgs.lastRefresh == 'undefined' )
	{
		refreshmsgs.lastRefresh = new Date().getTime();
	}
	else if ( curDate - 5000 < refreshmsgs.lastRefresh ) {
		return;
	}
	
	var frame = document.getElementsByName('shoutbox');
	frame = frame[0];
	
	frame.src = 'http://www.shadowdiablo.com/shoutbox.php';
	refreshmsgs.lastRefresh = curDate;
}