var placemark=new Array();
    var fname= new Array();
    var hName=new Array();
    var latCo= new Array();
    var lonCo= new Array();
    var descr= new Array();
    var loopCount;
    var map;  
	
	 
	function appTxt(hLoc, hNo)
	{
	 	pageTracker._trackEvent('Hotel Affiliate Programmes', 'Map Area Marker', hLoc);
	        var areaInfo=document.getElementById("map_info");
		var hotelNumber=document.getElementById("hotel_no");	
		var oldNode=areaInfo.firstChild;
		var oldNumber=hotelNumber.firstChild;	
	        var x=document.createTextNode(hLoc);
		var y=document.createTextNode(hNo);
		areaInfo.replaceChild(x, oldNode);
		hotelNumber.replaceChild(y, oldNumber);
		areaInfo.style.fontWeight="bold";
		areaInfo.style.fontSize="x-large";
		areaInfo.style.textAlign="center";
	}
	
	// areaInfo.appendChild(x);  
	function initialize() {
              if (GBrowserIsCompatible()) {
                  map = new GMap2(document.getElementById("map_canvas"));
                  map.setCenter(new GLatLng(54.47573, -3.07770), 9);
                  map.setUIToDefault();
              	  map.disableDragging();
		  map.disableScrollWheelZoom();   		
		  pLab();
               }
         }
		function pLab()
                {
		hName[1]="Ambleside";
		latCo[1]=54.43264;
		lonCo[1]=-2.96316;
		descr[1]='';

		hName[2]="Borrowdale Valley";
		latCo[2]=54.53881 ;
		lonCo[2]=-3.15119;
		descr[2]='';
		
		hName[3]="Coniston";
		latCo[3]=54.36919;
		lonCo[3]=-3.07581;
		descr[3]='';
		
		hName[4]="Eskdale Valley";
		latCo[4]=54.36631;
		lonCo[4]=-3.26036;
		descr[4]='';
		
		hName[5]="Grasmere";
		latCo[5]=54.45938;
		lonCo[5]=-3.02437;
		descr[5]='';
		
		hName[6]="Keswick";
		latCo[6]=54.60056;
		lonCo[6]=-3.13695;
		descr[6]='';
		
		hName[7]="Langdale Valley";
		latCo[7]=54.44905;
		lonCo[7]=-3.07700;
		descr[7]='';
		
		hName[8]="Lake Windermere";
		latCo[8]=54.37003;
		lonCo[8]=-2.93457;
		descr[8]='';
		
		hName[9]="Lake Ullswater";
		latCo[9]=54.56934;
		lonCo[9]=-2.91806;
		descr[9]='';

                hName[10]="Troutbeck";
		latCo[10]=54.42683;
		lonCo[10]=-2.90470;
		descr[10]='';

                hName[11]="Haweswater";
		latCo[11]=54.51751;
		lonCo[11]=-2.79979;
		descr[11]='';
        		
		map_marker();
		}
	    function map_marker()
        {
		
 	        for (loopCount=1; loopCount<=hName.length-1; loopCount ++)
	            {	 
		 
    	         var center = new GLatLng(latCo[loopCount], lonCo[loopCount]);
    	         placemark[loopCount] = new GMarker(center);
		         temp_placemark=placemark[loopCount];
		         temp_name=hName[loopCount];   	 
    	         map.addOverlay(placemark[loopCount]);
	             }
			GEvent.addListener(placemark[1], "mouseover", function(){
			   appTxt("Ambleside", "15 Hotels");
		     });
	        GEvent.addListener(placemark[1], "click", function(){
                       pageTracker._trackEvent('Hotel Affiliate Programmes', 'Map Area Click', 'Ambleside');
	               window.location.href="hotels/ambleside-hotels.html";	   		   
             });
			 
			GEvent.addListener(placemark[2], "mouseover", function(){
			   appTxt("Borrowdale Valley", "5 Hotels");
		     });
	        GEvent.addListener(placemark[2], "click", function(){
                        pageTracker._trackEvent('Hotel Affiliate Programmes', 'Map Area Click', 'Borrowdale'); 
	                window.location.href="hotels/borrowdale-hotels.html";	   		   
             }); 
			 
			GEvent.addListener(placemark[3], "mouseover", function(){
			   appTxt("Coniston", "5 Hotels");
		     });
	        GEvent.addListener(placemark[3], "click", function(){
                       pageTracker._trackEvent('Hotel Affiliate Programmes', 'Map Area Click', 'Coniston');  
	               window.location.href="hotels/coniston-hotels.html";	   		   
             });
			 
			GEvent.addListener(placemark[4], "mouseover", function(){
			   appTxt("Eskdale Valley", "2 Hotels");
		     });
	        GEvent.addListener(placemark[4], "click", function(){
                       pageTracker._trackEvent('Hotel Affiliate Programmes', 'Map Area Click', 'Eskdale');  
                       window.location.href="hotels/eskdale-hotels.html";             
            });
			
			GEvent.addListener(placemark[5], "mouseover", function(){
			   appTxt("Grasmere", "7 Hotels");
		     });
	        GEvent.addListener(placemark[5], "click", function(){
                       pageTracker._trackEvent('Hotel Affiliate Programmes', 'Map Area Click', 'Grasmere'); 
	               window.location.href="hotels/grasmere-hotels.html";	   		   
             });
			 
			GEvent.addListener(placemark[6], "mouseover", function(){
			   appTxt("Keswick", "7 Hotels");
		     });
	        GEvent.addListener(placemark[6], "click", function(){
                       pageTracker._trackEvent('Hotel Affiliate Programmes', 'Map Area Click', 'Keswick');  
	               window.location.href="hotels/keswick-hotels.html";	   		   
             });
			 
		    GEvent.addListener(placemark[7], "mouseover", function(){
			   appTxt("Langdale Valley", "4 Hotels");
		     });
	        GEvent.addListener(placemark[7], "click", function(){
                       pageTracker._trackEvent('Hotel Affiliate Programmes', 'Map Area Click', 'Langdale');  
	               window.location.href="hotels/langdale-hotels.html";	   		   
             });
			 
			GEvent.addListener(placemark[8], "mouseover", function(){
			   appTxt("Lake Windermere", "8 Hotels");
		     });
	        GEvent.addListener(placemark[8], "click", function(){
                       pageTracker._trackEvent('Hotel Affiliate Programmes', 'Map Area Click', 'Windermere');  
	               window.location.href="hotels/windermere-hotels.html";	   		   
             });
			 
			GEvent.addListener(placemark[9], "mouseover", function(){
			   appTxt("Ullswater","5 Hotels");
		     });
	        GEvent.addListener(placemark[9], "click", function(){
                       pageTracker._trackEvent('Hotel Affiliate Programmes', 'Map Area Click', 'Ullswater');  
	               window.location.href="hotels/ullswater-hotels.html";	   		   
             });
             
             GEvent.addListener(placemark[10], "mouseover", function(){
			   appTxt("Troutbeck","2 Hotels");
		     });
	        GEvent.addListener(placemark[10], "click", function(){
                       pageTracker._trackEvent('Hotel Affiliate Programmes', 'Map Area Click', 'Troutbeck');  
	               window.location.href="hotels/troutbeck-hotels.html";	   		   
             });

             GEvent.addListener(placemark[11], "mouseover", function(){
			   appTxt("Haweswater","1 Hotel");
		     });
	        GEvent.addListener(placemark[11], "click", function(){
                       pageTracker._trackEvent('Hotel Affiliate Programmes', 'Map Area Click', 'Haweswater');  
	               window.location.href="hotels/haweswater-hotels.html";	   		   
             });			 
			  
	    }
