			function thickBoxPopup(){
				//tb_show('Test','pp.html','images/cart.gif');
			}
	//from an onclick event in a link:
function gload(lat,lon,gheight,gwidth){
	if(mapload(lat,lon,gheight,gwidth)){ 
  	//if so, then make the thickbox call:
   	// opens the map_window div into thickbox
    tb_show('quick view map',
  		'#TB_inline?height=400&amp;width=450&amp;inlineId=map_window',true);
	}
}

function mapload(lat,lon,gheight,gwidth) {
	if (GBrowserIsCompatible()) {
 		//this is the construct you need to use to get the map to display correctly:
 		var map = new GMap2(document.getElementById("map_window"),
    	{size: new GSize(gwidth,gheight)});  //this is where the height and width are set.
 		map.removeMapType(G_HYBRID_MAP);
 		map.addMapType(G_PHYSICAL_MAP);
 		var mapControl = new GMapTypeControl();
 		map.addControl(mapControl);
 		map.addControl(new GSmallMapControl());
 		map.setCenter(new GLatLng(lat,lon),16,G_NORMAL_MAP );
 		// Add marker
 		var point = new GLatLng(lat,lon);
 		map.addOverlay(new GMarker(point));
 		return true;
	}
}


 function bar(url){
    wasOpen  = false;
    win = window.open(url);    
    return (typeof(win)=='object')?true:false;
  }
 
 var op=0;
 var st=0;
 
function zavrit(){
  sp=new Date().getTime();
  
  if (sp-st>1000){
      $("#ok1").hide();
      $("#ok2").hide();
    
    op=0;
  }
  
} 
 
 
function okenko(n){
    
  st=new Date().getTime();
  
  $("#ok"+n).show();
  op=1;
  
  return false;
}
 
function init(){ 
 
$('#map_window').hide();
$('#ok1').hide();
$('#ok2').hide();
 
$(document).keypress(function(event){
    $('#ok1').hide();
    $('#ok2').hide();

});
 
}
