window.onresize = Resize; 
                  
var map = null;


	function GetMapFirst()
	{
	
	 var SOL = new VELatLong(55.000, -1.6350);
	 var SOLSCALE = 11;
	 
	   map = new VEMap('myMap');
	   
	var CivicCentre = new VELatLong(54.9788, -1.611100);
	//var ArchbishopRuncie = new VELatLong(55.010144, -1.615225);	
	//var ArchibaldFirstSchool = new VELatLong(55.007182, -1.624838);	
	//var BroadwayEastFirst = new VELatLong(55.017877, -1.616903);
	//var BroadwoodPrimary = new VELatLong(54.980383, -1.695039);
	//var BruntonFirst = new VELatLong(55.030177, -1.642583);
	//var DinningtonFirst = new VELatLong(55.053316, -1.671319);
	//var GosforthParkFirst = new VELatLong(55.017511, -1.617485);
	//var GrangeFirst = new VELatLong(55.013285, -1.628221);	
	//var RegentFarmFirst = new VELatLong(55.013195, -1.637198);
	//var SouthGosforthFirst = new VELatLong(55.001983, -1.609034);
	
	   map.SetDashboardSize(VEDashboardSize.Normal);
	   map.LoadMap(SOL, SOLSCALE, VEMapStyle.Road, false, VEMapMode.Mode2D, false, 1);
	Resize();

	var Civic = new VEShape(VEShapeType.Pushpin, CivicCentre);
	Civic.SetCustomIcon("/2010/if/mapicon_civic-trans.png");
	Civic.SetTitle("Civic Centre");
	CivicWebPage = "http://www.theciviccentre.co.uk";
	CivicAddress = "Barras Bridge, Newcastle upon Tyne, UK, NE99 1RD";
	Civic.SetDescription('<p>'+CivicAddress+'<br><a href="'+CivicWebPage+'" target="_top" class="map_link">Open Civic Centre Page</a>');	
	map.AddShape(Civic);

/*
	var ArchibaldFirst = new VEShape(VEShapeType.Pushpin, ArchibaldFirstSchool);
	ArchibaldFirst.SetCustomIcon("/schoolmaps/js/schoolsmap/mapicon_sch.gif");
	ArchibaldFirstPhoto = "";
	ArchibaldFirst.SetTitle("Archibald First School");
	ArchibaldFirstWebPage = "http://www.newcastle.gov.uk/core.nsf/a/archibaldfirstschool";
	ArchibaldFirstAddress = "Archibald Street, Newcastle Upon Tyne, NE3 1EB";
	ArchibaldFirst.SetDescription('<p>'+ArchibaldFirstAddress+'<br><a href="'+ArchibaldFirstWebPage+'" target="_top">Open School Page</a>');
	//ArchibaldFirst.SetDescription('<p><img width="200" src="'+ArchibaldFirstPhoto+'"><br>'+ArchibaldFirstAddress+'<br><a href="'+ArchibaldFirstWebPage+'" target="_top">Open School Page</a>');	
	map.AddShape(ArchibaldFirst);

	var BroadwayEast = new VEShape(VEShapeType.Pushpin, BroadwayEastFirst);
	BroadwayEast.SetCustomIcon("/schoolmaps/js/schoolsmap/mapicon_sch.gif");
	BroadwayEast.SetTitle("Broadway East First School");
	BroadwayEastPhoto = "";
	BroadwayEastWebPage = "http://www.newcastle.gov.uk/core.nsf/a/broadwayeastfirstschool";
	BroadwayEastAddress = "Broadway East, Gosforth, Newcastle Upon Tyne, NE3 5JQ";
	BroadwayEast.SetDescription('<p>'+BroadwayEastAddress+'<br><a href="'+BroadwayEastWebPage+'" target="_top">Open School Page</a>');
	//BroadwayEast.SetDescription('<p><img width="200" src="'+BroadwayEastPhoto+'"><br>'+BroadwayEastAddress+'<br><a href="'+BroadwayEastWebPage+'" target="_top">Open School Page</a>');
	map.AddShape(BroadwayEast);

	var Broadwood = new VEShape(VEShapeType.Pushpin, BroadwoodPrimary);
	Broadwood.SetCustomIcon("/schoolmaps/js/schoolsmap/mapicon_sch.gif");
	Broadwood.SetTitle("Broadwood Primary School");
	BroadwoodPhoto = "";
	BroadwoodTel = "0191 274 1684";
	BroadwoodWebPage = "http://www.newcastle.gov.uk/core.nsf/a/broadwoodprimaryschool";
	BroadwoodAddress = "Broadwood Road, Scotswood, Newcastle Upon Tyne, NE15 7TB";
	Broadwood.SetDescription('<p>'+BroadwoodAddress+'<br>Tel No. - '+BroadwoodTel+'<br><br><a href="'+BroadwoodWebPage+'" target="_top">Open School Page</a>');
	//Broadwood.SetDescription('<p><img width="200" src="'+BroadwoodPhoto+'"><br>'+BroadwoodAddress+'<br>Tel No. - '+BroadwoodTel+'<br><br><a href="'+BroadwoodWebPage+'" target="_top">Open School Page</a>');
	map.AddShape(Broadwood);

	var Brunton = new VEShape(VEShapeType.Pushpin, BruntonFirst);
	Brunton.SetCustomIcon("/schoolmaps/js/schoolsmap/mapicon_sch.gif");
	Brunton.SetTitle("Brunton First School");
	BruntonPhoto = "";
	BruntonTel = "0191 226 8659";
	BruntonWebPage = "http://www.newcastle.gov.uk/core.nsf/a/brunton";
	BruntonAddress = "Roseden Way, Newcastle Great Park, Newcastle upon Tyne, NE13 9BD";
	Brunton.SetDescription('<p>'+BruntonAddress+'<br>Tel No. - '+BruntonTel+'<br><br><a href="'+BruntonWebPage+'" target="_top">Open School Page</a>');
	//Broadwood.SetDescription('<p><img width="200" src="'+BroadwoodPhoto+'"><br>'+BroadwoodAddress+'<br>Tel No. - '+BroadwoodTel+'<br><br><a href="'+BroadwoodWebPage+'" target="_top">Open School Page</a>');
	map.AddShape(Brunton);

	var Dinnington = new VEShape(VEShapeType.Pushpin, DinningtonFirst);
	Dinnington.SetCustomIcon("/schoolmaps/js/schoolsmap/mapicon_sch.gif");
	Dinnington.SetTitle("Dinnington First School");
	DinningtonPhoto = "";
	DinningtonAddress = "Sycamore Avenue, Dinnington, Newcastle Upon Tyne, NE13 7JY";
	DinningtonWebPage = "http://www.newcastle.gov.uk/core.nsf/a/dinningtonfirstschool";
	Dinnington.SetDescription('<p>'+DinningtonAddress+'<br><a href="'+DinningtonWebPage+'" target="_top">Open School Page</a>');
	//Dinnington.SetDescription('<p><img width="200" src="'+DinningtonPhoto+'"><br>'+DinningtonAddress+'<br><a href="'+DinningtonWebPage+'" target="_top">Open School Page</a>');
	map.AddShape(Dinnington);

	var GosforthPark = new VEShape(VEShapeType.Pushpin, GosforthParkFirst);
	GosforthPark.SetCustomIcon("/schoolmaps/js/schoolsmap/mapicon_sch.gif");
	GosforthPark.SetTitle("Gosforth Park First School");
	GosforthParkPhoto = "";
	GosforthParkAddress = "Broadway East, Gosforth, Newcastle Upon Tyne, NE3 5JQ";
	GosforthParkWebPage = "http://www.newcastle.gov.uk/core.nsf/a/gosforthparkfirstschool";
	GosforthPark.SetDescription('<p>'+GosforthParkAddress+'<br><a href="'+GosforthParkWebPage+'" target="_top">Open School Page</a>');
	//GosforthPark.SetDescription('<p><img width="200" src="'+GosforthParkPhoto+'"><br>'+GosforthParkAddress+'<br><a href="'+GosforthParkWebPage+'" target="_top">Open School Page</a>');
	map.AddShape(GosforthPark);

	var Grange = new VEShape(VEShapeType.Pushpin, GrangeFirst);
	Grange.SetCustomIcon("/schoolmaps/js/schoolsmap/mapicon_sch.gif");
	Grange.SetTitle("Grange First School");
	GrangePhoto = "";
	GrangeAddress = "Norham Road,  Newcastle upon Tyne, NE3 2NP";
	GrangeWebPage = "http://www.newcastle.gov.uk/core.nsf/a/grangefirstschool";
	Grange.SetDescription('<p>'+GrangeAddress+'<br><a href="'+GrangeWebPage+'" target="_top">Open School Page</a>');
	//Grange.SetDescription('<p><img width="200" src="'+GrangePhoto+'"><br>'+GrangeAddress+'<br><a href="'+GrangeWebPage+'" target="_top">Open School Page</a>');
	map.AddShape(Grange);
	
	var RegentFarm = new VEShape(VEShapeType.Pushpin, RegentFarmFirst);
	RegentFarm.SetCustomIcon("/schoolmaps/js/schoolsmap/mapicon_sch.gif");
	RegentFarm.SetTitle("Regent Farm First School");
	RegentFarmPhoto = "";
	RegentFarmWebPage = "http://www.newcastle.gov.uk/core.nsf/a/regentfarmfirstschool";
	RegentFarmAddress = "Wansbeck Road South, Newcastle Upon Tyne, NE3 3PE";
	RegentFarm.SetDescription('<p>'+RegentFarmAddress+'<br><a href="'+RegentFarmWebPage+'" target="_top">Open School Page</a>');							
	//RegentFarm.SetDescription('<p><img width="200" src="'+RegentFarmPhoto+'"><br>'+RegentFarmAddress+'<br><a href="'+RegentFarmWebPage+'" target="_top">Open School Page</a>');							
	map.AddShape(RegentFarm);

	var SouthGosforth = new VEShape(VEShapeType.Pushpin, SouthGosforthFirst);
	SouthGosforth.SetCustomIcon("/schoolmaps/js/schoolsmap/mapicon_sch.gif");
	SouthGosforth.SetTitle("South Gosforth First");
	SouthGosforthPhoto = "";
	SouthGosforthWebPage = "http://www.newcastle.gov.uk/core.nsf/a/southgosforthfirstschool";
	SouthGosforthAddress = "Alnmouth Drive, South Gosforth, Newcastle Upon Tyne, NE3 1YF";
	SouthGosforth.SetDescription('<p>'+SouthGosforthAddress+'<br><a href="'+SouthGosforthWebPage+'" target="_top">Open School Page</a>');							
	//SouthGosforth.SetDescription('<p><img width="200" src="'+SouthGosforthPhoto+'"><br>'+SouthGosforthAddress+'<br><a href="'+SouthGosforthWebPage+'" target="_top">Open School Page</a>');							
	map.AddShape(SouthGosforth);
*/				
         }
         
         
         
         function DisposeMap()
         {
            if(map != null)
            {
              map.Dispose();
            }
         }

         
function Resize()
{
    var mapDiv = document.getElementById("myMap");

    var windowWidth = document.body.clientWidth;
    var windowHeight = document.body.clientHeight;

    if(windowWidth < 1000) {
    mapWidth = 588;
    mapHeight = 200;
    mapDiv.style.width = mapWidth + "px";
    mapDiv.style.height = mapHeight + "px";
    map.Resize(mapWidth, mapHeight);
    } else {
    mapWidth = 588;
    mapHeight = 200;
    mapDiv.style.width = mapWidth + "px";
    mapDiv.style.height = mapHeight + "px";    
    map.Resize(mapWidth, mapHeight);
    }


}