﻿if (!window.rightNav)
    rightNav = {};

rightNav.Page = function() {
}

rightNav.Page.prototype =
{
    handleLoad: function(control, userContext, rootElement) {
        this.control = control;

        // Sample event hookup:	
        rootElement.addEventListener("MouseLeftButtonDown", Silverlight.createDelegate(this, this.handleMouseDown));
    },

    // Sample event handler
    handleMouseDown: function(sender, eventArgs) {
        // The following line of code shows how to find an element by name and call a method on it.
        // this.control.content.findName("Storyboard1").Begin();
    }
}
function EmpOpEnter(sender, eventArgs) {
    if (sender.name == "EmpOp1") {
        // Get a reference to the glass rectangle.
        sender.findName("EmpOpStoryboard").begin();
    }
}
function MapsEnter(sender, eventArgs) {
    if (sender.name == "Maps") {
        // Get a reference to the glass rectangle.
        sender.findName("MapsStoryboard").begin();
    }
}
function CityEventsEnter(sender, eventArgs) {
    if (sender.name == "CityEvents") {
        // Get a reference to the glass rectangle.
        sender.findName("CityEventsStoryboard").begin();
    }
}
function ProcurementEnter(sender, eventArgs) {
    if (sender.name == "Procurement") {
        // Get a reference to the glass rectangle.
        sender.findName("ProcurementStoryboard").begin();
    }
}
function CityDirectoryEnter(sender, eventArgs) {
    if (sender.name == "CityDirectory") {
        // Get a reference to the glass rectangle.
        sender.findName("CityDirectoryStoryboard").begin();
    }
}
function CalendarEnter(sender, eventArgs) {
    if (sender.name == "Calendar") {
        // Get a reference to the glass rectangle.
        sender.findName("CalendarStoryboard").begin();
    }
}

function ParksEnter(sender, eventArgs) {
    if (sender.name == "Parks") {
        // Get a reference to the glass rectangle.
        sender.findName("ParksStoryboard").begin();
    }
}

function RestaurantEnter(sender, eventArgs) {
    if (sender.name == "Restaurants") {
        // Get a reference to the glass rectangle.
        sender.findName("RestaurantStoryboard").begin();
    }
}

function EmpOpLeave(sender, eventArgs) {
    if (sender.name == "EmpOp1") {
        // Get a reference to the glass rectangle.
        sender.findName("EmpOpLeaveStoryboard").begin();
    }
}

function MapsLeave(sender, eventArgs) {
    if (sender.name == "Maps") {
        // Get a reference to the glass rectangle.
        sender.findName("MapsLeaveStoryboard").begin();
    }
}

function CityEventsLeave(sender, eventArgs) {
    if (sender.name == "CityEvents") {
        // Get a reference to the glass rectangle.
        sender.findName("CityEventsLeaveStoryboard").begin();
    }
}

function ProcurementLeave(sender, eventArgs) {
    if (sender.name == "Procurement") {
        // Get a reference to the glass rectangle.
        sender.findName("procureLeaveStoryboard").begin();
    }
}
function CityDirectoryLeave(sender, eventArgs) {
    if (sender.name == "CityDirectory") {
        // Get a reference to the glass rectangle.
        sender.findName("CityDirectoryLeaveStoryboard").begin();
    }
}

function CalendarLeave(sender, eventArgs) {
    if (sender.name == "Calendar") {
        // Get a reference to the glass rectangle.
        sender.findName("CalendarLeaveStoryboard").begin();
    }
}
function ParksLeave(sender, eventArgs) {
    if (sender.name == "Parks") {
        // Get a reference to the glass rectangle.
        sender.findName("ParksLeaveStoryboard").begin();
    }
}
function RestaurantLeave(sender, eventArgs) {
    if (sender.name == "Restaurants") {
        // Get a reference to the glass rectangle.
        sender.findName("RestaurantLeaveStoryboard").begin();
    }
}

function EmpOpClick(sender, eventArgs) {
    if (sender.name == "EmpOp1") {
        window.location = "JobPostings.aspx"
    }
}

function MapClick(sender, eventArgs) {

    window.location = "Maps.aspx"

}

function BusClick(sender, eventArgs) {

    window.location = "Residents.aspx?pgID=20.2"

}

function AlertClick(sender, eventArgs) {

    window.location = "Alerts.aspx?pgID=1.1"

}

function EventsClick(sender, eventArgs) {
    window.location = "Visitor.aspx?pgID=6.1"
}

function ProcurementsClick(sender, eventArgs) {
    window.location = "CityClerk.aspx?pgID=3.4.3.5"
}

function ParksClick(sender, eventArgs) {
    window.open("http://www.elocallink.tv/clients3/ut/westjordan/main.php")
}

function WCClick(sender, eventArgs) {
    window.location = "Residents.aspx?pgID=4.7"
}

function phoneClick(sender, eventArgs) {
    window.location = "Residents.aspx?pgID=4.5.1"
}

function CalendarClick(sender, eventArgs) {
    window.location = "Calendar.aspx"
}