﻿jQuery(document).ready(function() {
    var q = document.getElementById('ctl00_txtGoogleSearch');
    if (q) {
        var n = navigator; var l = location; if (n.platform == 'Win32') {
            q.style.cssText = 'border: 1px solid #7e9db9; padding: 2px;';
        }
        var b = function() {
            if (q.value == '') {
                q.style.background = '#FFFFFF url(' + siteUrl + '/layout/google_custom_search_watermark.gif) left no-repeat';
            }
        };
        var f = function() {
            q.style.background = '#ffffff';
        };
        q.onfocus = f; q.onblur = b; if (!/[&?]q=[^&]/.test(l.search)) {
            b();
        }
    }
}
)


    if (document.getElementById('cse-search-results')) {
        var e = null, a = window, q = a.googleSearchResizeIframe || a.googleSearchPath && a.googleSearchPath == "/cse" && typeof a.googleSearchResizeIframe == "undefined", o, n, k; function r(c, b, i, l) { for (var f = {}, g = c.split(i), d = 0; d < g.length; d++) { var h = g[d], m = h.indexOf(b); if (m > 0) { var j = h.substring(0, m); j = l ? j.toUpperCase() : j.toLowerCase(); var t = h.substring(m + 1, h.length); f[j] = t } } return f } function u() {
            var c = document.location.search; if (c.length < 1) return ""; c = c.substring(1, c.length); var b = r(c, "=", "&", false); if (a.googleSearchQueryString !=
"q" && b[a.googleSearchQueryString]) { b.q = b[a.googleSearchQueryString]; delete b[a.googleSearchQueryString] } if (b.cof) { var i = r(decodeURIComponent(b.cof), ":", ";", true), l = i.FORID; if (l) o = parseInt(l, 10) } var f = document.getElementById(a.googleSearchFormName); if (f) {
                if (f.q && b.q && (!b.ie || b.ie.toLowerCase() == "utf-8")) f.q.value = decodeURIComponent(b.q.replace(/\+/g, " ")); if (f.sitesearch) for (var g = 0; g < f.sitesearch.length; g++) f.sitesearch[g].checked = b.sitesearch == e && f.sitesearch[g].value == "" ? true : f.sitesearch[g].value ==
b.sitesearch ? true : false
            } var d = ""; for (var h in b) d += "&" + h + "=" + b[h]; return d.substring(1, d.length)
        } function p(c, b) { return b ? "&" + c + "=" + encodeURIComponent(b) : "" } function s(c, b) { return c ? Math.max(c, b) : b } function v() {
            var c = "http://"; c += a.googleSearchDomain ? a.googleSearchDomain : "www.google.com"; c += a.googleSearchPath ? a.googleSearchPath : "/custom"; c += "?"; if (a.googleSearchQueryString) a.googleSearchQueryString = a.googleSearchQueryString.toLowerCase(); c += u(); c += p("ad", "w" + n); c += p("num", k); c += p("adtest", a.googleAdtest);
            if (q) { var b = a.location.href, i = b.indexOf("#"); if (i != -1) b = b.substring(0, i); c += p("rurl", b) } return c
        } function w() {
            (n = a.googleSearchNumAds) || (n = 9); k = (k = a.googleNumSearchResults) ? Math.min(k, 20) : 10; var c = {}; c[9] = 720; c[10] = 720; c[11] = 500; var b = {}; b[9] = 300 + 90 * k; b[10] = 300 + 50 * Math.min(n, 4) + 90 * k; b[11] = 300 + 50 * n + 90 * k; var i = v(); if (!a.googleSearchFrameborder) a.googleSearchFrameborder = "0"; var l = document.getElementById(a.googleSearchIframeName); if (l && c[o]) {
                var f = s(a.googleSearchFrameWidth, c[o]), g = s(a.googleSearchFrameHeight,
b[o]), d = document.createElement("iframe"), h = { name: "googleSearchFrame", src: i, frameBorder: a.googleSearchFrameborder, width: f, height: g, marginWidth: "0", marginHeight: "0", hspace: "0", vspace: "0", allowTransparency: "true", scrolling: "no" }; for (var m in h) d.setAttribute(m, h[m]); l.appendChild(d); d.attachEvent ? d.attachEvent("onload", function() { window.scrollTo(0, 0) }) : d.addEventListener("load", function() { window.scrollTo(0, 0) }, false); q && a.setInterval(function() {
    if (a.location.hash && a.location.hash != "#") {
        var j = a.location.hash.substring(1) +
"px"; if (d.height != j && j != "0px") d.height = j
    }
}, 10)
            }
            a.googleSearchIframeName = e; a.googleSearchFormName = e; a.googleSearchResizeIframe = e; a.googleSearchQueryString = e; a.googleSearchDomain = e; a.googleSearchPath = e; a.googleSearchFrameborder = e; a.googleSearchFrameWidth = e; a.googleSearchFrameHeight = e; a.googleSearchNumAds = e; a.googleNumSearchResults = e; a.googleAdtest = e
        } w()
    }


