// JavaScript Document
	// check validation for newsletter
$(document).ready(function() {
	// validate signup form on keyup and submit
	$("#signup-newsletter").validate();
});
function resetImage(cityid) {
	if (confirm('Are you sure?')) top.location.href= '?reset=yes&cityid='+cityid;
}
function change_field (inputid,formid) {
	var form_id = document.getElementById(formid);
	if ((inputid.value != "0") && (form_id) ) {
		form_id.action = "?";
		form_id.submit();		
	}
}
function send_photo(barid) {window.open('/public_upload.asp?id='+barid,'photo','width=600,height=400,scrollbars=yes');}	
function bookmark(){
	bookmarkurl=top.location.href;	bookmarktitle=document.title;
	if (document.all)  { window.external.AddFavorite(bookmarkurl,bookmarktitle); }	return false;
}
var map = null; var geocoder = null;
function showAddress(address,nomarker) {		 
	if (GBrowserIsCompatible()) {
		map = new GMap2(document.getElementById("map"));
		geocoder = new GClientGeocoder();
	}
  if (geocoder) {
	geocoder.getLatLng(
	  address,
	  function(point) {
		if (!point) {document.getElementById("map").innerText = "No map";} 
		else {
			if (!nomarker) {
				map.setCenter(point, 15);
			}
			else {
				map.setCenter(point, 12);
			}
			map.addControl(new GSmallMapControl());    			
			if (!nomarker) var marker = new GMarker(point);
			map.addOverlay(marker);
		}
	  }
	);
  }
}

  