/* This script affects the textedit boxes in the form in the left sidebar. When then user clicks into the textedit the initial text will disappear and a different class will be applied to the text. When the user clicks out the reverse happens. THIS SCRIPT NEES CORE.JS TO WORK */


function input_in($element)
{
var uin = document.getElementById($element);

		Core.removeClass(uin, "checker_red");
	
}

function input_keydown($element,$init_value)
{
var uin = document.getElementById($element);

	if (uin.value == $init_value) 
		{
		uin.value = "";
		Core.removeClass(uin, "checker_red");
		Core.addClass(uin, "unsub_infocus");
		}
	
}

function input_out($element,$init_value)
{
var uout = document.getElementById($element);

	if (uout.value == "") 
		{
		uout.value = $init_value;
		Core.removeClass(uout, "unsub_infocus");
		Core.addClass(uout, "unsub_outfocus");
		}
	
}

function input_check($element, $init_value)			/* called from the on_submit() event checks that the input boxes are not equal to initial values or "", 		                                                       if they are higlights in red  */
{

	var checker = document.getElementById($element);
	
	if (checker.value.toLowerCase() != $init_value && checker.value != "")
	{
	return true;
	}
	else
	{
			Core.addClass(checker, "checker_red");
			$init_value = $init_value.toUpperCase();
			checker.value = $init_value;
			checker.focus();
	
	return false;
	}
	
}
