﻿document.domain = "jinti.com";
(function (bool) {
    var html;
    if (bool) {
        html = window.HTMLElement.prototype;
        window.__defineGetter__("event", function () {
            var o = arguments.callee;
            do {
                if (o.arguments[0] instanceof Event) return o.arguments[0];
            } while (o = o.caller);
            return null;
        });
        Event.prototype.__defineGetter__("fromElement", function () {
            return this.relatedTarget;
        });
        html.contains = function (o) {
            do {
                if (o == this) return true;
            } while (o = o.parentNode);
            return false;
        };
    }
})(/Firefox/.test(window.navigator.userAgent));

//function setTimeSubmit() {
//    setTimeout("doSubmit()", 1);
//}

//function doSubmit() {
//    var searchForm = document.getElementById("searchForm");
//    if (searchForm) searchForm.submit();
//}

function searchFormSubmit(formname) {
    setTimeout(document.forms[formname].submit(), 1);
}

function showInfo(obj) {
    if (obj) {
        if (obj.childNodes.length > 1) {
            obj.childNodes[0].childNodes[0].className = "hid";
            obj.childNodes[1].childNodes[0].className = "testP";
        }
    }
}

function hidInfo(obj) {
    if (obj) {
        obj.onmouseout = function () {
            var dvBox = this, e = window.event;
            if (!dvBox.contains(e.toElement || e.fromElement)) {
                if (dvBox.childNodes.length > 1) {
                    dvBox.childNodes[0].childNodes[0].className = "";
                    dvBox.childNodes[1].childNodes[0].className = "testP hid";
                }
            }
        }
    }
};

function jWinOpen(Channel, ItemID, Category, AreaID, RequestURL, ItemTitle) {
    var pWidth=504;
    var src = "/shenghuofuwu/AntiSpam/AntiSpamList.asp?Channel=" + parseInt(Channel) + "&ItemID=" + parseInt(ItemID) + "&Category=" + parseInt(Category) + "&AreaID=" + parseInt(AreaID) + "&RequestURL=" + encodeURIComponent(RequestURL) + "&ItemTitle=" + ItemTitle.replace("&", "");
    jTools.win.Tip.open("<iframe src='" + src + "' id='TipIframe' width='" + pWidth + "'  marginwidth='0' marginheight='0' scrolling='no' align='center' border='0' frameborder='0'></iframe>", "" + pWidth + "px", "");
}
function WinClose() {
    if (null != jTools.win.TipWin.obj) {
        try {
            jTools.win.Tip.close();
        }
        catch (e) {
            ;
        }
    }
}

function CallBack_TipIframe(h) {
    h = parseInt(h);
    document.getElementById("TipIframe").style.height = h + "px";
    jTools.win.TipWin.obj.onresize();
};

function jWinOpen2() {
    var pWidth = 504;
    var src = "/shenghuofuwu/AntiSpam/AntiSpamList.asp?Channel=" + parseInt(Channel) + "&ItemID=" + parseInt(ItemID) + "&Category=" + parseInt(Category) + "&AreaID=" + parseInt(AreaID) + "&RequestURL=" + encodeURIComponent(RequestURL) + "&ItemTitle=" + ItemTitle.replace("&", "");
    jTools.win.Tip.open("<iframe src='" + src + "' id='TipIframe' width='" + pWidth + "'  marginwidth='0' marginheight='0' scrolling='no' align='center' border='0' frameborder='0'></iframe>", "" + pWidth + "px", "");
}
