//BEGIN footer JAVASCRIPT INCLUDE
var curFSearchType = 'fTravel';

function searchFType(obj,searchType){
    if(curFSearchType != obj.id){
        if(obj.id == 'fTravel'){
	    document.getElementById('hidefinvtype').innerHTML="";
	    document.searchForm2F.target = "_self"; //travel tab opens in the same window
            document.searchForm2F.action = searchType;
        }
	else if(obj.id == 'fWeb'){
	    document.searchForm2F.target = "_blank"; //all other tabs open in a new window
            document.getElementById('hidefinvtype').innerHTML="<input type='hidden' name='invocationType' value='hdtravel' />";
	    document.searchForm2F.action = 'http://search.aol.com/aol/'+searchType ;
	}
	else if(obj.id == 'fLocal'){
	    document.searchForm2F.target = "_blank"; //all other tabs open in a new window
            document.getElementById('hidefinvtype').innerHTML="";
	    document.searchForm2F.action = 'http://local.aol.com/aol/'+searchType ;
	}	
	else{
	    document.getElementById('hidefinvtype').innerHTML="";
	    document.searchForm2F.target = "_blank"; //all other tabs open in a new window
            document.searchForm2F.action = 'http://search.aol.com/aolcom/'+searchType;
        }
        obj.className="srchType tab_sel";
        document.getElementById(curFSearchType).className = "srchType tab_clr";
        curFSearchType = obj.id;
    }
}

if (staticDomain === undefined) {
    var staticDomain = "";
}

function saveInput(obj){

}

function fmenu(obj,eve,e)
{
    //if the browser is IE <6.0
    if(document.all){
        for(i=0;i<obj.childNodes.length;i++){
            child = obj.childNodes[i]
            if(child.tagName == 'UL'){
                if(e == 1){
                    child.className="drop"
                    for(j=0;j<obj.childNodes.length;j++){
                        grandchild = child.childNodes[j]
                        if(grandchild.tagName == 'IFRAME'){
                            grandchild.style.height = (child.offsetHeight)-4+'px';
                            grandchild.style.width  = (child.offsetWidth)-4+'px';
                            return;
                        }
                    }
                }
                else if(e == 2){
                child.className="hide"
                return;
                }
            }
            else if(child.tagName == 'A'){
                if(e == 1){
                         child.style.cssText="background-color:#606F94;color:#FFF;"
                }
                else if(e == 2){
                         child.style.cssText="background-color:#FFF;color:#606F94;"
                }
            }
        }
    }
}

function moreFOption(name){
	document.getElementById('moreFOptions').className = name;
}

function validateFQuery(frm){
    if(typeof frm == 'undefined')frm='';
    var val = document.searchForm2F.query.value;
    if(val == ''){
		if(curFSearchType == 'fWeb'){
			//window.location.href = 'http://search.aol.com/';	
			window.open("http://search.aol.com/aol/webhome");
			return;
		} 
		else if(curFSearchType == 'fImages'){
			window.open("http://search.aol.com/aol/imagehome");
			return;
		}
		else if(curFSearchType == 'fVideo'){
			window.open("http://video.aol.com/video-search/query/");
			return;
		}
		else if(curFSearchType == 'fNews'){
			window.open("http://search.aol.com/aol/newshome");
			return;
		}
		else if(curFSearchType == 'fLocal'){
			window.open("http://local.aol.com/aol/localhome");
			return;
		}
		else {
			return;
		} 
        if(frm == 'submit'){
            return;
        } 
        return false;
    }
    else{
        document.searchForm2F.submit();
        //return true;
    }
}

/*function srchFSub(ref){
  var queryval = document.searchForm2F.query.value.trim();
  if(queryval == 'Search Here'){
    queryval = '';
  }
  queryval = queryval.replace( /\+/, " ");
  newurl = ref.href + queryval;
  window.location = newurl;
  return false;

}*/
//BEGIN HEADER JAVASCRIPT INCLUDE


