function preloadImages()

{

  if(document.images)

  {

    if(!document.imageArray) document.imageArray = new Array();

    var i,j = document.imageArray.length, args = preloadImages.arguments;

    

    for(i=0; i<args.length; i++)

    {

      if (args[i].indexOf("#")!=0)

      {

        document.imageArray[j] = new Image;

        document.imageArray[j++].src = args[i];

      }

    }

  }

}

				var map;

    function loadMap()

				{ 

						map = new GMap(document.getElementById("map"));
                        map.setCenter(new GLatLng(37.4419, -122.1419), 13);
						map.addControl(new GLargeMapControl());

						map.addControl(new GMapTypeControl());

						

						map.setMapType(G_HYBRID_TYPE);

						

						gpoint = new GPoint(-122.16299057006836, 37.44011034967882);

						map.centerAndZoom(gpoint,5);

				}

    //]]>

				function addPoint(id, lat, lon, firstName, lastName, street, city, state, zipCode)

				{

						gpoint = new GPoint(lat , lon );			

    					map.centerAndZoom(gpoint,0);

						marker = new GMarker(gpoint);

						map.addOverlay(marker);  

						html = createInfoHtml(id, firstName, lastName, street, city, state, zipCode);

   						marker.openInfoWindowHtml(html);

						GEvent.addListener(marker, "click", function() {

   						 marker.openInfoWindowHtml(html);

  });



				}				

				

				function createInfoHtml(id, firstName, lastName, street, city, state, zipCode)

				{   

					html = firstName + ' ' + lastName + '<br>';

					html += street  + '<br>' 

					html += city + ', ' + state + ' ' + zipCode;

					return html;

				} 

				

		function makeRequest(url, search, sort) {



        http_request = false;



        if (window.XMLHttpRequest) { // Mozilla, Safari,...

            http_request = new XMLHttpRequest();

            if (http_request.overrideMimeType) {

                http_request.overrideMimeType('text/xml');

                // See note below about this line

            }

        } else if (window.ActiveXObject) { // IE

            try {

                http_request = new ActiveXObject("Msxml2.XMLHTTP");

            } catch (e) {

                try {

                    http_request = new ActiveXObject("Microsoft.XMLHTTP");

                } catch (e) {}

            }

        }



        if (!http_request) {

            alert('Giving up :( Cannot create an XMLHTTP instance');

            return false;

        }

        http_request.onreadystatechange = alertContents;

        http_request.open('GET', url + '?search=' + search, true);

        http_request.send(null);



    }function alertContents() {



        if (http_request.readyState == 4) {

            if (http_request.status == 200) {         

				document.getElementById("lyr1").innerHTML = http_request.responseText;

				dw_scrollObj.loadLayer('wn','lyr1');

            } else {

                alert('There was a problem with the request.');

            }

        }



    }

		function move_in(img_id,img_src) {

	document.getElementById(img_id).background=img_src;

	}



	function move_out(img_id,img_src) {

	document.getElementById(img_id).background=img_src;

	}

		function move_in_color(img_id,img_src) {

		alert(document.getElementById(img_id).style);

	document.getElementById(img_id).style='background:black';

	}



	function move_out_color(img_id,img_src) {

	document.getElementById(img_id).style='background-color:black';

	}
