var markers = new Array(); function initialize( longitude, latitude, doc, zoom ) { var latlng = new google.maps.LatLng(latitude, longitude); var myOptions = { zoom: zoom, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(doc, myOptions); return map; } function addpoint( longitude, latitude, flag, title, map, productId, url, location) { var point = new google.maps.LatLng( latitude,longitude); var markerLatlng = new google.maps.LatLng(latitude,longitude); var marker = new google.maps.Marker({ icon: flag, flat: true, position: markerLatlng, map: map, title:title }); markers[markers.length] = marker; new google.maps.event.addListener(marker, "click", function() { if( url != "" ) parent.location.href = url; else if( location != "" ){ jQuery("#" + location).load('/a4u-ecommerce/control/productSummaryPart/~productId='+productId, function() { initXsellBinding(); }) } else jQuery("#Name" + productId).autoscroll(); }); } function clearMarkers() { for(var i=0; i