var zipCodeFieldLabel="Enter Zip Code";

            function isNumeric(strString) {
                // check for valid numeric strings
                var strValidChars = "0123456789";
                var strChar;
                var blnResult = true;
                if (strString.length == 0) return false;
                //  test strString consists of valid characters listed above
                for (i = 0; i < strString.length && blnResult == true; i=i+1) {
                    strChar = strString.charAt(i);
                    if (strValidChars.indexOf(strChar) == -1) {
                        blnResult = false;
                    }
                }
                return blnResult;
            }
            function validateZipCode() {
                var zipval = document.community_search.s_zip.value;

                if(zipval == zipCodeFieldLabel) {
                    document.community_search.s_zip.value = "";
                    return true;
                }


                if(zipval.length>0) {
                    if((isNumeric(zipval) == false) || (zipval.length != 5)){
                        alert("Please enter a valid zip code value!");
                        return false;
                    }
                    else {
                        if(document.community_search.s_radius.value.length>0) {
                            document.community_search.sort.value = "SORT_DISTANCE";
                        }
                        else {
                            alert("Please enter a valid distance value!");
                            return false;
                        }
                    }
                }
            }

            function initZipField(){
                var zipMessage = zipCodeFieldLabel;
                var zip = document.community_search.s_zip;

                var setFocus = function(isFocused){
                    if(isFocused){
                        zip.value='';
                        zip.style.color = 'black';
                        zip.maxLength=5;
                    }else{
                        zip.maxLength=20;
                        zip.style.color = 'gray';
                        zip.value = zipMessage;

                    }
                };
                setFocus(false);

                zip.onfocus=function(){
                    if(zip.value == zipMessage){
                        setFocus(true);
                    }
                }
                zip.onblur=function(){
                    if(zip.value == ''){
                        setFocus(false);
                    }
                }
            };


            l=1;
            function lastPic(){
                if(l==1) l=5; else l--; document.images['parent.frames.length_image'].src="/images/image_home"+l+".jpg";
            }
            function nextPic(){
                if(l==5) l=1; else l++; document.images['rotate_image'].src="/images/image_home"+l+".jpg";
            }

            function MM_findObj(n, d) { //v4.01
                var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
                    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
                if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
                for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
                if(!x && d.getElementById) x=d.getElementById(n); return x;
            }

            function MM_showHideLayers() { //v6.0
                var i,p,v,obj,args=MM_showHideLayers.arguments;
                for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
                    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
                    obj.visibility=v; }
            }

            function MM_goToURL() { //v3.0
                var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
                for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
            }

