﻿function pubmarkers()
{
    //*********************
    var placemark1 = GMap._ge.createPlacemark('');
    var icon = GMap._ge.createIcon('');
    icon.setHref('http://maps.google.com/mapfiles/kml/shapes/arrow.png');
    var style = GMap._ge.createStyle(''); //create a new style
    style.getIconStyle().setIcon(icon); //apply the icon to the style
    style.getIconStyle().setScale(0.5);
    placemark1.setStyleSelector(style); //apply the style to the placemark
    var point = GMap._ge.createPoint('');
    point.setLatitude(37.0020);
    point.setLongitude(-8.94796);
    point.setAltitude(30);
    point.setAltitudeMode(GMap._ge.ALTITUDE_RELATIVE_TO_GROUND);
    placemark1.setGeometry(point);

    google.earth.addEventListener(placemark1, 'click', function(event)
    {
        pubVV(muppiePath.replace("{0}", "f8e97433-fbe5-44a5-9db1-e8fd57a21f6c"));
    });

    //*********************

    var placemark2 = GMap._ge.createPlacemark('');
    var icon = GMap._ge.createIcon('');
    icon.setHref('http://maps.google.com/mapfiles/kml/shapes/arrow.png');
    var style = GMap._ge.createStyle(''); //create a new style
    style.getIconStyle().setIcon(icon); //apply the icon to the style
    style.getIconStyle().setScale(0.5);
    placemark2.setStyleSelector(style); //apply the style to the placemark
    var point = GMap._ge.createPoint('');
    point.setLatitude(38.7968);
    point.setLongitude(-9.3907);
    point.setAltitude(30);
    point.setAltitudeMode(GMap._ge.ALTITUDE_RELATIVE_TO_GROUND);
    placemark2.setGeometry(point);

    google.earth.addEventListener(placemark2, 'click', function(event)
    {
        pubVV(muppiePath.replace("{0}", "0eab08ba-b002-4586-b31b-8c01ae3a3edd"));
    });


    //*********************

    var placemark3 = GMap._ge.createPlacemark('');
    var icon = GMap._ge.createIcon('');
    icon.setHref('http://maps.google.com/mapfiles/kml/shapes/arrow.png');
    var style = GMap._ge.createStyle(''); //create a new style
    style.getIconStyle().setIcon(icon); //apply the icon to the style
    style.getIconStyle().setScale(0.5);
    placemark3.setStyleSelector(style); //apply the style to the placemark
    var point = GMap._ge.createPoint('');
    point.setLatitude(38.75135);
    point.setLongitude(-9.259134);
    point.setAltitude(30);
    point.setAltitudeMode(GMap._ge.ALTITUDE_RELATIVE_TO_GROUND);
    placemark3.setGeometry(point);

    google.earth.addEventListener(placemark3, 'click', function(event)
    {
        pubVV(muppiePath.replace("{0}", "fe06886f-8e54-482c-ba24-5b66a0db599f"));
    });


    //*********************

    var placemark4 = GMap._ge.createPlacemark('');
    var icon = GMap._ge.createIcon('');
    icon.setHref('http://maps.google.com/mapfiles/kml/shapes/arrow.png');
    var style = GMap._ge.createStyle(''); //create a new style
    style.getIconStyle().setIcon(icon); //apply the icon to the style
    style.getIconStyle().setScale(0.5);
    placemark4.setStyleSelector(style); //apply the style to the placemark
    var point = GMap._ge.createPoint('');
    point.setLatitude(38.938325);
    point.setLongitude(-9.325231);
    point.setAltitude(30);
    point.setAltitudeMode(GMap._ge.ALTITUDE_RELATIVE_TO_GROUND);
    placemark4.setGeometry(point);

    google.earth.addEventListener(placemark4, 'click', function(event)
    {
        pubVV(muppiePath.replace("{0}", "3a4cc8ea-04ab-443f-a418-09d1e1238ff1"));
    });



    //*********************

    var placemark5 = GMap._ge.createPlacemark('');
    var icon = GMap._ge.createIcon('');
    icon.setHref('http://maps.google.com/mapfiles/kml/shapes/arrow.png');
    var style = GMap._ge.createStyle(''); //create a new style
    style.getIconStyle().setIcon(icon); //apply the icon to the style
    style.getIconStyle().setScale(0.5);
    placemark5.setStyleSelector(style); //apply the style to the placemark
    var point = GMap._ge.createPoint('');
    point.setLatitude(38.7083);
    point.setLongitude(-9.1987);
    point.setAltitude(30);
    point.setAltitudeMode(GMap._ge.ALTITUDE_RELATIVE_TO_GROUND);
    placemark5.setGeometry(point);

    google.earth.addEventListener(placemark5, 'click', function(event)
    {
        pubVV(muppiePath.replace("{0}", "6171517f-ee8b-4f83-8cb6-d249f3815aa1"));
    });


    //*********************

    var placemark6 = GMap._ge.createPlacemark('');
    var icon = GMap._ge.createIcon('');
    icon.setHref('http://maps.google.com/mapfiles/kml/shapes/arrow.png');
    var style = GMap._ge.createStyle(''); //create a new style
    style.getIconStyle().setIcon(icon); //apply the icon to the style
    style.getIconStyle().setScale(0.5);
    placemark6.setStyleSelector(style); //apply the style to the placemark
    var point = GMap._ge.createPoint('');
    point.setLatitude(41.149192);
    point.setLongitude(-8.621374);
    point.setAltitude(30);
    point.setAltitudeMode(GMap._ge.ALTITUDE_RELATIVE_TO_GROUND);
    placemark6.setGeometry(point);

    google.earth.addEventListener(placemark6, 'click', function(event)
    {
        pubVV(muppiePath.replace("{0}", "902047a0-b01b-4333-a7e8-5ae7454385f3"));
    });



    //*********************

    var placemark7 = GMap._ge.createPlacemark('');
    var icon = GMap._ge.createIcon('');
    icon.setHref('http://maps.google.com/mapfiles/kml/shapes/arrow.png');
    var style = GMap._ge.createStyle(''); //create a new style
    style.getIconStyle().setIcon(icon); //apply the icon to the style
    style.getIconStyle().setScale(0.5);
    placemark7.setStyleSelector(style); //apply the style to the placemark
    var point = GMap._ge.createPoint('');
    point.setLatitude(38.70427);
    point.setLongitude(-9.1625);
    point.setAltitude(30);
    point.setAltitudeMode(GMap._ge.ALTITUDE_RELATIVE_TO_GROUND);
    placemark7.setGeometry(point);

    google.earth.addEventListener(placemark7, 'click', function(event)
    {
        pubVV(muppiePath.replace("{0}", "4edfeb74-415c-4279-92a5-90fb11bc0447"));
    });



    //*********************

    var placemark8 = GMap._ge.createPlacemark('');
    var icon = GMap._ge.createIcon('');
    icon.setHref('http://maps.google.com/mapfiles/kml/shapes/arrow.png');
    var style = GMap._ge.createStyle(''); //create a new style
    style.getIconStyle().setIcon(icon); //apply the icon to the style
    style.getIconStyle().setScale(0.5);
    placemark8.setStyleSelector(style); //apply the style to the placemark
    var point = GMap._ge.createPoint('');
    point.setLatitude(40.660698);
    point.setLongitude(-7.910623);
    point.setAltitude(30);
    point.setAltitudeMode(GMap._ge.ALTITUDE_RELATIVE_TO_GROUND);
    placemark8.setGeometry(point);

    google.earth.addEventListener(placemark8, 'click', function(event)
    {
        pubVV(muppiePath.replace("{0}", "ddf6dff3-5b5b-4e38-b303-f0318d9626be"));
    });



    //*********************

    var placemark9 = GMap._ge.createPlacemark('');
    var icon = GMap._ge.createIcon('');
    icon.setHref('http://maps.google.com/mapfiles/kml/shapes/arrow.png');
    var style = GMap._ge.createStyle(''); //create a new style
    style.getIconStyle().setIcon(icon); //apply the icon to the style
    style.getIconStyle().setScale(0.5);
    placemark9.setStyleSelector(style); //apply the style to the placemark
    var point = GMap._ge.createPoint('');
    point.setLatitude(40.20285);
    point.setLongitude(-8.432741);
    point.setAltitude(30);
    point.setAltitudeMode(GMap._ge.ALTITUDE_RELATIVE_TO_GROUND);
    placemark9.setGeometry(point);

    google.earth.addEventListener(placemark9, 'click', function(event)
    {
        pubVV(muppiePath.replace("{0}", "7c868105-309f-4063-b807-b4b7d6f58599"));
    });



    //*********************

    var placemark10 = GMap._ge.createPlacemark('');
    var icon = GMap._ge.createIcon('');
    icon.setHref('http://maps.google.com/mapfiles/kml/shapes/arrow.png');
    var style = GMap._ge.createStyle(''); //create a new style
    style.getIconStyle().setIcon(icon); //apply the icon to the style
    style.getIconStyle().setScale(0.5);
    placemark10.setStyleSelector(style); //apply the style to the placemark
    var point = GMap._ge.createPoint('');
    point.setLatitude(38.697354);
    point.setLongitude(-9.208650);
    point.setAltitude(30);
    point.setAltitudeMode(GMap._ge.ALTITUDE_RELATIVE_TO_GROUND);
    placemark10.setGeometry(point);

    google.earth.addEventListener(placemark10, 'click', function(event)
    {
        pubVV(muppiePath.replace("{0}", "42bb5d98-e786-4f02-bb5f-2aa349af28dd"));
    });



    //*********************

    var placemark11 = GMap._ge.createPlacemark('');
    var icon = GMap._ge.createIcon('');
    icon.setHref('http://maps.google.com/mapfiles/kml/shapes/arrow.png');
    var style = GMap._ge.createStyle(''); //create a new style
    style.getIconStyle().setIcon(icon); //apply the icon to the style
    style.getIconStyle().setScale(0.5);
    placemark11.setStyleSelector(style); //apply the style to the placemark
    var point = GMap._ge.createPoint('');
    point.setLatitude(41.55543);
    point.setLongitude(-8.477047);
    point.setAltitude(30);
    point.setAltitudeMode(GMap._ge.ALTITUDE_RELATIVE_TO_GROUND);
    placemark11.setGeometry(point);

    google.earth.addEventListener(placemark11, 'click', function(event)
    {
        pubVV(muppiePath.replace("{0}", "82e66d80-439e-4f29-bc9b-576e98efee57"));
    });



    //*********************

    var placemark12 = GMap._ge.createPlacemark('');
    var icon = GMap._ge.createIcon('');
    icon.setHref('http://maps.google.com/mapfiles/kml/shapes/arrow.png');
    var style = GMap._ge.createStyle(''); //create a new style
    style.getIconStyle().setIcon(icon); //apply the icon to the style
    style.getIconStyle().setScale(0.5);
    placemark12.setStyleSelector(style); //apply the style to the placemark
    var point = GMap._ge.createPoint('');
    point.setLatitude(39.547377);
    point.setLongitude(-8.978502);
    point.setAltitude(30);
    point.setAltitudeMode(GMap._ge.ALTITUDE_RELATIVE_TO_GROUND);
    placemark12.setGeometry(point);

    google.earth.addEventListener(placemark12, 'click', function(event)
    {
        pubVV(muppiePath.replace("{0}", "6d3af0a3-7e1b-4134-988c-cf37b512e8e2"));
    });


    //*********************

    var placemark13 = GMap._ge.createPlacemark('');
    var icon = GMap._ge.createIcon('');
    icon.setHref('http://maps.google.com/mapfiles/kml/shapes/arrow.png');
    var style = GMap._ge.createStyle(''); //create a new style
    style.getIconStyle().setIcon(icon); //apply the icon to the style
    style.getIconStyle().setScale(0.5);
    placemark13.setStyleSelector(style); //apply the style to the placemark
    var point = GMap._ge.createPoint('');
    point.setLatitude(39.659905);
    point.setLongitude(-8.824785);
    point.setAltitude(30);
    point.setAltitudeMode(GMap._ge.ALTITUDE_RELATIVE_TO_GROUND);
    placemark13.setGeometry(point);

    google.earth.addEventListener(placemark13, 'click', function(event)
    {
        pubVV(muppiePath.replace("{0}", "c26617b5-acd3-422e-998f-5bd163a99efc"));
    });


    //*********************

    var placemark14 = GMap._ge.createPlacemark('');
    var icon = GMap._ge.createIcon('');
    icon.setHref('http://maps.google.com/mapfiles/kml/shapes/arrow.png');
    var style = GMap._ge.createStyle(''); //create a new style
    style.getIconStyle().setIcon(icon); //apply the icon to the style
    style.getIconStyle().setScale(0.5);
    placemark14.setStyleSelector(style); //apply the style to the placemark
    var point = GMap._ge.createPoint('');
    point.setLatitude(39.604711);
    point.setLongitude(-8.419659);
    point.setAltitude(30);
    point.setAltitudeMode(GMap._ge.ALTITUDE_RELATIVE_TO_GROUND);
    placemark14.setGeometry(point);

    google.earth.addEventListener(placemark14, 'click', function(event)
    {
        pubVV(muppiePath.replace("{0}", "82655610-82dc-4eec-b263-3192145a65d0"));
    });

    //*********************

    var placemark15 = GMap._ge.createPlacemark('');
    var icon = GMap._ge.createIcon('');
    icon.setHref('http://maps.google.com/mapfiles/kml/shapes/arrow.png');
    var style = GMap._ge.createStyle(''); //create a new style
    style.getIconStyle().setIcon(icon); //apply the icon to the style
    style.getIconStyle().setScale(0.5);
    placemark15.setStyleSelector(style); //apply the style to the placemark
    var point = GMap._ge.createPoint('');
    point.setLatitude(38.6928);
    point.setLongitude(-9.215);
    point.setAltitude(30);
    point.setAltitudeMode(GMap._ge.ALTITUDE_RELATIVE_TO_GROUND);
    placemark15.setGeometry(point);

    google.earth.addEventListener(placemark15, 'click', function(event)
    {
        pubVV(muppiePath.replace("{0}", "75047666-4597-4a28-ae77-9b7567c4732b"));
        
    });

    pubmarkersArray.push(placemark1);
    pubmarkersArray.push(placemark2);
    pubmarkersArray.push(placemark3);
    pubmarkersArray.push(placemark4);
    pubmarkersArray.push(placemark5);
    pubmarkersArray.push(placemark6);
    pubmarkersArray.push(placemark7);
    pubmarkersArray.push(placemark8);
    pubmarkersArray.push(placemark9);
    pubmarkersArray.push(placemark10);
    pubmarkersArray.push(placemark11);
    pubmarkersArray.push(placemark12);
    pubmarkersArray.push(placemark13);
    pubmarkersArray.push(placemark14);
    pubmarkersArray.push(placemark15);
}


function drawPubMarkers()
{

    for (var i = 0; i < pubmarkersArray.length; i++)
    {
        GMap._ge.getFeatures().appendChild(pubmarkersArray[i]);
    }
}

function pubVV(src)
{

    if (dialog != true)
    {
        dialog = true;
        var mydialog = new Dialogs("#virtualTour", entity.Name + " Visita Virtual", src)
        mydialog.setDialog();
    }
}

