var Tacoda_AMS_DDC_snippet_version = "1.2";
var Tacoda_AMS_DDC_clist = new Array("TID","RMID","mdwuser");
var Tacoda_AMS_DDC_clist_notset = null;
var Tacoda_AMS_DDC_keys = new Array();
var Tacoda_AMS_DDC_values = new Array();
var Tacoda_AMS_DDC_vars_num = 0;
function Tacoda_AMS_DDC_getCookie(name) {
var cname = name + "=";
var dc = document.cookie;
if (dc.length > 0) {
for(var begin = dc.indexOf(cname); begin != -1; begin = dc.indexOf(cname, begin)) {
if((begin != 0) && (dc.charAt(begin - 1) != ' ')) {
begin++;
continue;
}
begin += cname.length;
var end = dc.indexOf(";", begin);
if (end == -1)
end = dc.length;
return unescape(dc.substring(begin, end));
}
}
return Tacoda_AMS_DDC_clist_notset;
}
function Tacoda_AMS_DDC_addPair(key, value) {
Tacoda_AMS_DDC_keys[Tacoda_AMS_DDC_vars_num] = key;
Tacoda_AMS_DDC_values[Tacoda_AMS_DDC_vars_num] = value;
Tacoda_AMS_DDC_vars_num++;
}
function Tacoda_AMS_DDC_collect_vars() {
var Tacoda_AMS_DDC_vars_as_string = "";
for(var i = 0; i < Tacoda_AMS_DDC_vars_num; i++) {
Tacoda_AMS_DDC_vars_as_string += "&var_" + escape( Tacoda_AMS_DDC_keys[i] ) + "=" + escape( Tacoda_AMS_DDC_values[i] ) ;
}
return Tacoda_AMS_DDC_vars_as_string;
}
function Tacoda_AMS_DDC(Tacoda_AMS_DDC_img_url, Tacoda_AMS_DDC_js) {
Tacoda_AMS_DDC_js = parseFloat(Tacoda_AMS_DDC_js);
Tacoda_AMS_DDC_args = "?" + Math.random() + "&snippet_version=" + Tacoda_AMS_DDC_snippet_version + "&referrer=" + escape(document.referrer) + "&page=" + escape(window.location.href);
Tacoda_AMS_DDC_args += "&timezone=" + (new Date()).getTimezoneOffset();
for(var i = 0; i < Tacoda_AMS_DDC_clist.length; i++) {
var clist_name = Tacoda_AMS_DDC_clist[i];
var clist_value = Tacoda_AMS_DDC_getCookie(clist_name);
if(clist_value != null) {
Tacoda_AMS_DDC_args += "&clist_" + escape(clist_name) + "=" + escape(clist_value);
}
}
Tacoda_AMS_DDC_args += Tacoda_AMS_DDC_collect_vars();
var Tacoda_AMS_DDC_fake_image = new Image();
Tacoda_AMS_DDC_fake_image.src = Tacoda_AMS_DDC_img_url + Tacoda_AMS_DDC_args;
}


//<!-- Search Selector -- Randall D. Ryan 1999
function processSearch()
{
      formObj = document.searchform;
// Capture the Data Entered in Text Field
      myQuery = formObj.search.value;
      myMaxHits = "4";
//      SearchEngines = document.searchform.location.value;
  SearchEngines = "&search=" + myQuery + "&maxhits=" + myMaxHits + "&location=Yahoo&location=Excite&location=AltaVista"
// Make Sure They Entered a search to Search For
      if (myQuery == "") {
         alert ("Please enter a search value first!");
         formObj.search.focus();
      } else {
// Determine Which Radio Button Was Selected
         for (count=0;count<4;count++) {
            if (formObj.rsearch[count].checked) {
                Selected = count;
            }
         }
// Perform Action Based on What Was Selected
         if (Selected == "1") {
             myQuery = 'http://morriscomm.com/cgi-bin/search.pl?HTTP_REFERER=http://www.onlineathens.com/'+SearchEngines;
             location.href=(myQuery);
         }
         else if (Selected == "0") {
             myQuery ='http://onlineathens.com/cgi-bin/search/cqcgi/@ath_stories.env?CQ_LOGIN=&CQ_DTF_SIMPLE_RESULTS=YES&CQ_USER_NAME=guest&CQ_PASSWORD=guest&CQ_DO_QUERY=YES&CQ_CUR_LIBRARY=ath_stories&CQ_QUERY_TYPE=smart&CQ_EXPANSION_LEVEL=3&CQ_MAX_WILDCARD=1000&CQ_MAX_FUZZY_SPELLING=50&CQ_MAX_DOCS=50&CQ_DOC_MARKUP_STYLE=7&CQ_QUERY_STRING='+myQuery;
             location.href=(myQuery);
         }
         else if (Selected == "2") {
             myQuery ='http://www.switchboard.com/bin/cgidir.dll?MEM=1&FUNC=FORMATSEARCH&T=athens&s=GA&L='+myQuery+'&C='+myQuery;             location.href=(myQuery);
         }
         else if (Selected == "3") {
             myQuery ='http://classifieds.onlineathens.com/classifieds-bin/classifieds?temp_type=detail&misc=1&classification=classifieds&SEARCH_LOGIC=AND&MAXREC=20&date=today&property=ATHENS+GA&KEYWORDS='+myQuery;
             location.href=(myQuery);
         }
      }
      return false;
}
// end hiding -->

// drop-down menu <select onChange="MM_jumpMenu('parent',this,0)">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

// clear form box <input onBlur="alterNate(this)" onFocus="alterNate(this)">
function alterNate(elm){
	if (!elm.base) elm.base = elm.value
	if (elm.value == elm.base) elm.value = "";
	else if (elm.value == "") elm.value = elm.base;
}

					Months = new Array(); Months[0]="January"; Months[1]="February"; Months[2]="March"; Months[3]="April"; Months[4]="May"; Months[5]="June"; Months[6]="July"; Months[7]="August"; Months[8]="September"; Months[9]="October"; Months[10]="November"; Months[11]="December";
					var timeVal=new Date();
					var day=timeVal.getDate();
					var mo=timeVal.getMonth();
					var year=timeVal.getYear();
					var showMonth=Months[timeVal.getMonth()];
					var thedate = (" "+showMonth+" "+day+" ");
					function showDate(){
					var timeValue = thedate+" ";
					document.write(timeValue);
					}
//-->

// advance from one form field date to the next
var currentField, nextField; 
function advance(c,n) { 
    currentField = c, nextField = n;
    document.myForm['year'].focus();
    setTimeout('effect()',100);
}

function effect() {
    if (currentField.value.length == 2)
        document.myForm[nextField].focus();
    else currentField.focus();
}

