//----JavaScript Document(是(shi)定(ding)義(yi)編(bian)輯(ji)、預(yu)覽(lan)、正(zheng)常(chang)瀏(liu)覽(lan)模(mu)式(shi)下(xia)共(gong)同(tong)使(shi)用(yong)輸(shu)出(chu))----
//----JavaScript Document(是(shi)定(ding)義(yi)可(ke)視(shi)化(hua)編(bian)輯(ji)器(qi)模(mu)式(shi)下(xia)輸(shu)出(chu))----
///處(chu)理(li)詳(xiang)細(xi)模(mu)塊(kuai)的(di)高(gao)度(duo)
$.PluginInfoViewHeight = function (o) {
$(window).load(function () {
o.c = $("#" + o.curr); o.t = $("#" + o.currtop);
o.c.height = o.c.length ? o.c.outerHeight(true) : 0;
o.t.h = o.t.length ? o.t.height() : 0;
o.t.height(o.t.h < o.c.height ? o.c.height : o.t.h);
o.cr = o.containerid.split(","); o.ar = o.areakey.split(",");
o.d = o.c.height - o.t.h;
o.cr.forEach(function (cri) {
o.crt = $("#" + cri);
if (o.crt.length > 0) {
o.crt.height(o.d > 0 ? o.d + o.crt.height() : o.crt.height());
}
if (cri.indexOf("_proot")<0) {
o.crt.ms = o.crt.find("div[data-type]");
o.crt.ms.each(function () {
if ($(this).offset().top - o.crt.offset().top > o.c.offset().top) {
$(this).css("top", $(this).offset().top - o.crt.offset().top + o.d);
}
});
}
});
o.ar.forEach(function (ari) {
o.crt = $("#" + ari);
if (o.crt.length > 0) {
o.crt.height(o.d > 0 ? o.d + o.crt.height() : o.crt.height());
}
});
});
}
// 設(she)置(zhi)為(wei)主(zhu)頁(ye)
$.SetHome=function(obj, vrl) {
try {
obj.style.behavior = 'url(#default#homepage)'; obj.setHomePage(vrl);
}
catch (e) {
if (window.netscape) {
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
}
catch (e) {
alert("此(ci)操(cao)作(zuo)被(bei)瀏(liu)覽(lan)器(qi)拒(ju)絕(jue)!\n請(qing)在(zai)瀏(liu)覽(lan)器(qi)地(de)址(zhi)欄(lan)輸(shu)入(ru)“about:config”並(bing)回(hui)車(ju)\n然(ran)後(hou)將(qiang) [signed.applets.codebase_principal_support]的(di)值(zhi)設(she)置(zhi)為(wei)'true',雙(shuang)擊(ji)即(ji)可(ke)。");
}
var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
prefs.setCharPref('browser.startup.homepage', vrl);
} else {
alert("您(nin)的(di)瀏(liu)覽(lan)器(qi)不(bu)支(zhi)持(chi),請(qing)按(an)照(zhao)下(xia)麵(mian)步(bu)驟(zhou)操(cao)作(zuo):1.打(da)開(kai)瀏(liu)覽(lan)器(qi)設(she)置(zhi)。2.點(dian)擊(ji)設(she)置(zhi)網(wang)頁(ye)。3.輸(shu)入(ru):" + vrl + "點(dian)擊(ji)確(que)定(ding)。");
}
}
}
// 加(jia)入(ru)收(shou)藏(zang) 兼(jian)容(rong)360和(hu)IE6
$.shoucang =function (sTitle, sURL) {
try {
window.external.addFavorite(sURL, sTitle);
}
catch (e) {
try {
window.sidebar.addPanel(sTitle, sURL, "");
}
catch (e) {
alert("加(jia)入(ru)收(shou)藏(zang)失(shi)敗(bai),請(qing)使(shi)用(yong)Ctrl+D進(jin)行(hang)添(tian)加(jia)");
}
}
}
///***異(yi)步(bu)加(jia)載(zai)點(dian)擊(ji)率(shuai)
$.AjaxModelClick = function (modelId) {
window.onload = function () {
$._modelthis = $("div[data-id='" + modelId + "']");
$.ajaxArray = $._modelthis.find("*[ajaxviewid]");
$.ajaxArray.each(function (item) {
$.post("/online_editsite/webjsonhtml_ashx/web_retuenCilckCount.ashx", { modelId: modelId, infoId: $($.ajaxArray[item]).attr("ajaxviewid") }, function (result) {
$($.ajaxArray[item]).html(result);
});
});
}
}