var timeout = 100;
var closetimer = 0;
var ddmenuitem = 0;

function mopen(a) {
    mcancelclosetime();
    if (ddmenuitem) {
        ddmenuitem.css({
            visibility: "hidden",
            display: "none"
        })
    }
    
    ddmenuitem = $("#" + a);
 
    ddmenuitem.css({
        visibility: "visible",
        display: "block"
    })
}
function mclose() {
    if (ddmenuitem) {
        ddmenuitem.css({
            visibility: "hidden",
            display: "none"
        })
    }
}
function mclosetime() {
    closetimer = window.setTimeout(mclose, timeout)
}
function mcancelclosetime() {
    if (closetimer) {
        window.clearTimeout(closetimer);
        closetimer = null
    }
}
document.onclick = mclose;


//function getCookieVal(b) {
//    var a = document.cookie.indexOf(";", b);
//    if (a == -1) {
//        a = document.cookie.length
//    }
//    return unescape(document.cookie.substring(b, a))
//}
//function GetCookie(e) {
//    var b = e + "=";
//    var g = b.length;
//    var a = document.cookie.length;
//    var f = 0;
//    while (f < a) {
//        var d = f + g;
//        if (document.cookie.substring(f, d) == b) {
//            return getCookieVal(d)
//        }
//        f = document.cookie.indexOf(" ", f) + 1;
//        if (f == 0) {
//            break
//        }
//    }
//    return null
//}
//function SetCookie(b, d, a) {
//    var e = new Date();
//    e.setDate(e.getDate() + a);
//    document.cookie = b + "=" + escape(d) + ((a == null) ? "" : ";expires=" + e.toGMTString())
//}
//var cqanswer = GetCookie("CI_CQ_country");
//if (cqanswer == null) {
//    cqanswer = GetCookie("Q_cricinfo_country");
//    if (cqanswer == null) {
//        cqanswer = ""
//    } else {
//        if (cqanswer == "unknown") {
//            cqanswer = "99"
//        } else {
//            if (cqanswer == "gb") {
//                cqanswer = "uk"
//            }
//        }
//    }
//}
//function subPopup1(a) {
//    $("#" + a).css("visibility", "visible")
//}
//function subPopup0(a) {
//    $("#" + a).css("visibility", "hidden")
//}


//function openE(a, b) {
//    window.open(a, b, "left=0,top=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,titlebar=0,width=1021,height=720");
//    if (openE.opener == null) {
//        openE.opener = window
//    }
//    openE.opener.name = "opener"
//}
//function openWin(d, b, e, a) {
//    window.open(d, b, "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=" + e + ",height=" + a + ",left=0,top=0")
//}
//function textSize(a) {
//    if (a == 13) {
//        $("#13").css({
//            cursor: "default",
//            color: "#AAAAAA"
//        });
//        $("#14").css({
//            cursor: "pointer",
//            color: "#333333"
//        });
//        $(document).ready(function () {
//            $("#storyTxt > p, #storyTxt > p > a").css({
//                "font-size": "13px"
//            });
//            $("#storyTxt > table > caption, #storyTxt > table > tbody > tr > td, #rltdTxt > span , #rltdTxt > span > a, #rltdTxt > div , #rltdTxt > div > a, #authInfo > p,#authInfo > a,#authInfo > span").css({
//                "font-size": "11px"
//            })
//        });
//        $("td.stryPicCptn,li.liSideBarNoBlt,li.liSideBarNoBlt > a,li.liSideBar,li.liSideBar > a").css({
//            "font-size": "11px"
//        });
//        $("#rltdBlueHd,#pullquote,h4.sbHdr").css({
//            "font-size": "12px"
//        });
//        $("#storyTxt,#sdbrTop,#sdbrTopimg").css({
//            "font-size": "13px"
//        });
//        $("td.pullquotetext,span.txtHeader").css({
//            "font-size": "14px"
//        })
//    }
//    if (a == 14) {
//        $("#13").css({
//            cursor: "pointer",
//            color: "#333333"
//        });
//        $("#14").css({
//            cursor: "default",
//            color: "#AAAAAA"
//        });
//        $(document).ready(function () {
//            $("#storyTxt > p, #storyTxt > p > a").css({
//                "font-size": "14px"
//            });
//            $("#storyTxt > table > caption, #storyTxt > table > tbody > tr > td, #rltdTxt > span , #rltdTxt > span > a, #rltdTxt > div , #rltdTxt > div > a, #authInfo > p,#authInfo > a,#authInfo > span").css({
//                "font-size": "12px"
//            })
//        });
//        $("td.stryPicCptn,li.liSideBarNoBlt,li.liSideBarNoBlt > a,li.liSideBar,li.liSideBar > a").css({
//            "font-size": "12px"
//        });
//        $("#rltdBlueHd,#pullquote,h4.sbHdr").css({
//            "font-size": "13px"
//        });
//        $("#storyTxt,#sdbrTop,#sdbrTopimg").css({
//            "font-size": "14px"
//        });
//        $("td.pullquotetext,span.txtHeader").css({
//            "font-size": "15px"
//        })
//    }
//}
//function showTooltip(d, b, f) {
//    var d = $(d);
//    var e = d.offset();
//    if (b == "divLoginpopup") {
//        $("#" + b).css({
//            left: (e.left + (-3)) + "px",
//            top: (e.top + (-1)) + "px",
//            display: "block"
//        })
//    } else {
//        if (b == "athrData") {
//            $("#" + b).css({
//                left: (e.left + (45)) + "px",
//                top: (e.top + (10)) + "px",
//                display: "block"
//            })
//        } else {
//            if (b == "Friendmail") {
//                $("#" + b).css({
//                    left: (e.left + (-370)) + "px",
//                    top: (e.top + (20)) + "px",
//                    display: "block"
//                });
//                var a = "/ci/content/submit/other/friendmail.html";
//                if (f != "undefined") {
//                    a = a + "?img_path=" + f
//                }
//                $("#emailFriend").attr("src", a)
//            } else {
//                $("#" + b).css({
//                    left: (e.left + (0)) + "px",
//                    top: (e.top + (0)) + "px",
//                    display: "block"
//                })
//            }
//        }
//    }
//    return false
//}
//function hideTooltip(a) {
//    if (a == "divLoginpopup") {
//        $("#" + a).css("display", "none");
//        $("#email").val("");
//        $("#password").val("")
//    } else {
//        $("#" + a).css("display", "none")
//    }
//}
//function searchClrTxt(a) {
//    if (a == "cricinfoSearch" && $("#" + a).val() == "Search Cricinfo") {
//        $("#" + a).val("")
//    }
//    if (a == "PlayerssearchTxtBox" && $("#" + a).val() == "Search for grounds") {
//        $("#" + a).val("")
//    }
//    if (a == "PhotosearchTxtBox" && $("#" + a).val() == "Search for photos") {
//        $("#" + a).val("")
//    }
//    if (a == "PhotosearchTxtBox" && $("#" + a).val() == "Search for galleries") {
//        $("#" + a).val("")
//    }
//    if (a == "stryTxtBox" && $("#" + a).val() == "Search this section") {
//        $("#" + a).val("")
//    }
//    if (a == "ProfilesearchTxtBox" && $("#" + a).val() == "Search for Profiles") {
//        $("#" + a).val("")
//    }
//    if (a == "StatsgurusearchTxtBox" && $("#" + a).val() == "Search in Statsguru") {
//        $("#" + a).val("")
//    }
//}
//var on = 0;

//function customize() {
//    if (on == 0) {
//        $("#espnExpCol").css("background-position", "-3193px -6px");
//        on = 1
//    } else {
//        $("#espnExpCol").css("background-position", "-3097px -6px");
//        on = 0
//    }
//    $("#ciEspnbtn").toggle("slow")
//}
//function ajaxFunction(l, b, h) {
//    if (h == "button") {
//        var f = false;
//        for (counter = 0; counter < document.ciHPPoll.Choice.length; counter++) {
//            if (document.ciHPPoll.Choice[counter].checked) {
//                f = true
//            }
//        }
//        if (!f) {
//            alert("Please select any option.");
//            return false
//        }
//    }
//    var a;
//    try {
//        a = new XMLHttpRequest()
//    } catch (g) {
//        try {
//            a = new ActiveXObject("Msxml2.XMLHTTP")
//        } catch (g) {
//            try {
//                a = new ActiveXObject("Microsoft.XMLHTTP")
//            } catch (g) {
//                alert("Your browser does not support AJAX!");
//                return false
//            }
//        }
//    }
//    a.onreadystatechange = function () {
//        if (a.readyState == 4) {
//            var e = a.responseText.split("<body>");
//            d.innerHTML = e[0]
//        }
//    };
//    var d = $("#" + l);
//    if (!d) {
//        alert("The element with the passed ID doesn't exists in your page");
//        return
//    }
//    a.open("GET", b, true);
//    a.send(null)
//}
//function createCookie(d, f, a, l, e, h) {
//    var b = new Date();
//    b.setTime(b.getTime());
//    if (a) {
//        a = a * 1000 * 60 * 60 * 24
//    }
//    var g = new Date(b.getTime() + (a));
//    document.cookie = d + "=" + escape(f) + ((a) ? ";expires=" + g.toGMTString() : "") + ((l) ? ";path=" + l : "") + ((e) ? ";domain=" + e : "") + ((h) ? ";secure" : "")
//}
//function readCookie(d) {
//    var e = document.cookie.indexOf(d + "=");
//    var a = e + d.length + 1;
//    if ((!e) && (d != document.cookie.substring(0, d.length))) {
//        return null
//    }
//    if (e == -1) {
//        return null
//    }
//    var b = document.cookie.indexOf(";", a);
//    if (b == -1) {
//        b = document.cookie.length
//    }
//    return unescape(document.cookie.substring(a, b))
//}
//function deleteCookie(a, d, b) {
//    if (readCookie(a)) {
//        document.cookie = a + "=" + ((d) ? ";path=" + d : "") + ((b) ? ";domain=" + b : "") + ";expires=Thu, 01-Jan-1970 00:00:01 GMT"
//    }
//}
//function getDomainName() {
//    var b = window.location.hostname.split(".");
//    if (b.length >= 2) {
//        var a = b.length;
//        var d = "." + b[a - 2] + "." + b[a - 1]
//    } else {
//        var d = "." + window.location.hostname
//    }
//    return d
//}
//function ciWidgetspopup(b, a) {
//    var b = $(b);
//    var d = b.offset();
//    if ($.browser.msie) {
//        $("#" + a).css({
//            left: (d.left + (-547)) + "px",
//            top: (d.top + (-369)) + "px",
//            display: "block"
//        })
//    } else {
//        $("#" + a).css({
//            left: (d.left + (-547)) + "px",
//            top: (d.top + (-361)) + "px",
//            display: "block"
//        })
//    }
//    return false
//}
//function ciWidgetspopupclose(a) {
//    $("#" + a).css("display", "none")
//}
//function ciHomePanel(a) {
//    if (a == "news") {
//        $("#ciHomeNewsTab > a").css("color", "#074377");
//        $("#ciHomeVideoTab > a").css("color", "#c2e1fe");
//        $("#ciHomeTabNav").css("backgroundPosition", "0px 0px");
//        $("#ciNewsPnl").css("display", "block");
//        $("#ciVideoPnl").css("display", "none");
//        var b = document.getElementById("vidIFrame");
//        if (b && b.contentWindow.pause) {
//            b.contentWindow.pause()
//        }
//    }
//    if (a == "video") {
//        $("#ciHomeNewsTab > a").css("color", "#c2e1fe");
//        $("#ciHomeVideoTab > a").css("color", "#074377");
//        $("#ciHomeTabNav").css("backgroundPosition", "-219px 0px");
//        $("#ciNewsPnl").css("display", "none");
//        $("#ciVideoPnl").css("display", "block");
//        lnkTrackVals("vdo:video tab");
//        var b = document.getElementById("vidIFrame");
//        if (b && b.contentWindow.play) {
//            b.contentWindow.play()
//        }
//    }
//}
//function toggleBoxTab(b) {
//    var a = document.getElementsByTagName("li");
//    for (i = 0; i < a.length; i++) {
//        if (a[i].id.indexOf(b) == 0) {
//            if (a[i].id == b + c) {} else {}
//        }
//    }
//}
//function showBoxDiv(d, a) {
//    var b = document.getElementsByTagName("div");
//    for (i = 0; i < b.length; i++) {
//        if (b[i].id.indexOf(d) == 0) {
//            if (b[i].id == a) {
//                if (1) {
//                    b[i].style.display = "block";
//                    b[i].style.visibility = "visible";
//                    b[i].style.height = ""
//                } else {
//                    if (document.layers) {
//                        document.layers[b[i]].display = "visible"
//                    } else {
//                        document.all.divs[i].visibility = "visible"
//                    }
//                }
//            } else {
//                if (1) {
//                    b[i].style.display = "none";
//                    b[i].style.visibility = "hidden";
//                    b[i].style.height = "0px"
//                } else {
//                    if (document.layers) {
//                        document.divs[i].visibility = "hidden"
//                    } else {
//                        document.all.divs[i].visibility = "hidden"
//                    }
//                }
//            }
//        }
//    }
//}
//function swapTb(a) {
//    for (i = 1; i <= 3; i++) {
//        $("#lsTab" + i).attr("className", "lsTbTxt");
//        $("#tbCont" + i).css("display", "none")
//    }
//    $("#" + a).attr("className", "lsTbTxt1");
//    if (a == "lsTab1") {
//        $("#lsTabBar").css("background-position", "0px -30px");
//        $("#tbCont1").css("display", "block")
//    }
//    if (a == "lsTab2") {
//        $("#lsTabBar").css("background-position", "-314px -30px");
//        $("#tbCont2").css("display", "block")
//    }
//    if (a == "lsTab3") {
//        $("#lsTabBar").css("background-position", "-628px -30px");
//        $("#tbCont3").css("display", "block")
//    }
//}
//function rsltswapTb(a) {
//    for (i = 1; i <= 2; i++) {
//        $("#rsTab" + i).attr("className", "rsltTbTxt");
//        $("#rstbCont" + i).css("display", "none")
//    }
//    $("#" + a).attr("className", "rsltTbTxt1");
//    if (a == "rsTab1") {
//        $("#rsltTabBar").css("background-position", "-2320px -23px");
//        $("#rstbCont1").css("display", "block")
//    }
//    if (a == "rsTab2") {
//        $("#rsltTabBar").css("background-position", "-2635px -23px");
//        $("#rstbCont2").css("display", "block")
//    }
//}
//var image_path = "http://i.imgci.com/espncricinfo/";
//var image_up = "gryUpArw.gif";
//var image_down = "menuBlckArow.gif";
//var image_none = "gryUpArw.gif";
//var europeandate = true;
//var alternate_row_colors = true;
//addEvent(window, "load", sortables_init);
//var SORT_COLUMN_INDEX;
//var thead = false;

//function sortables_init() {
//    if (!document.getElementsByTagName) {
//        return
//    }
//    tbls = document.getElementsByTagName("table");
//    for (ti = 0; ti < tbls.length; ti++) {
//        thisTbl = tbls[ti];
//        if (((" " + thisTbl.className + " ").indexOf("sortable") != -1) && (thisTbl.id)) {
//            ts_makeSortable(thisTbl)
//        }
//    }
//}
//function ts_makeSortable(e) {
//    if (e.rows && e.rows.length > 0) {
//        if (e.tHead && e.tHead.rows.length > 0) {
//            var f = e.tHead.rows[e.tHead.rows.length - 1];
//            thead = true
//        } else {
//            var f = e.rows[0]
//        }
//    }
//    if (!f) {
//        return
//    }
//    for (var d = 0; d < f.cells.length; d++) {
//        var b = f.cells[d];
//        var a = ts_getInnerText(b);
//        if (b.className != "unsortable" && b.className.indexOf("unsortable") == -1) {
//            b.innerHTML = '<a href="#" class="head" onclick="ts_resortTable(this, ' + d + ');return false;">' + a + '<span class="sortarrow">&nbsp;&nbsp;<img border="0" src="' + image_path + image_none + '" alt="&darr;" align="absmiddle" hspace="5"/></span></a>'
//        }
//    }
//    if (alternate_row_colors) {
//        alternate(e)
//    }
//}
//function ts_getInnerText(e) {
//    if (typeof e == "string") {
//        return e
//    }
//    if (typeof e == "undefined") {
//        return e
//    }
//    if (e.innerText) {
//        return e.innerText
//    }
//    var f = "";
//    var d = e.childNodes;
//    var a = d.length;
//    for (var b = 0; b < a; b++) {
//        switch (d[b].nodeType) {
//        case 1:
//            f += ts_getInnerText(d[b]);
//            break;
//        case 3:
//            f += d[b].nodeValue;
//            break
//        }
//    }
//    return f
//}
//function ts_resortTable(h, m) {
//    var o;
//    for (var r = 0; r < h.childNodes.length; r++) {
//        if (h.childNodes[r].tagName && h.childNodes[r].tagName.toLowerCase() == "span") {
//            o = h.childNodes[r]
//        }
//    }
//    var a = ts_getInnerText(o);
//    var b = h.parentNode;
//    var d = m || b.cellIndex;
//    var q = getParent(b, "TABLE");
//    if (q.rows.length <= 1) {
//        return
//    }
//    var l = "";
//    var f = 0;
//    while (l == "" && f < q.tBodies[0].rows.length) {
//        var l = ts_getInnerText(q.tBodies[0].rows[f].cells[d]);
//        l = trim(l);
//        if (l.substr(0, 4) == "<!--" || l.length == 0) {
//            l = ""
//        }
//        f++
//    }
//    if (l == "") {
//        return
//    }
//    sortfn = ts_sort_caseinsensitive;
//    if (l.match(/^\d\d[\/\.-][a-zA-z][a-zA-Z][a-zA-Z][\/\.-]\d\d\d\d$/)) {
//        sortfn = ts_sort_date
//    }
//    if (l.match(/^\d\d[\/\.-]\d\d[\/\.-]\d\d\d{2}?$/)) {
//        sortfn = ts_sort_date
//    }
//    if (l.match(/^-?[�$�ۢ�]\d/)) {
//        sortfn = ts_sort_numeric
//    }
//    if (l.match(/^-?(\d+[,\.]?)+(E[-+][\d]+)?%?$/)) {
//        sortfn = ts_sort_numeric
//    }
//    SORT_COLUMN_INDEX = d;
//    var e = new Array();
//    var g = new Array();
//    for (k = 0; k < q.tBodies.length; k++) {
//        for (f = 0; f < q.tBodies[k].rows[0].length; f++) {
//            e[f] = q.tBodies[k].rows[0][f]
//        }
//    }
//    for (k = 0; k < q.tBodies.length; k++) {
//        if (!thead) {
//            for (j = 1; j < q.tBodies[k].rows.length; j++) {
//                g[j - 1] = q.tBodies[k].rows[j]
//            }
//        } else {
//            for (j = 0; j < q.tBodies[k].rows.length; j++) {
//                g[j] = q.tBodies[k].rows[j]
//            }
//        }
//    }
//    g.sort(sortfn);
//    if (o.getAttribute("sortdir") == "down") {
//        ARROW = '&nbsp;&nbsp;<img border="0" src="' + image_path + image_down + '" alt="&darr;" align="absmiddle" hspace="5"/>';
//        g.reverse();
//        o.setAttribute("sortdir", "up")
//    } else {
//        ARROW = '&nbsp;&nbsp;<img border="0" src="' + image_path + image_up + '" alt="&uarr;" align="absmiddle" hspace="5"/>';
//        o.setAttribute("sortdir", "down")
//    }
//    for (f = 0; f < g.length; f++) {
//        if (!g[f].className || (g[f].className && (g[f].className.indexOf("sortbottom") == -1))) {
//            q.tBodies[0].appendChild(g[f])
//        }
//    }
//    for (f = 0; f < g.length; f++) {
//        if (g[f].className && (g[f].className.indexOf("sortbottom") != -1)) {
//            q.tBodies[0].appendChild(g[f])
//        }
//    }
//    var n = document.getElementsByTagName("span");
//    for (var r = 0; r < n.length; r++) {
//        if (n[r].className == "sortarrow") {
//            if (getParent(n[r], "table") == getParent(h, "table")) {
//                n[r].innerHTML = '&nbsp;&nbsp;<img border="0" src="' + image_path + image_none + '" alt="&darr;" align="absmiddle" hspace="5"/>'
//            }
//        }
//    }
//    o.innerHTML = ARROW;
//    alternate(q)
//}
//function getParent(b, a) {
//    if (b == null) {
//        return null
//    } else {
//        if (b.nodeType == 1 && b.tagName.toLowerCase() == a.toLowerCase()) {
//            return b
//        } else {
//            return getParent(b.parentNode, a)
//        }
//    }
//}
//function sort_date(b) {
//    dt = "00000000";
//    if (b.length == 11) {
//        mtstr = b.substr(3, 3);
//        mtstr = mtstr.toLowerCase();
//        switch (mtstr) {
//        case "jan":
//            var a = "01";
//            break;
//        case "feb":
//            var a = "02";
//            break;
//        case "mar":
//            var a = "03";
//            break;
//        case "apr":
//            var a = "04";
//            break;
//        case "may":
//            var a = "05";
//            break;
//        case "jun":
//            var a = "06";
//            break;
//        case "jul":
//            var a = "07";
//            break;
//        case "aug":
//            var a = "08";
//            break;
//        case "sep":
//            var a = "09";
//            break;
//        case "oct":
//            var a = "10";
//            break;
//        case "nov":
//            var a = "11";
//            break;
//        case "dec":
//            var a = "12";
//            break
//        }
//        dt = b.substr(7, 4) + a + b.substr(0, 2);
//        return dt
//    } else {
//        if (b.length == 10) {
//            if (europeandate == false) {
//                dt = b.substr(6, 4) + b.substr(0, 2) + b.substr(3, 2);
//                return dt
//            } else {
//                dt = b.substr(6, 4) + b.substr(3, 2) + b.substr(0, 2);
//                return dt
//            }
//        } else {
//            if (b.length == 8) {
//                yr = b.substr(6, 2);
//                if (parseInt(yr) < 50) {
//                    yr = "20" + yr
//                } else {
//                    yr = "19" + yr
//                }
//                if (europeandate == true) {
//                    dt = yr + b.substr(3, 2) + b.substr(0, 2);
//                    return dt
//                } else {
//                    dt = yr + b.substr(0, 2) + b.substr(3, 2);
//                    return dt
//                }
//            }
//        }
//    }
//    return dt
//}
//function ts_sort_date(e, d) {
//    dt1 = sort_date(ts_getInnerText(e.cells[SORT_COLUMN_INDEX]));
//    dt2 = sort_date(ts_getInnerText(d.cells[SORT_COLUMN_INDEX]));
//    if (dt1 == dt2) {
//        return 0
//    }
//    if (dt1 < dt2) {
//        return -1
//    }
//    return 1
//}
//function ts_sort_numeric(e, d) {
//    var f = ts_getInnerText(e.cells[SORT_COLUMN_INDEX]);
//    f = clean_num(f);
//    var g = ts_getInnerText(d.cells[SORT_COLUMN_INDEX]);
//    g = clean_num(g);
//    return compare_numeric(f, g)
//}
//function compare_numeric(e, d) {
//    var e = parseFloat(e);
//    e = (isNaN(e) ? 0 : e);
//    var d = parseFloat(d);
//    d = (isNaN(d) ? 0 : d);
//    return e - d
//}
//function ts_sort_caseinsensitive(e, d) {
//    aa = ts_getInnerText(e.cells[SORT_COLUMN_INDEX]).toLowerCase();
//    bb = ts_getInnerText(d.cells[SORT_COLUMN_INDEX]).toLowerCase();
//    if (aa == bb) {
//        return 0
//    }
//    if (aa < bb) {
//        return -1
//    }
//    return 1
//}
//function ts_sort_default(e, d) {
//    aa = ts_getInnerText(e.cells[SORT_COLUMN_INDEX]);
//    bb = ts_getInnerText(d.cells[SORT_COLUMN_INDEX]);
//    if (aa == bb) {
//        return 0
//    }
//    if (aa < bb) {
//        return -1
//    }
//    return 1
//}
//function addEvent(f, e, b, a) {
//    if (f.addEventListener) {
//        f.addEventListener(e, b, a);
//        return true
//    } else {
//        if (f.attachEvent) {
//            var d = f.attachEvent("on" + e, b);
//            return d
//        } else {
//            alert("Handler could not be removed")
//        }
//    }
//}
//function clean_num(a) {
//    a = a.replace(new RegExp(/[^-?0-9.]/g), "");
//    return a
//}
//function trim(a) {
//    return a.replace(/^\s+|\s+$/g, "")
//}
//function alternate(f) {
//    var d = f.getElementsByTagName("tbody");
//    for (var b = 0; b < d.length; b++) {
//        var e = d[b].getElementsByTagName("tr");
//        for (var a = 0; a < e.length; a++) {
//            if ((a % 2) == 0) {
//                if (!(e[a].className.indexOf("odd") == -1)) {
//                    e[a].className = e[a].className.replace("odd", "even")
//                } else {
//                    if (e[a].className.indexOf("even") == -1) {
//                        e[a].className += " even"
//                    }
//                }
//            } else {
//                if (!(e[a].className.indexOf("even") == -1)) {
//                    e[a].className = e[a].className.replace("even", "odd")
//                } else {
//                    if (e[a].className.indexOf("odd") == -1) {
//                        e[a].className += " odd"
//                    }
//                }
//            }
//        }
//    }
//}
//function ciFixtutetooltip(b, a) {
//    $(".fixTooltip").hide();
//    var b = $(b);
//    var d = b.offset();
//    $("#" + a).css({
//        left: (d.left + (25)) + "px",
//        top: (d.top + (8)) + "px",
//        display: "block"
//    })
//}
//function ciFixtutetooltipclose(a) {
//    $("#" + a).css("display", "none")
//}
//viewport = {
//    getWinWidth: function () {
//        this.width = 0;
//        if (window.innerWidth) {
//            this.width = window.innerWidth - 18
//        } else {
//            if (document.documentElement && document.documentElement.clientWidth) {
//                this.width = document.documentElement.clientWidth
//            } else {
//                if (document.body && document.body.clientWidth) {
//                    this.width = document.body.clientWidth
//                }
//            }
//        }
//    },
//    getWinHeight: function () {
//        this.height = 0;
//        if (window.innerHeight) {
//            this.height = window.innerHeight - 18
//        } else {
//            if (document.documentElement && document.documentElement.clientHeight) {
//                this.height = document.documentElement.clientHeight
//            } else {
//                if (document.body && document.body.clientHeight) {
//                    this.height = document.body.clientHeight
//                }
//            }
//        }
//    },
//    getScrollX: function () {
//        this.scrollX = 0;
//        if (typeof window.pageXOffset == "number") {
//            this.scrollX = window.pageXOffset
//        } else {
//            if (document.documentElement && document.documentElement.scrollLeft) {
//                this.scrollX = document.documentElement.scrollLeft
//            } else {
//                if (document.body && document.body.scrollLeft) {
//                    this.scrollX = document.body.scrollLeft
//                } else {
//                    if (window.scrollX) {
//                        this.scrollX = window.scrollX
//                    }
//                }
//            }
//        }
//    },
//    getScrollY: function () {
//        this.scrollY = 0;
//        if (typeof window.pageYOffset == "number") {
//            this.scrollY = window.pageYOffset
//        } else {
//            if (document.documentElement && document.documentElement.scrollTop) {
//                this.scrollY = document.documentElement.scrollTop
//            } else {
//                if (document.body && document.body.scrollTop) {
//                    this.scrollY = document.body.scrollTop
//                } else {
//                    if (window.scrollY) {
//                        this.scrollY = window.scrollY
//                    }
//                }
//            }
//        }
//    },
//    getAll: function () {
//        this.getWinWidth();
//        this.getWinHeight();
//        this.getScrollX();
//        this.getScrollY()
//    }
//};
//var menuLayers = {
//    timer: null,
//    activeMenuID: null,
//    offX: 4,
//    offY: 0,
//    show: function (d, b) {
//        var a = document.getElementById ? document.getElementById(d) : null;
//        if (!a) {
//            return
//        }
//        this.activeMenuID = d;
//        if (a.onmouseout == null) {
//            a.onmouseout = this.mouseoutCheck
//        }
//        if (a.onmouseover == null) {
//            a.onmouseover = this.clearTimer
//        }
//        viewport.getAll();
//        this.position(a, b)
//    },
//    hide: function () {
//        this.clearTimer();
//        if (this.activeMenuID && document.getElementById) {
//            this.timer = setTimeout("$('#'+'" + menuLayers.activeMenuID + "').css('visibility','hidden')", 200)
//        }
//    },
//    position: function (b, d) {
//        var a = d.pageX ? d.pageX : d.clientX + viewport.scrollX;
//        var f = d.pageY ? d.pageY : d.clientY + viewport.scrollY;
//        if (a + b.offsetWidth + this.offX > viewport.width + viewport.scrollX) {
//            a = a - b.offsetWidth - this.offX
//        } else {
//            a = a + this.offX
//        }
//        if (f + b.offsetHeight + this.offY > viewport.height + viewport.scrollY) {
//            f = (f - b.offsetHeight - this.offY > viewport.scrollY) ? f - b.offsetHeight - this.offY : viewport.height + viewport.scrollY - b.offsetHeight
//        } else {
//            f = f + this.offY
//        }
//        b.style.left = a + "px";
//        b.style.top = f + "px";
//        this.timer = setTimeout("$('#'+'" + menuLayers.activeMenuID + "').css('visibility','visible')", 200)
//    },
//    mouseoutCheck: function (d) {
//        d = d ? d : window.event;
//        var b = $("#" + menuLayers.activeMenuID);
//        var a = d.relatedTarget ? d.relatedTarget : d.toElement;
//        if (b != a && !menuLayers.contained(a, b)) {
//            menuLayers.hide()
//        }
//    },
//    contained: function (b, a) {
//        if (!b) {
//            return
//        }
//        while (b = b.parentNode) {
//            if (b == a) {
//                return true
//            }
//        }
//        return false
//    },
//    clearTimer: function () {
//        if (menuLayers.timer) {
//            clearTimeout(menuLayers.timer)
//        }
//    }
//};
//this.meetstsguru = function () {
//    var b = 1;
//    var a = "meetstsguru";
//    this.start = function () {
//        var e = document.getElementsByTagName("ul");
//        for (var d = 0; d < e.length; d++) {
//            if (e[d].className == a) {
//                create(e[d]);
//                buttons(e[d])
//            }
//        }
//    };
//    this.create = function (f) {
//        var d = f.getElementsByTagName("li");
//        for (var e = 0; e < d.length; e++) {
//            listItem(d[e])
//        }
//    };
//    this.listItem = function (d) {
//        if (d.getElementsByTagName("ul").length > 0) {
//            var e = d.getElementsByTagName("ul")[0];
//            e.style.display = (depth(e) <= b) ? "block" : "none";
//            d.className = (depth(e) <= b) ? "expanded" : "collapsed";
//            d.over = true;
//            e.onmouseover = function () {
//                d.over = false
//            };
//            e.onmouseout = function () {
//                d.over = true
//            };
//            d.onclick = function () {
//                if (this.over) {
//                    e.style.display = (e.style.display == "none") ? "block" : "none";
//                    this.className = (e.style.display == "none") ? "collapsed" : "expanded"
//                }
//            }
//        }
//    };
//    this.buttons = function (f) {
//        var e = f.parentNode;
//        var d = document.createElement("span");
//        d.innerHTML = expandText;
//        d.onclick = function () {
//            expand(f)
//        };
//        p.appendChild(d);
//        var d = document.createElement("span");
//        d.innerHTML = collapseText;
//        d.onclick = function () {
//            collapse(f)
//        };
//        p.appendChild(d);
//        e.insertBefore(p, f)
//    };
//    this.expand = function (e) {
//        var d = d[i].getElementsByTagName("li")[0];
//        d.style.display = "block"
//    };
//    this.collapse = function (e) {
//        var d = d[i].getElementsByTagName("li")[0];
//        d.style.display = "none"
//    };
//    this.depth = function (d) {
//        var e = 1;
//        while (d.parentNode.className != a) {
//            if (d.tagName == "UL") {
//                e++
//            }
//            d = d.parentNode
//        }
//        return e
//    }
//};
//window.onload = meetstsguru;

//function disableSelect(d, a) {
//    var b = document.getElementsByTagName("select");
//    for (i = 0; i < b.length; i++) {
//        if (b[i].id.indexOf(d) == 0) {
//            if (b[i].id == a) {
//                b[i].disabled = false
//            } else {
//                b[i].disabled = true
//            }
//        }
//    }
//}
//function disableDivInputs(e, a) {
//    var d = document.getElementsByTagName("div");
//    for (i = 0; i < d.length; i++) {
//        if (d[i].id.indexOf(e) == 0) {
//            var b = d[i].getElementsByTagName("input");
//            for (j = 0; j < b.length; j++) {
//                if (d[i].id == a) {
//                    b[j].disabled = false
//                } else {
//                    b[j].disabled = true
//                }
//            }
//        }
//    }
//}
//function guruStart() {
//    if (document.analysis) {
//        if (typeof(analysisfocus) != "undefined") {
//            if (analysisfocus) {
//                document.analysis.search.focus()
//            }
//        }
//    }
//    guruViewChange()
//}
//function guruViewChange() {
//    if (document.gurumenu) {
//        var b = document.getElementsByTagName("div");
//        typeval = document.gurumenu.type.value;
//        if (typeof(typeval) == "undefined") {
//            for (i = 0; i < document.gurumenu.type.length; i++) {
//                if (document.gurumenu.type[i].checked) {
//                    typeval = document.gurumenu.type[i].value
//                }
//            }
//        }
//        showBoxDiv("viewdiv_", "viewdiv_" + typeval);
//        disableDivInputs("viewdiv_", "viewdiv_" + typeval);
//        var a;
//        for (i = 0; i < document.gurumenu.view.length; i++) {
//            if (document.gurumenu.view[i].checked && !document.gurumenu.view.disabled) {
//                a = document.gurumenu.view[i].value
//            }
//        }
//        if (typeof(a) == "undefined") {
//            for (i = 0; i < document.gurumenu.view.length; i++) {
//                if (document.gurumenu.view[i].value == "") {
//                    document.gurumenu.view[i].checked = true;
//                    a = ""
//                }
//            }
//        }
//        if (a == "" || a == "extras") {
//            if (document.gurumenu.groupby) {
//                document.gurumenu.groupby.disabled = false
//            }
//        } else {
//            if (document.gurumenu.groupby) {
//                document.gurumenu.groupby.selectedIndex = 0;
//                document.gurumenu.groupby.disabled = true
//            }
//        }
//        if (a == "") {
//            a = "default"
//        }
//        showBoxDiv("havingdiv_", "havingdiv_" + typeval + "_" + a);
//        disableSelect("havingselect_", "havingselect_" + typeval + "_" + a);
//        showBoxDiv("orderbydiv_", "orderbydiv_" + typeval + "_" + a);
//        disableSelect("orderbyselect_", "orderbyselect_" + typeval + "_" + a)
//    }
//}
//function page_validate(thisform, limit) {
//    with(thisform) {
//        with(page) {
//            if (value == null || !value.match(/^\d+$/)) {
//                alert('illegal "Go to page" value');
//                focus();
//                return false
//            } else {
//                if (value < 1 || value > limit) {
//                    alert('"Go to page" value must be between 1 and ' + limit);
//                    focus();
//                    return false
//                } else {
//                    return true
//                }
//            }
//        }
//    }
//}
//function openS(a, b) {
//    window.open(a, b, "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,titlebar=0,width=540,height=490");
//    if (openS.opener == null) {
//        openS.opener = window
//    }
//    openS.opener.name = "opener"
//}
//function openDesktop(a, b) {
//    window.open(a, b, "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=340,height=287,left=0,top=0");
//    if (openDesktop.opener == null) {
//        openDesktop.opener = window
//    }
//    openDesktop.opener.name = "opener"
//}
//first = 1;
//galfirst = 1;
//walfirst = 1;
//scrsvrfirst = 1;
//last = 10;
//gallast = 10;
//wallast = 10;
//scrsvrlast = 10;
//current = 1;
//galcurrent = 1;
//walcurrent = 1;
//scrsvrcurrent = 1;

//function nextPicture() {
//    object = $("#ptsGalslide" + current);
//    object.css("display", "none");
//    if (current == last) {
//        current = 1
//    } else {
//        current++
//    }
//    object = $("#ptsGalslide" + current);
//    object.css("display", "block")
//}
//function previousPicture() {
//    object = $("#ptsGalslide" + current);
//    object.css("display", "none");
//    if (current == first) {
//        current = last
//    } else {
//        current--
//    }
//    object = $("#ptsGalslide" + current);
//    object.css("display", "block")
//}
//function nextGalslide() {
//    object = $("#Galslide" + galcurrent);
//    object.css("display", "none");
//    if (galcurrent == gallast) {
//        galcurrent = 1
//    } else {
//        galcurrent++
//    }
//    object = $("#Galslide" + galcurrent);
//    object.css("display", "block")
//}
//function previousGalslide() {
//    object = $("#Galslide" + galcurrent);
//    object.css("display", "none");
//    if (galcurrent == galfirst) {
//        galcurrent = gallast
//    } else {
//        galcurrent--
//    }
//    object = $("#Galslide" + galcurrent);
//    object.css("display", "block")
//}
//function nextWalpaper() {
//    object = $("#walPaperslide" + walcurrent);
//    object.css("display", "none");
//    if (walcurrent == wallast) {
//        walcurrent = 1
//    } else {
//        walcurrent++
//    }
//    object = $("#walPaperslide" + walcurrent);
//    object.css("display", "block")
//}
//function previousWalpaper() {
//    object = $("#walPaperslide" + walcurrent);
//    object.css("display", "none");
//    if (walcurrent == walfirst) {
//        walcurrent = wallast
//    } else {
//        walcurrent--
//    }
//    object = $("#walPaperslide" + walcurrent);
//    object.css("display", "block")
//}
//function nextScreensvr() {
//    scrobject = $("#screenSvrslide" + scrsvrcurrent);
//    scrobject.css("display", "none");
//    if (scrsvrcurrent == scrsvrlast) {
//        scrsvrcurrent = 1
//    } else {
//        scrsvrcurrent++
//    }
//    scrobject = $("#screenSvrslide" + scrsvrcurrent);
//    scrobject.css("display", "block")
//}
//function previousScreensvr() {
//    scrobject = $("#screenSvrslide" + scrsvrcurrent);
//    scrobject.css("display", "none");
//    if (scrsvrcurrent == scrsvrfirst) {
//        scrsvrcurrent = scrsvrlast
//    } else {
//        scrsvrcurrent--
//    }
//    scrobject = $("#screenSvrslide" + scrsvrcurrent);
//    scrobject.css("display", "block")
//}
//function loadImages(b) {
//    var a = [];
//    $.each($(b + " img"), function (e, d) {
//        if (!$(d).attr("src") || $(d).attr("src") == "") {
//            a.push(d)
//        }
//    });
//    $(a).each(function (d, e) {
//        $(this).attr("src", $(this).attr("longdesc"))
//    })
//};
