function map_search()
{
	var error;
	if(document.getElementById("address").value=='' && document.getElementById("zip_code").value=='')
	{
		document.getElementById("add_error").style.display='';
		document.getElementById("zip_error").style.display='';		
		return false;
	}

	if(document.getElementById("address").value=='')
	{
		document.getElementById("add_error").style.display='';
		error = 'yes';
	}
	else
	{
		document.getElementById("add_error").style.display='none';
	}
	if(document.getElementById("zip_code").value=='')
	{
		document.getElementById("zip_error").style.display='';
		error = 'yes';
	}
	else
	{
		if(IsNumeric(document.getElementById("zip_code").value)==false)
		{
			//	alert("sada");
			document.getElementById("zip_error").style.display='none';
			error = 'yes';
		}else{
			document.getElementById("zip_error").style.display='none';
		}
	}
	if(	error != 'yes')
	{
		document.frm_search.submit();
	}
}

function IsNumeric(strString)
   //  check for valid numeric strings	
   {
   var strValidChars = "0123456789.-";
   var strChar;
   var blnResult = true;

   if (strString.length == 0) return false;

   //  test strString consists of valid characters listed above
   for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
         blnResult = false;
         }
      }
   return blnResult;
   }

function popup_window(url,w,h)
 {
  var width=w;
  var height=h;
  var from_top=200;
  var from_left=175;
  var toolbar='no';
  var location='no';
  var directories='no';
  var status='no';
  var menubar='no';
  var scrollbars='yes';
  var resizable='yes';
  var atts='width='+width+'show,height='+height+',top='+from_top+',screenY=';
  atts+= from_top+',left='+from_left+',screenX='+from_left+',toolbar='+toolbar;
  atts+=',location='+location+',directories='+directories+',status='+status;
  atts+=',menubar='+menubar+',scrollbars='+scrollbars+',resizable='+resizable;
  window.open(url,'win_name',atts);
 }

