function toggleLayer(id)
	{
		var obj = document.getElementById(id);
		if(obj.style.display == 'none')
		{
		obj.style.display='block';
		}
		else
		{
		obj.style.display='none';
		}
	}

 function maxLength(field,maxChars)
 {
       if(field.value.length >= maxChars) {
          event.returnValue=false; 
          alert("Not more than " +maxChars + " chars allowed.");
          return false;
       }
 }  

 function maxLengthPaste(field,maxChars)
 {
       event.returnValue=false;
       if((field.value.length +  window.clipboardData.getData("Text").length) > maxChars) {
         alert("Not more than " +maxChars + " chars allowed.");
         return false;
       }
       event.returnValue=true;
 }	
