	

	function limitText(limitField, limitCount, limitNum) {
	 	if (limitField.value.length > limitNum) {
			limitField.value = limitField.value.substring(0, limitNum);
		} else {
			limitCount.value = limitNum - limitField.value.length;
		}
	 }
	 
	 function NewWindow(mypage, myname, w, h, scroll) {
	 	 var winl = (screen.width - w) / 2;
	     var wint = (screen.height - h) / 6;
	     winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',toolbars=yes,menubar=yes,resizable';
	     win = window.open(mypage, myname, winprops);
	     if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); };
	 }
	 
	 function showDiv(div_id){
     	if (document.layers) {
     		document.layers[div_id].visibility = "show";  //collapse
            document.layers[div_id].display = "inline";
                
        } else if (document.getElementById) {
        	var obj = document.getElementById(div_id);
        	obj.style.visibility = "visible";   //not collapsed
            obj.style.display = "inline";

        } else if (document.all) {
        	document.all[div_id].style.visibility = "visible";       //not collapsed
            document.all[div_id].style.display = "inline";
       	}
     }
      
     function hideDiv(div_id) {
        if (document.layers) {
            document.layers[div_id].visibility = "hide";
            document.layers[div_id].display = "none";
                  
         } else if (document.getElementById) {
         	var obj = document.getElementById(div_id);
			obj.style.visibility = "hidden";
            obj.style.display = "none";
                
         } else if (document.all) {
			document.all[div_id].style.visibility = "hidden";
            document.all[div_id].style.display = "none";
         }
     }
     
     function updateTextCounter(id){ 
     	span = document.getElementById(id + 'Length');
     	field = document.getElementById(id).value;
     	span.innerHTML = field.length;
     }

	
