<!-- Begin

function blockError(){return true;}
window.onerror = blockError;

function my_select_list (my_list, my_select) {

var items = {"location_id": "location_id", 
						 "name": "name",
						 "address_1": "address_1",
             "address_2": "address_2", 
						 "city": "city",
						 "state": "state/province",
             "postal_code": "postal code", 
						 "phone": "phone",
						 "email": "email",
             "url": "url", 
             "longitude": "longitude", 
             "latitude": "latitude", 
             "active_filter": "active_filter", 
						 "extra_1": "extra_1",
						 "extra_2": "extra_2",
             "extra_3": "extra_3", 
             "extra_4": "extra_4", 
             "IGNORE": "IGNORE"
						 };

listString = "<select name=" + my_list + " size=8 class=dropdown onchange=this.form.my_" + my_list + ".value=this.form." + my_list + ".options[this.selectedIndex].value>";

for (key in items) {
	if (my_select == key) listString += "<option value=" + key + " selected>" + items[key] + "</option>";
	else listString += "<option value=" + key + ">" + items[key] + "</option>";
}
// document.write("For the key " + key     + " element value is " + items[key]);

listString += "</select>"

document.writeln(listString);
}

function my_postal_list (my_list, my_select) {

var items = {"postal_code": "postal_code", 
						 "city": "city",
						 "state": "state",
             "lng": "lng", 
						 "lat": "lat"
						 };
	
listString = "<select name=" + my_list + " size=5 class=dropdown onchange=this.form.my_" + my_list + ".value=this.form." + my_list + ".options[this.selectedIndex].value>";

for (key in items) {
	if (my_select == key) listString += "<option value=" + key + " selected>" + items[key] + "</option>";
	else listString += "<option value=" + key + ">" + items[key] + "</option>";
}
// document.write("For the key " + key     + " element value is " + items[key]);

listString += "</select>"

document.writeln(listString);
}

function check_selected(form) {

var items = {"location_id": "location_id", 
						 "name": "name",
						 "address_1": "address_1",
             "address_2": "address_2", 
						 "city": "city",
						 "state": "state/province",
             "postal_code": "postal code", 
						 "phone": "phone",
						 "email": "email",
             "url": "url", 
             "longitude": "longitude", 
             "latitude": "latitude", 
             "active_filter": "active_filter", 
						 "extra_1": "extra_1",
						 "extra_2": "extra_2",
             "extra_3": "extra_3", 
             "extra_4": "extra_4"
						 };

	k = 0;
	for (key in items) {
		if (form.elements[key].value == 'IGNORE') k++;

		if (form.elements[key].value != 'IGNORE' && k > 0){
			alert("MATRIX ERROR!\n IGNORE found before: \n" + form.elements[key].value);
			return false;
		}
	}
	return true;
}

function my_list (my_list, my_select) {

var items = {"location_id": "location_id", 
						 "name": "name",
						 "address_1": "address_1",
             "address_2": "address_2", 
						 "city": "city",
						 "state": "state/province",
             "postal_code": "postal code", 
						 "phone": "phone",
						 "email": "email",
             "url": "url", 
             "longitude": "longitude", 
             "latitude": "latitude", 
             "active_filter": "active_filter", 
						 "extra_1": "extra_1",
						 "extra_2": "extra_2",
             "extra_3": "extra_3", 
             "extra_4": "extra_4", 
             "IGNORE": "IGNORE"
						 };
	
listString = "<select name=" + my_list + " size=16 class=dropdown>";

for (key in items) {
	if (my_select == key) listString += "<option value=" + key + " selected>" + items[key] + "</option>";
	else listString += "<option value=" + key + ">" + items[key] + "</option>";
}
// document.write("For the key " + key     + " element value is " + items[key]);

listString += "</select>"

document.writeln(listString);
}

function my_postal (my_list, my_select) {

var items = {"postal_code": "postal_code", 
						 "city": "city",
						 "state": "state",
             "lng": "lng", 
						 "lat": "lat"
						 };
	
listString = "<select name=" + my_list + " size=5 class=dropdown>";

for (key in items) {
	if (my_select == key) listString += "<option value=" + key + " selected>" + items[key] + "</option>";
	else listString += "<option value=" + key + ">" + items[key] + "</option>";
}
// document.write("For the key " + key     + " element value is " + items[key]);

listString += "</select>"

document.writeln(listString);
}

function confirm_delete()
{
input_box=confirm("Click OK to DELETE this record");
if (input_box==false) return false ;
}

function openPopup() {
border_color		= "FFFFFF"	// PICTURE OUTLINE COLOR
background_colors	= "292929"	// BACKROUND COLOR OF THE GALLERY POPUP

view_width 		= 650		// GALLERY POPUP WIDTH
view_height 	= 475		// GALLERY POPUP HEIGHT

scrollbarS 		= "0"		// TURN ON POPUP SCROLLBARS "1" FOR ON "0" FOR OFF

var look='toolbar=0,scrollbars=' + scrollbarS + ',location=0,statusbar=0,menubar=0,resizable=1,width='+view_width+',height='+view_height+','
	window.open('coordinates.php', 'coordinates', look);
}

function set_marker(marker) {
	document['default_icon'].src = "js_css/markers/" + marker;
	document.map_prefs.selected_marker.value = marker;
}

function set_origin(marker) {
	document['user_origin'].src = "js_css/markers/" + marker;
	document.map_prefs.selected_origin.value = marker;
}

 	function show_hide(el) {
		if(el == 'origin_selections') 
		document.getElementById('marker_selections').style.visibility = "hidden";
		else 	
		document.getElementById('origin_selections').style.visibility = "hidden";
			
		document.getElementById(el).style.visibility = "visible";	
//		alert(obj.style.visibility);
 	}

function HideContent(d) {
document.getElementById(d).style.display = "none";
}
function ShowContent(d) {
document.getElementById(d).style.display = "block";
setTimeout("", 5000 );
}