//from Google Maps book by Purvis et al. 2006

var PromoControl = function(url){
  this.url_=url;
};


PromoControl.prototype = new GControl(true);

PromoControl.prototype.initialize = function(map) {
	var container = document.createElement("div");
	container.innerHTML = '<img style="cursor:pointer" src="html/ncasi3.gif" border="0" HEIGHT=25 WIDTH=60>';
	container.style.width='60px';
	container.style.height='25px';
	
	url = this.url_;
	
	GEvent.addDomListener(container, "click", function() {
           var win=window.open("http://www.ncasi.org","NCASI","width=640,height=640,left=640,top=10,rezizable=1,toolbar=1,scrollbars=1,location=1,menubar=1,status=1,directories=1");
           win.focus();  
	   //document.location=url;//replaces the map 
      
	});
	
	map.getContainer().appendChild(container);
	
	return container;
};

PromoControl.prototype.getDefaultPosition = function() {
	return new GControlPosition(G_ANCHOR_BOTTOM_LEFT, new GSize(175,0));
};

