﻿CONST_NUMBER_OF_SITES = 5;

function site() {
    this.name = "";
    this.latLong = new VELatLong("0", "0");
    this.pushpinContent = "";
}

var Sites = new Array(CONST_NUMBER_OF_SITES);
for (i = 0; i < CONST_NUMBER_OF_SITES; i++)
    Sites[i] = new site();

//Populate data for sites (Names, Latlong, other info)

Sites[0].name = "Srivilliputtur";
Sites[0].latLong = new VELatLong("9.51044", "77.635");
Sites[0].pushpinContent = "<div>\
		        <br /><img class=\"locationThumb\" src=\"images/sites/srivilliputtur.jpg\" alt=\"Srivilliputtur\" /> \
		        <p>A city in the state of Tamil Nadu. Home to the Sri Andal and Vadapatrasayee temples. The primary landmark of Srivilliputtur is a tall Gopuram or 'Temple Tower'</p> \
                <h3>More Information:</h3> \
                <a href=\"http://en.wikipedia.org/wiki/Srivilliputhur\">Wikipedia</a><br />\
                <br />\
                <h3>Available Visualizations:</h3> \
                <br />Photosynth Collections<br /><br />\
                &nbsp; &nbsp; - <a href=\"http://photosynth.net/view.aspx?cid=6278ea5c-fbe5-498a-8b4a-15805f828a2b\">Sri Andal Temple, Middle Hallway</a> <br /> \
                <br /><br />Digital Heritage Prototype<br /><br />\
                &nbsp; &nbsp; - <a href=\"demo.html\">Video of Sri Andal Narrative</a> <br /> \
	        </div>";

Sites[1].name = "Hampi";
Sites[1].latLong = new VELatLong("15.31667", "76.46667");
Sites[1].pushpinContent = "<div>\
		        <br /><img class=\"locationThumb\" src=\"images/sites/hampi.jpg\" alt=\"Hampi\" /> \
		        <p>Hampi is a village in northern Karnataka state, India, located within the ruins of Vijayanagara, the former capital of the Vijayanagara empire. Ruins of the ancient city still remain.</p> \
                <h3>More Information:</h3> \
                <a href=\"http://whc.unesco.org/en/list/241\">UNESCO</a><br />\
                <a href=\"http://en.wikipedia.org/wiki/Hampi\">Wikipedia</a><br />\
                <a href=\"http://wikitravel.org/en/Hampi\">Wikitravel</a><br /><br />\
                <h3>Available Visualizations:</h3> \
                <br />HD View Panoramas<br /><br />\
                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - <a href=\"hdv/hampi/achyuta.html\">Achyutaraya Temple</a> <br /> \
	            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - <a href=\"hdv/hampi/achyuta-tower.html\">Achyutaraya Temple, Main Tower</a> <br /> \
	            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - <a href=\"hdv/hampi/hampi-bazaar.html\">Hampi Bazaar</a> <br /> \
	            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - <a href=\"hdv/hampi/hazara.html\">Hazara Rama Temple</a> <br /> \
	            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - <a href=\"hdv/hampi/krishna.html\">Bala Krishna Temple</a> <br /> \
	            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - <a href=\"hdv/hampi/virupaksha.html\">Virupaksha Temple</a> <br /> \
	        </div>";

Sites[2].name = "Mysore";
Sites[2].latLong = new VELatLong("12.30631", "76.64888");
Sites[2].pushpinContent = "<div>\
		        <br /><img class=\"locationThumb\" src=\"images/sites/Mysore.jpg\" alt=\"Mysore\" /> \
		        <p>Mysore (also Mysuru) is situated at the base of the Chamundi Hills and is the second largest city of Karnataka. It served as the capital of the Kingdom of Mysore and is known as the Cultural Capital of Karnataka.</p> \
                <h3>More Information:</h3> \
                <a href=\"http://en.wikipedia.org/wiki/Mysore\">Wikipedia</a><br />\
                <a href=\"http://wikitravel.org/en/Mysore\">Wikitravel</a><br /><br />\
                <h3>Available Visualizations:</h3> \
                <br />HD View Panoramas<br /><br />\
                &nbsp; &nbsp; - <a href=\"hdv/mysore/chennakeshava.html\">Chennakeshava Temple</a> <br /> \
	            &nbsp; &nbsp; - <a href=\"hdv/mysore/hoysaleswara.html\">Hoysaleswara Temple</a> <br /> \
	            &nbsp; &nbsp; - <a href=\"hdv/mysore/hoysale-corner.html\">Hoysaleswara Temple, Wall sculptures</a> <br /> \
	            &nbsp; &nbsp; - <a href=\"hdv/mysore/keshava.html\">Keshava temple</a> <br /> \
	            &nbsp; &nbsp; - <a href=\"hdv/mysore/palace.html\">Mysore Palace</a> <br /> \
	        </div>";

Sites[3].name = "Goa";
Sites[3].latLong = new VELatLong("15.49212", "73.818245");
Sites[3].pushpinContent = "<div>\
		        <br /><img class=\"locationThumb\" src=\"images/sites/Goa.jpg\" alt=\"Goa\" /> \
		        <p>Located in the Konkan region of west-India, Goa is India’s smallest state. Visitors to Goa will observe the influence of Portuguese culture on local architecture and society.</p> \
                <h3>More Information:</h3> \
                <a href=\"http://whc.unesco.org/en/list/234\">UNESCO</a><br />\
                <a href=\"http://en.wikipedia.org/wiki/Goa\">Wikipedia</a><br />\
                <a href=\"http://wikitravel.org/en/Goa\">Wikitravel</a><br /><br />\
                <h3>Available Visualizations:</h3> \
                <br />HD View Panoramas<br /><br />\
                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - <a href=\"hdv/goa/basilica.html\">Basilica of Bom Jesus</a> <br /> \
	            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - <a href=\"hdv/goa/cathedral.html\">Church of St. Francis of Assisi</a> <br /> \
	            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - <a href=\"hdv/goa/beach.html\">Anjuna Beach</a> <br /> \
	            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - <a href=\"hdv/goa/cave10.html\">Viswakarma Cave, Ajanta</a> <br /> \
	            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - <a href=\"hdv/goa/wall16.html\">Kailasa Temple</a> <br /> \
	        </div>";

Sites[4].name = "Uttarakhand";
Sites[4].latLong = new VELatLong("30.15871", "79.215515");
Sites[4].pushpinContent = "<div>\
		        <br /><img class=\"locationThumb\" src=\"images/sites/kuari.jpg\" alt=\"Uttarakhand\" /> \
		        <p>Ranging from the majestic Himalayas to the densely forested foot-hills, Uttarakhand is a northern state of outstanding natural beauty. The diverse terrain, flora and fauna characterize this amazing state.</p> \
                <h3>More Information:</h3> \
                <a href=\"http://en.wikipedia.org/wiki/Uttarakhand\">Wikipedia</a><br />\
                <a href=\"http://wikitravel.org/en/Uttarakhand\">Wikitravel</a><br /><br />\
                <h3>Available Visualizations:</h3> \
                <br />HD View Panoramas<br /><br />\
                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - <a href=\"hdv/kuari/devprayag.html\">Dev Prayag</a> <br /> \
	            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - <a href=\"hdv/kuari/vista.html\">Kuari Pass, 1</a> <br /> \
	            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - <a href=\"hdv/kuari/vista-map.html\">Kuari Pass, 2</a> <br /> \
	            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - <a href=\"hdv/kuari/ronti-ghunti.html\">Ronti (6024m)</a> <br /> \
	        </div>";


//Show featured sites on the map
function showFeaturedSites() {

    Gmap.DeleteAllPushpins();
    // insetMap.DeleteAllPushpins();
    pushpinOnMap = false;
    Gmap.DeleteAllPolylines();
    polyOnMap = false;
    Gmap.DeleteAllPolygons();
    polygonOnMap = false;

    var latLon = new VELatLong(InitialLatitutde, InitialLongitude);
    Gmap.LoadMap(latLon, 4, 'r', false);

    for (i = 0; i < CONST_NUMBER_OF_SITES; i++) {
        var pin = new VEPushpin('featured'+i, Sites[i].latLong, 'images/sites/searchpin.gif', Sites[i].name,
					"<div class=\"PushpinTop\">" + Sites[i].pushpinContent +
					"</div><br>" +
					"<div class=\"Pushpin\" style=\"background-color:#DCEFFF; padding:10px;\">" +
                    "Zoom To: " +
                    "<a style=\"color:#1E90FF\" href= 'javascript:ZoomStreetLevel(\"" + Sites[i].latLong.Latitude + "\", \"" + Sites[i].latLong.Longitude + "\");'>Street</a> | " +
                    "<a style=\"color:#1E90FF\" href='javascript:ZoomCityLevel(\"" + Sites[i].latLong.Latitude + "\", \"" + Sites[i].latLong.Longitude + "\");'>City</a> | " +
					"<a style=\"color:#1E90FF\" href='javascript:ZoomRegionLevel(\"" + Sites[i].latLong.Latitude + "\", \"" + Sites[i].latLong.Longitude + "\");'>Region</a>" +
					"</div><br/><a href=\"javascript:VEPushpin.Hide();\">[Close]</a>",'','titlestyle',''
					);

        Gmap.AddPushpin(pin);
    }
}


function ShowPushpin(n) {
    ZoomNLevel(Sites[n].latLong.Latitude, Sites[n].latLong.Longitude, 10);
    document.getElementById('featured' + n + '_' + Gmap.GUID).onmouseover();
}