<!-- // Begin hiding from old browsers
// LOGIN
function login() {
	if (isEmpty(document.frmMemberLogin.email.value)){
		alert("Please enter your email address.")
		document.frmMemberLogin.email.focus();
	}

	else if (isEmpty(document.frmMemberLogin.password.value)){
		alert("Please enter your password.")
		document.frmMemberLogin.password.focus();
	}
	else
	{
	document.frmMemberLogin.submit();
	}
}


// SHOW AND HIDE DIVS
function changeClass(ShowID, showClass, hideID, hideClass, fieldValue) 
	{
	
		if(fieldValue)
		{
			identityShow=document.getElementById(ShowID);
			identityShow.className=showClass; 
		}
		else 
		{ 
			identityHide=document.getElementById(hideID);
			identityHide.className=hideClass;
		}
	
	}

function showContactInfo (intCommunityID) {
	changeClassShow('divCommunity' + intCommunityID);
	LoadIFrame(intCommunityID);
}

function LoadIFrame(CommunityID){	
	var strIFrameID = "miniDetail" + CommunityID
	var strPageToLoad = "/inc/design/miniDetail.asp?CID=" + CommunityID	
	frames[strIFrameID].location.href = strPageToLoad	
}

function LogAddressView(CommunityID){	
	var strIFrameID = "miniDetail" + CommunityID	
	frames[strIFrameID].document.frmLog.submit();	
}

function changeClassShow(ShowID) 
	{
		identityShow=document.getElementById(ShowID);
		identityShow.className='show'; 
	}
	
function changeClassHide(HideID) 
	{
		identityShow=document.getElementById(HideID);
		identityShow.className='hide'; 
	}


	
// NAME SEARCH FUNCTIONS
function searchDirectory() {
	var cName;
	cName = document.frmCommunitySearchName.strCommunitySearchName.value;

	if (isEmpty(document.frmCommunitySearchName.strCommunitySearchName.value)) {
		alert("Please enter a Community Name to search for.")
		document.frmCommunitySearchName.strCommunitySearchName.focus();
	}
	else if(cName.length < 3){
		alert("The length of Community Name may not be less than 3 characters.")
		document.frmCommunitySearchName.strCommunitySearchName.focus();
	}
	else
	{
	document.frmCommunitySearchName.submit();
	}
}

// CITY STATE ZIP SEARCH FUNCTIONS
function loadCities(object) {
	document.frmLoadCities.strStateCode.value = object.options[object.selectedIndex].value
	document.frmLoadCities.submit();
}

function filterSearch() {
	document.frmCommunitySearchFilter.submit();
}

function NewSearch(actionType) {
	document.frmCommunitySearchNew.submit();
}

function search() {
	var isValidSearch;
	isValidSearch = ValidSearch();

	if (isValidSearch == true){
		document.frmCommunitySearch.submit();
		}
}


function ValidSearch(){
	if ((isEmpty(document.frmCommunitySearch.strStateCode.value)) && (isEmpty(document.frmCommunitySearch.strZipCode.value)) ) {
		alert("Please select a location option  \n\nBy State and City -OR- \nBy Zip Code.")
		return false;
	}

	if ( (document.frmCommunitySearch.strStateCode.value != "") && (isEmpty(document.frmCommunitySearch.strCity.value)) && (isEmpty(document.frmCommunitySearch.strZipCode.value))  ) {
		alert("Please select a City.")
		return false;
	}



	if (IsNumeric(document.frmCommunitySearch.strZipCode.value) == false && document.frmCommunitySearch.strZipCode.value != "")
	{
	alert("The Zip Code contains invalid characters.")
	document.frmCommunitySearch.strZipCode.focus();
	return false;
	}

	var intCtr=0
	if (!(isEmpty(document.frmCommunitySearch.strStateCode.value))){
		intCtr+=1
	}
	if (!(isEmpty(document.frmCommunitySearch.strZipCode.value))){
		intCtr+=1
	}

	if (intCtr > 1) {
		//search by zip code if zip AND state where searched.
		document.frmCommunitySearch.strStateCode.value = ""
		document.frmCommunitySearch.strCity.value = ""
	}
	return true;
}

function filterlist(selectobj) {

  // VARIABLES

  // HTML SELECT object
  this.selectobj = selectobj;

  // Flags for regexp matching.
  // "i" = ignore case; "" = do not ignore case
  this.flags = "i";

  // Make a copy of the options array
  this.optionscopy = new Array();
  for (var i=0; i < selectobj.options.length; i++) {
    this.optionscopy[i] = new Option();
    this.optionscopy[i].text = selectobj.options[i].text;
    this.optionscopy[i].value = selectobj.options[i].value;
  }

  //==================================================
  // METHODS
  //==================================================

  //--------------------------------------------------
  this.reset = function() {
  // This method resets the select list to the original state.
  // It also unselects all of the options.

    this.set("");
  }

  //--------------------------------------------------
  this.set = function(pattern) {
  // This method removes all of the options from the select list,
  // then adds only the options that match the pattern regexp.
  // It also unselects all of the options.
  // In case of a regexp error, returns false

    var loop=0, index=0, regexp, e;

    // Clear the select list so nothing is displayed
    this.selectobj.options.length = 0;

    // Set up the regular expression
    try {
      regexp = new RegExp(pattern, this.flags);
    } catch(e) {
      return;
    }

    // Loop through the entire select list
    for (loop=0; loop < this.optionscopy.length; loop++) {

      // Check if we have a match
      if (regexp.test(this.optionscopy[loop].text)) {

        // We have a match, so add this option to the select list
        this.selectobj.options.length = index + 1;
        this.selectobj.options[index].text = this.optionscopy[loop].text;
        this.selectobj.options[index].value = this.optionscopy[loop].value;
        this.selectobj.options[index].selected = false;

        // Increment the index
        index++;
      }
    }
  }

  //--------------------------------------------------
  this.set_ignore_case = function(value) {
  // This method sets the regexp flags.
  // If value is true, sets the flags to "i".
  // If value is false, sets the flags to "".

    if (value) {
      this.flags = "i";
    } else {
      this.flags = "";
    }
  }

}


// END SEARCH
//-----------------------------------------------------------------------------


// BASIC FORM VALIDATION FUNCTIONS

function isEmpty(s){
	return ((s == null) || (s.length == 0) || s == '00')
}

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++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
         blnResult = false;
         }
      }
   return blnResult;
}

//so textareas can have a maxlength attribute
function ismaxlength(obj){
	var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
	if (obj.getAttribute && obj.value.length>mlength)
	obj.value=obj.value.substring(0,mlength)
} 



// load whitespace characters: space,\n:manual line feed,\t:tab, and \r:carriage return
var whitespace = " \t\n\r";

function hasWhitespace(strString)
{   var i;
    // Search through string's characters one by one
    // until we find a whitespace character.
    // When we do, return true; if we don't, return false
    for (i = 0; i < strString.length; i++)
    {   
        // Check that current character isn't whitespace.
        var c = strString.charAt(i);
        if (whitespace.indexOf(c) != -1) return true;
    }
    // All characters are whitespace.
    return false;
}

// END VALIDATION
//-----------------------------------------------------------------------------


// ROLLOVER FUNCTIONS
//-----------------------------------------------------------------------------
loaded = 0;
function loadImages() {
	if (document.images) {

// Get Started Button
	getStarted_on = new Image();
	getStarted_on.src = "/img/getStartedOn.gif";
	getStarted_off = new Image();
	getStarted_off.src = "/img/getStartedOff.gif";

// Go Button
	goBtn_on = new Image();
	goBtn_on.src = "/img/goButtonOn.gif";
	goBtn_off = new Image();
	goBtn_off.src = "/img/goButtonOff.gif";

// CallOut Button
	regBtn_on = new Image();
	regBtn_on.src = "/img/CallOutRegBtnOn.gif";
	regBtn_off = new Image();
	regBtn_off.src = "/img/CallOutRegBtnOff.gif";

// Resource Button
	RR_on = new Image();
	RR_on.src = "/img/homeResourcesRROn.gif";
	RR_off = new Image();
	RR_off.src = "/img/homeResourcesRROff.gif";
	RL_on = new Image();
	RL_on.src = "/img/homeResourcesRLOn.gif";
	RL_off = new Image();
	RL_off.src = "/img/homeResourcesRLOff.gif";
	AG_on = new Image();
	AG_on.src = "/img/homeResourcesAGOn.gif";
	AG_off = new Image();
	AG_off.src = "/img/homeResourcesAGOff.gif";

// Nav Buttons

	loaded = 1;
	}

}


loaded = 0;

function imgFlip(imageName,newsource) {
	if (document.images && loaded==1) {
 		document.images[imageName].src = eval(newsource + ".src");
	}
}

// END ROLLOVERS
//-----------------------------------------------------------------------------

// MENU FUNCTION
//-----------------------------------------------------------------------------
sfHover = function() {
	var sfEls = document.getElementById("dropdownnav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

// END MENU
//-----------------------------------------------------------------------------

// BEGIN FONT SELECTOR FUNCTIONS
//-----------------------------------------------------------------------------
function setFont(fontsize) {
    var font_i, font_a, font_main;
    for (font_i=0; (font_a = document.getElementsByTagName("link")[font_i]); font_i++) {
        if(font_a.getAttribute("rel").indexOf("style") > -1 && font_a.getAttribute("title")) {
            font_a.disabled = true;
            if (font_a.getAttribute("title") == fontsize) {
                font_a.disabled = false;
            }
        }
    }
    document.getElementById('fontIDSmall').className = 'fontSizeSmall';
    document.getElementById('fontIDMedium').className = 'fontSizeMedium';
    document.getElementById('fontIDLarge').className = 'fontSizeLarge';
    document.getElementById('fontIDXLarge').className = 'fontSizeXLarge';
    document.getElementById('fontID'+fontsize).className = 'fontSize'+fontsetting+'_active';

	document.frmFontSize.strFontSize.value = fontsize;
	document.frmFontSize.submit();
}

fontsetting = sessionFont;

fontsmall = "alternate ";
fontmedium = "alternate ";
fontlarge = "alternate ";
fontxlarge = "alternate ";


    if (fontsetting == "Small") {
		fontsmall = "";
		document.write('<link rel="'+fontsmall+'stylesheet" type="text/css" href="/inc/style/fontSmall.css" title="small" media="screen">');
    } else if (fontsetting == "Medium") {
		fontmedium = "";
		document.write('<link rel="'+fontmedium+'stylesheet" type="text/css" href="/inc/style/fontMedium.css" title="medium" media="screen">');
    } else if (fontsetting == "Large") {
		fontlarge = "";
		document.write('<link rel="'+fontlarge+'stylesheet" type="text/css" href="/inc/style/fontLarge.css" title="large" media="screen">');
    } else if (fontsetting == "XLarge") {
		fontxlarge = "";
		document.write('<link rel="'+fontxlarge+'stylesheet" type="text/css" href="/inc/style/fontXLarge.css" title="xlarge" media="screen">');
	} else {
		fontmedium = "";
		document.write('<link rel="'+fontmedium+'stylesheet" type="text/css" href="/inc/style/fontMedium.css" title="medium" media="screen">');
	}



function scaleFont() {
    document.write('<div id="fontScale">');
    document.write('<h6>FONT SIZE</h6>');
    document.write('<div id="#fontScaleLinks">');
    document.write('<ul>');
    document.write('<li id="fontIDSmall" class="fontSizeSmall"><a href="#" onclick="setFont(\'Small\'); return false;"><img src="/img/dotBlank.gif" class="fontScale" alt="Small"/></a></li>');
    document.write('<li id="fontIDMedium" class="fontSizeMedium"><a href="#" onclick="setFont(\'Medium\'); return false;"><img src="/img/dotBlank.gif" class="fontScale" alt="Medium"/></a></li>');
    document.write('<li id="fontIDLarge" class="fontSizeLarge"><a href="#" onclick="setFont(\'Large\'); return false;"><img src="/img/dotBlank.gif" class="fontScale" alt="Large"/></a></li>');
    document.write('<li id="fontIDXLarge" class="fontSizeXLarge"><a href="#" onclick="setFont(\'XLarge\'); return false;"><img src="/img/dotBlank.gif" class="fontScale" alt="Extra Large"/></a></li>');
    document.write('</ul>');
    document.write('</div>');
    document.write('</div>');
    if (fontsetting) {
    document.getElementById('fontID'+fontsetting).className = 'fontSize'+fontsetting+'_active';
    } else {
    document.getElementById('fontIDMedium').className = 'fontSizeMedium_active';
	}
}
// END FONT SELECTOR FUNCTIONS
//-----------------------------------------------------------------------------

// View Pop Up Ad for Personalized Search
function viewAd() {

	var strOptions = "top=125,left=200,height=600,width=400,location=no,status=no,toolbar=no,menubar=no,resizable=no";
	var strURL = "/help/persoanl-search.asp"

	var popUpWin = window.open(strURL, "ad", strOptions, false);
	if(popUpWin.focus != null) popUpWin.focus();
}



function openHTML( pageToLoad, winname, width, height, center) {
		self.name = "winMain";
		xposition=0; yposition=0;
		if ((parseInt(navigator.appVersion) >= 4 ) && (center)){
			xposition = (screen.width - width) / 2;
			yposition = (screen.height - height) / 2;
		}
		args = 'width=' + width + ',height=' + height + ',location=0,menubar=0,resizable=1,';
		args = args + 'scrollbars=1,status=0,titlebar=0,toolbar=0,hotkeys=0,screenx=' + xposition + ',';
		args = args + 'screeny=' + yposition + ',left=' + xposition + ',top=' + yposition;
	
		window.open( pageToLoad,winname,args);
}

// End of hide. -->