function Obj(id){
	var obj;
	
	if(document.getElementById){
		obj = document.getElementById(id);
	}
	else if(document.all){
		obj = document.all[id];
	}

	return obj;
}

function Tag(name){
	return document.getElementsByName(name)[0];
}

function GetValue(f1, f2){
	Obj(f1).value = Obj(f2).value;
}

function ShowHide(target){
	if(Obj(target).style.display==""){
		Obj(target).style.display = "none";
	}
	else{
		Obj(target).style.display = "";
	}
}

function Highlight(color, obj){
	obj.style.background = color;
	obj.onmouseout = function(){
		obj.style.background = "";
	}
}

function SelectRadius(obj){
	if(obj.value == "-2"){
		Obj("definedRadius").style.display = "";
	}
	else{
		Obj("definedRadius").style.display = "none";
	}
}

function SelectMaxRecord(obj){
	if(obj.value == "-2"){
		Obj("definedMaxRecord").style.display = "";
	}
	else{
		Obj("definedMaxRecord").style.display = "none";
	}
}

function UseDefaultKeywords(){
	Tag("customZipCode").value = "ZIP Code";
	Tag("customDistance").value = "Search within";
	Tag("customDistanceRange").value = "5\n10\n25\n50\n100\n250";
	Tag("customMiles").value = "Miles";
	Tag("customKilometers").value = "Kilometers";
	Tag("customMaxRecord").value = "Number record display";
	Tag("customMaxRecordRange").value = "5\n10\n25\n50\n100\n250";
	Tag("customGo").value = "Search";
	Tag("customAdvanceSearch").value = "[ Advanced Search ]";
	Tag("customCity").value = "City";
	Tag("customState").value = "State";
	Tag("customBasicSearch").value = "[ Basic Search ]";
	Tag("customSortBy").value = "Sort By";
	Tag("customSortDistance").value = "Distance";
	Tag("customSortName").value = "Name";
	Tag("customSortAddress").value = "Address";
	Tag("customSortCity").value = "City";
	Tag("customSortState").value = "State";
	Tag("customSortCountry").value = "Country";
	Tag("customWebsite").value = "Website";
	Tag("customEmail").value = "Email";
	Tag("customTelNo").value = "Phone";
	Tag("customFaxNo").value = "Fax";
}	