function init()
{
	if (document.getElementById)
		var x = document.getElementById('navImages').getElementsByTagName('IMG');
	else if (document.all)
		var x = document.all['navImages'].all.tags('IMG');
	else return;
	var preloads = new Object();
	for (var i=0;i<x.length;i++)
	{
	    
	    if(document.getElementById(x[i].id).src.indexOf("_on") < 0)
	    {
		    preloads['n'+x[i].id] = new Image;
		    preloads['n'+x[i].id].src = '/images/navigation/'+ x[i].id + '.gif';
		    preloads['o'+x[i].id] = new Image;
		    preloads['o'+x[i].id].src = '/images/navigation/'+ x[i].id + "_on.gif";
		    preloads['o'+x[i].id].onerror = function () {alert('error');}
		    x[i].onmouseover = function () {this.src=preloads['o'+this.id].src;}
		    x[i].onmouseout = function () {this.src=preloads['n'+this.id].src;}
		 }
	}
	    
}

function getImage(imageName, imageDescription, imagePath)
{
    var myImage = new Image();
    myImage.src = "/images/" + imagePath + "/fullsize/" + imageName;
    window.setTimeout("loadImage('" + imageName + "', '" + imageDescription + "', '" + imagePath + "')" , 500);
    
    //document.getElementById('defaultImage').height = myImage.height;
    //document.getElementById('defaultImage').width = myImage.width;
}

function loadImage(imageName, imageDescription, imagePath)
{
    //document.getElementById('defaultImage').src = "/images/" + imagePath + "/fullsize/" + imageName
    //document.getElementById('defaultImage').title = imageDescription;
    //document.getElementById('defaultImage').alt = imageDescription;
    document.getElementById('imageArea').style.backgroundImage = "url(/images/" + imagePath + "/fullsize/" + imageName + ")";
   
}

// Call this function when the page has been loaded
function googleInitialize() {
   
    
    var WINDOW_HTML = '<div style=\"width:200px\"><div style=\"float:left;margin:5px;\"><img src=\"../images/googleLogo.gif\" width=\"81\" height=\"44\" alt=\"\" /></div><div style="width:100px;float:right;"><a href="http://maps.google.com/maps?f=q&hl=en&geocode=&q=1940+river+rd.,+cincinnati&sll=37.0625,-95.677068&sspn=34.587666,61.523437&ie=UTF8&ll=39.102491,-84.550889&spn=0.008276,0.01502&z=16&iwloc=addr&om=0" target="_blank" style=\"font-size:11px;font-weight:bold;color:#aaa300\">Need Directions to Lang Photo?  <span style="text-decoration:underline">Get them here</a>.<\/a><\/div></div>';
      if (GBrowserIsCompatible()) {
        var map = new google.maps.Map2(document.getElementById("map"));
	  	var point = new google.maps.LatLng(39.102079, -84.550138);
        map.setCenter(point, 13);

		map.addControl(new google.maps.SmallMapControl());
		map.addControl(new google.maps.MapTypeControl());
	
		// Create our "tiny" marker icon
		var icon = new google.maps.Icon();
		icon.image = "/images/langIcon.png";
		icon.shadow = "/images/langIconShadow.png";
		icon.iconSize = new google.maps.Size(60, 39);
		icon.shadowSize = new google.maps.Size(60, 39);
		icon.iconAnchor = new google.maps.Point(20, 3);
		icon.infoWindowAnchor = new google.maps.Point(5, 1);
		icon.infoShadowAnchor = new google.maps.Point(0, 0);
		
		var marker = new google.maps.Marker(point, icon);
  
 		map.addOverlay(marker);
 		
 		google.maps.Event.addListener(marker, "click", function() {
            marker.openInfoWindowHtml(WINDOW_HTML);
        });
        
        google.maps.Event.addListener(marker, "infowindowclose", function() {
             map.setCenter(point, 14);
        });
        
        
	
	  }
   
/*
    if (GBrowserIsCompatible()) {
      var map = new GMap2(document.getElementById("map"));
      map.addControl(new GSmallMapControl());
      map.setCenter(new GLatLng(37.4328, -122.077), 13);
      var marker = new GMarker(new GLatLng(37.4228, -122.085));
      map.addOverlay(marker);
      GEvent.addListener(marker, "click", function() {
        marker.openInfoWindowHtml(WINDOW_HTML);
      });
      marker.openInfoWindowHtml(WINDOW_HTML);
    }
*/
    
}




