function V(y,x,z,d){
	var p=new VELatLong(y,x);
	if (z==undefined || !z) p.z=null; else p.z=z; 
	p.dist=(d==undefined)?null:d;
	return(p);
}

function nice(n,eng){ return Math.round(n*eng)/eng; }
function zoomOff(){
	if (document.forms[0].key){
		document.forms[0].key.value+='.'+z;
	}
}
function dis(y1,x1,y2,x2){
	var R=3961,P=Math.PI/180;
	var lat1=y1*P, lon1=x1*P, lat2=y2*P, lon2=x2*P, dlat=lat2-lat1, dlon=lon2-lon1;
	var a=Math.pow(Math.sin(dlat/2),2) + Math.cos(lat1)*Math.cos(lat2)*Math.pow(Math.sin(dlon/2),2);
	var c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a)); // circle distance in radians
	var d=c*R; // circle distance (mean radius of the earch ,miles, at 39 degrees)
	return Math.round(d*1000+1)/1000;	// tiny roud up due to shorter distance when drawing strait lines
}

