    function taLimit() {
    	var taObj=event.srcElement;
    	if (taObj.value.length==255*1) return false;
    }
    
    function taCount(visCnt) { 
    	var taObj=event.srcElement;
    	if (taObj.value.length>255*1) taObj.value=taObj.value.substring(0,255*1);
    	if (visCnt) visCnt.innerText=255-taObj.value.length;
    }
	
	function ValidPLogin(){
		if (document.frm.p_user.value=="") {
			alert("Please enter calendar username.")
			document.frm.p_user.focus()
		return false }
		if (document.frm.p_pass.value=="") {
			alert("Please enter calendar password.")
			document.frm.p_pass.focus()
		return false }
	}

	function ValidateSearchAdv(){
		if (document.frm.search.value=="") {
			alert("Please enter your search phrase.")
			document.frm.search.focus()
		return false }
	}
	
	function Toggle(obj,imgName){
	    var objId = document.getElementById(obj);
	    var img = document.images[imgName];
	    var plusSrc = "images/plus_tree.gif";
	    var minusSrc = "images/minus_tree.gif";
	    objId.style.display = (objId.style.display == "none")?"":"none"; 
	    img.src = (img.alt == "Collapse")?plusSrc:minusSrc; 
	    img.alt = (img.alt == "Expand")?"Collapse":"Expand";
	}

	function ValidateSuggest(){
		if (document.frm.title.value=="") {
			alert("Please enter event title.")
			document.frm.title.focus()
		return false }
		if (document.frm.yn.value=="") {
			alert("Please enter your name.")
			document.frm.yn.focus()
		return false }
		if (document.frm.ye.value=="") {
			alert("Please enter your email address.")
			document.frm.ye.focus()
		return false }
		if (document.frm.des.value=="") {
			alert("Please enter event description.")
		return false }
	}
	
	function NewWindow(mypage, myname, w, h, scroll) {
		var winl = (screen.width - w) / 2;
		var wint = (screen.height - h) / 2;
		winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll
		win = window.open(mypage, myname, winprops)
		if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
	}
