﻿String.prototype.endsWith = function (a) { return this.match(a + "$") == a }; function GetResource(a, d) { document.PortfolioForm.SelectedCategory.value = a; document.PortfolioForm.SelectedResource.value = d; document.PortfolioForm.submit() } function GetResourceInfoFrame(a) { for (a = a.nextSibling; a != null; ) { if (a.attributes != null) { var d = a.getAttribute("name"); if (d != null && d.toLowerCase() == "resourceinfoframe") return a } a = a.nextSibling } return null }
function ShowImage(a, d)
{
    var e = document.getElementsByName("imageFrame"), b = document.getElementsByName("imageTextFrame"), c = document.getElementsByName("navNum"); document.PortfolioForm.SelectedImage.value = d; if (document.PortfolioForm.MobileUserAgent.value == 1) { for (i = 0; i < c.length; i++) c[i].firstChild.className = "mobileNavNum mobileNavNumActive"; c[document.PortfolioForm.SelectedImage.value - 1].firstChild.className = "mobileNavNum mobileNavNumDisabled" } else
    {
        for (i = 0; i < c.length; i++) c[i].firstChild.className = "navNum navNumActive";
        c[document.PortfolioForm.SelectedImage.value - 1].firstChild.className = "navNum navNumDisabled"
    } for (i = 0; i < e.length; i++) if (c = e[i], c != null && c.getAttribute("images") == a) if (c.getAttribute("image") != d) c.style.display = "none"; else { if (c.getAttribute("imageLoaded") == "false") { var g = c.getAttribute("imageSource"), f = GetImageFrameImage(c); f != null && f.setAttribute("src", g); c.setAttribute("imageLoaded", "true") } c.style.display = "block" } if (b.length != 0) b[0].style.display = "none"; document.body.focus()
}
function GetImageFrameImage(a) { a = a.getElementsByTagName("img"); return a.length == 0 ? null : a[0] }
function ShowImageT(a)
{
    var d = document.getElementsByName("imageFrame"), e = document.getElementsByName("imageTextFrame"), b = document.getElementsByName("navNum"); document.PortfolioForm.SelectedImage.value = 0; if (document.PortfolioForm.MobileUserAgent.value == 1) { for (i = 0; i < b.length; i++) b[i].firstChild.className = "mobileNavNum mobileNavNumActive"; b[b.length - 1].firstChild.className = "mobileNavNum mobileNavNumDisabled" } else
    {
        for (i = 0; i < b.length; i++) b[i].firstChild.className = "navNum navNumActive"; b[b.length - 1].firstChild.className =
"navNum navNumDisabled"
    } for (i = 0; i < d.length; i++) if (b = d[i], b != null && b.getAttribute("images") == a) b.style.display = "none"; e[0].style.display = "block"; document.body.focus()
} function ShowResourceInfo(a) { a = GetResourceInfoFrame(a); if (a != null) a.style.display = "block" }
function GetResourceData(a, d, e)
{
    var b = document.getElementsByName("navNum"); document.PortfolioForm.SelectedImage.value = e; if (document.PortfolioForm.MobileUserAgent.value == 1) { for (i = 0; i < b.length; i++) b[i].firstChild.className = "mobileNavNum mobileNavNumActive"; b[document.PortfolioForm.SelectedImage.value - 1].firstChild.className = "mobileNavNum mobileNavNumDisabled" } else
    {
        for (i = 0; i < b.length; i++) b[i].firstChild.className = "navNum navNumActive"; b[document.PortfolioForm.SelectedImage.value - 1].firstChild.className =
"navNum navNumDisabled"
    } $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "PortfolioService.asmx/GetPageXhtml", data: "{category:" + a + ", resource:" + d + ", page:" + e + " }", dataType: "json", success: function (a) { $(".pagesFrame").html(a.d) }, error: AjaxFailed }); document.body.focus()
} function AjaxFailed(a, d, e) { alert(a.status + " " + a.statusText); alert(a.responseText); alert(a.responseXML); alert(a.responseBody); alert(e); alert(d) };



