    function hide(box){
		document.getElementById(box).style.display="none";
	}
	function show(box){
		document.getElementById(box).style.display="block";
	}
	function get_val(id_input)
	{
		return document.getElementById(id_input).value;
	} 
	 
	function focs(id_foc)
	{
		document.getElementById(id_foc).focus();;
	} 
function updateTextCount(textArea, spanID, maxLength) 
{
	
	var span = document.getElementById(spanID);
	
	if (textArea.value.length > maxLength)
	{
		//span.innerHTML = '<font color="red">' + ((maxLength - textArea.value.length) * -1) + ' characters over</font>';
		textArea.value = textArea.value.substring(0, maxLength);
	}
	else
	{
		span.innerHTML = (maxLength - textArea.value.length) + ' characters remaining';
	}
}

function checkmail(elementValue)
{
	if (elementValue == '')
		return true;
	var emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;
	returnval = emailPattern.test(elementValue); 
	return returnval; 

}	

function check_url(theurl)
  {
     
     var tomatch= /http:\/\/[A-Za-z0-9\.-]{3,}\.[A-Za-z]{3}/
     if (tomatch.test(theurl))
     {
        
         return true;
     }
     else
     {
         
         return false; 
     }
  }
