var mnid = 3; var mtid = 0 var mcurrenttextpage = 1; var mtextpagecount = 10; var mcurrentvideopage = 1; var mvideopagecount = 6; var mcurrentaskpage = 1; var maskpagecount = 5; var mcurrentsearchpage = 1; var msearchpagecount = 10; var msearch = ""; var msearchcopy = ""; var msearchnid = 0; var defaultindex = 1007; var afxbool = false; var schoolvideodomainname = "null"; //$(document).ready(function () { // $("#iframevideo").hide(); // mnid = parseint($("#jb_xy_xxk a").attr("nid")); // mtid = parseint($("#jb_xy_xcdk a").attr("tid")); // school.leftmenuclick(mtid); //}); var school = { leftmenuclick: function (tid) { // if (tid == 1009 || tid == 1012 || tid == 1028 || tid == 1029) { // return; // } pagehelp.hideindex(); pagehelp.hidevideo(); pagehelp.hidesearch(); /***/ switch (mnid) { case 1: //$("#jb_xy_xcdk").find(".on").attr("vp", mcurrentvideopage); mcurrentvideopage = $("#idtypeli" + tid).attr("vp"); break; case 2: //$("#jb_xy_xcdk").find(".on").attr("tp", mcurrenttextpage); mcurrenttextpage = $("#idtypeli" + tid).attr("tp"); break; case 3: //$("#jb_xy_xcdk").find(".on").attr("ap", mcurrentaskpage); mcurrentaskpage = $("#idtypeli" + tid).attr("ap"); break; //default: alert("leftmenuclick select default mnid=" + mnid); } /***/ mtid = tid; pageedit.loadtypecss(); school.loadhtml(); school.loadpagenumber(); pageedit.loadpagechangecss(); /* * */ //alert($("#idtypeli" + tid).attr("leves")); //attr("leves") if ($("#idtypeli" + tid).attr("leves") == 2) { var temp = $("#jb_xy_tpk [id='jb_xy_tp_lbb']"); if (temp.length == 1) { temp.eq(0).find('a').trigger("click"); } } /* * */ }, navclick: function (nid) { pagehelp.hideindex(); pagehelp.hidevideo(); pagehelp.hidesearch(); /***/ switch (nid) { case 1: mcurrentvideopage = $("#jb_xy_xcdk").find(".jb_xy_xcdk_x").attr("vp"); break; case 2: mcurrenttextpage = $("#jb_xy_xcdk").find(".jb_xy_xcdk_x").attr("tp"); break; case 3: mcurrentaskpage = $("#jb_xy_xcdk").find(".jb_xy_xcdk_x").attr("ap"); break; // case 4: // $("#jb_xy_ym").show(); // $("#jb_xy_ym").html("1111"); // break; } /***/ mnid = nid; pageedit.loadnavcss(); school.loadhtml(); school.loadpagenumber(); pageedit.loadpagechangecss(); }, searchclick: function (nid) { pagehelp.hideindex(); if (mtid == defaultindex) { dt = helper_aspx.binddatalist(mcurrentaskpage, maskpagecount, mtid, 3, msearch).value; $("#jb_xy_xxk").hide(); $("#jb_xy_tpk").html(pageedit.loadhtmlask(dt)); } else { dt = helper_aspx.binddatalist(mcurrentsearchpage, msearchpagecount, -1, nid, msearch).value; $("#jb_xy_tpk").html(pageedit.loadhtmlsearch(dt)); } school.loadpagenumbersearch(nid); pageedit.loadpagechangecss(); }, indexclick: function () { pagehelp.showindex(); dt = helper_aspx.binddatalist(1, 6, defaultindex, 3, "").value; //pageedit.loadhtmlindex(dt); //wenchao 2014-09-11 首页去除课程建议模块 }, pageclick: function (pages) { //pagenumbers switch (mnid) { //mnid case 1: /***/ $("#jb_xy_xcdk").find(".jb_xy_xcdk_x").attr("vp", pages); //.on左侧菜单样式 /***/ mcurrentvideopage = pages; school.navclick(mnid); break; case 2: /***/ $("#jb_xy_xcdk").find(".jb_xy_xcdk_x").attr("tp", pages); /***/ mcurrenttextpage = pages; school.navclick(mnid); break; case 3: /***/ $("#jb_xy_xcdk").find(".jb_xy_xcdk_x").attr("ap", pages); /***/ mcurrentaskpage = pages; school.navclick(mnid); break; default: alert("pageclick select default"); } $("body,html").animate({ scrolltop: 0 }, 400); }, pageclicksearch: function (pages, nid) { mcurrentsearchpage = pages; school.searchclick(nid); $("body,html").animate({ scrolltop: 0 }, 400); }, pageclickleft: function () { var numberfirest = $("#jb_xy_ym ul").find("a").first().text(); var numberlast = $("#jb_xy_ym ul").find("a").last().text(); var cupage = parseint(numberfirest) - 4; if (cupage <= 0) { cupage = 1; } school.pageclick(cupage); }, pageclickright: function () { afxbool = false; var numberfirest = $("#jb_xy_ym ul").find("a").first().text(); var numberlast = $("#jb_xy_ym ul").find("a").last().text(); var length = 0; switch (mnid) { //mnid case 1: length = helper_aspx.pagechangelist(numberlast, mvideopagecount, mtid, mnid, msearch).value; break; case 2: length = helper_aspx.pagechangelist(numberlast, mtextpagecount, mtid, mnid, msearch).value; break; case 3: length = helper_aspx.pagechangelist(numberlast, maskpagecount, mtid, mnid, msearch).value; break; } if ((numberlast - numberfirest) == 6) { if (length <= 0) { school.pageclick(numberlast); afxbool = true; return; } //alert(length); if (length < 7) { school.pageclick(parseint(numberlast) + parseint(length) - 3) //school.pageclick(parseint(numberlast) + parseint(length)); } else { school.pageclick(parseint(numberfirest) + 9); } } }, pageclickleftsearch: function (nid) { var numberfirest = $("#jb_xy_ym ul").find("a").first().text(); var numberlast = $("#jb_xy_ym ul").find("a").last().text(); var cupage = parseint(numberfirest) - 4; if (cupage <= 0) { cupage = 1; } school.pageclicksearch(cupage, nid); }, pageclickrightsearch: function (nid) { var numberfirest = $("#jb_xy_ym ul").find("a").first().text(); var numberlast = $("#jb_xy_ym ul").find("a").last().text(); var length = 0; length = helper_aspx.pagechangelist(numberlast, msearchpagecount, mtid, nid, msearch).value; if ((numberlast - numberfirest) == 6) { if (length <= 0) { school.pageclicksearch(numberlast, nid); afxbool = true; return; } if (length < 7) { school.pageclicksearch(parseint(numberlast) + parseint(length), nid); } else { school.pageclicksearch(parseint(numberfirest) + 9, nid); } } }, contentup: function (obj) { var newvalue = parseint($(obj).attr("count")) + 1; var result = parseint(helper_aspx.upcontentdefault(parseint($(obj).attr("cid")), newvalue).value); if (result == -3) { var url = '/subpage/login.aspx?isfromhelper=1'; dialog = art.dialog({ content: url, fixed: true, lock: true, padding: 0, height: 378, width: 590, iframe: true, scroll: false }); return; } if (result == 1) $(obj).text("赞( " + (newvalue) + " )").attr("count", newvalue); else { malert("系统提示", "已经踩或赞过", false, 2); } }, contentdown: function (obj) { var newvalue = parseint($(obj).attr("count")) + 1; var result = parseint(helper_aspx.downcontent(parseint($(obj).attr("cid")), newvalue).value); if (result == -3) { var url = '/subpage/login.aspx?isfromhelper=1'; dialog = art.dialog({ content: url, fixed: true, lock: true, padding: 0, height: 378, width: 590, iframe: true, scroll: false }); return; } if (result == 1) $(obj).text("踩( " + (newvalue) + " )").attr("count", newvalue); else { malert("系统提示", "已经踩或赞过", false, 2); } }, contentupvideo: function (obj) { var newvalue = parseint($(obj).attr("count")) + 1; var result = parseint(helper_aspx.upcontentdefault(parseint($(obj).attr("cid")), newvalue).value); if (result == 1) $(obj).html('' + newvalue + "赞").attr("count", newvalue); if (result == -3) { var url = '/subpage/login.aspx?isfromhelper=1'; dialog = art.dialog({ content: url, fixed: true, lock: true, padding: 0, height: 478, width: 590, iframe: true, scroll: false }); return; } if (result == 1) $(obj).text("赞( " + (newvalue) + " )").attr("count", newvalue); else { malert("系统提示", "已经踩或赞过", false, 2); } }, contentdownvideo: function (obj) { var newvalue = parseint($(obj).attr("count")) + 1; var result = parseint(helper_aspx.downcontent(parseint($(obj).attr("cid")), newvalue).value); if (result == 1) $(obj).attr("count", newvalue); if (result == -3) { var url = '/subpage/login.aspx?isfromhelper=1'; dialog = art.dialog({ content: url, fixed: true, lock: true, padding: 0, height: 478, width: 590, iframe: true, scroll: false }); return; } if (result == 1) $(obj).text("赞( " + (newvalue) + " )").attr("count", newvalue); else { malert("系统提示", "已经踩或赞过", false, 2); } //$(obj).text((newvalue) + "踩").attr("count", newvalue).append(""); }, loadhtml: function () { var dt = null; // if (mtid == defaultindex) { mnid = 3; } if (mtid == defaultindex) { // dt = helper_aspx.binddatalist(mcurrenttextpage, mtextpagecount, mtid, 2, msearch).value; // pageedit.loadhtmltext(dt); dt = helper_aspx.binddatalist(mcurrentaskpage, maskpagecount, mtid, mnid, msearch).value; pageedit.loadhtmlask(dt); // $("#jb_xy_xxk").hide(); return; } switch (mnid) { case 1: dt = helper_aspx.binddatalist(mcurrentvideopage, mvideopagecount, mtid, mnid, msearch).value; pageedit.loadhtmlvideo(dt); //$("#jb_xy_tpk").html(pageedit.loadhtmlvideo(dt)); break; case 2: dt = helper_aspx.binddatalist(mcurrenttextpage, mtextpagecount, mtid, mnid, msearch).value; pageedit.loadhtmltext(dt); //$("#jb_xy_tpk").html(pageedit.loadhtmltext(dt)); break; case 3: dt = helper_aspx.binddatalist(mcurrentaskpage, maskpagecount, mtid, mnid, msearch).value; pageedit.loadhtmlask(dt); //$("#jb_xy_tpk").html(pageedit.loadhtmlask(dt)); break; default: $("#jb_xy_tpk").hide(); $("#jb_xy_ym").hide(); //$("#jb_xy_tpk").html("default"); } }, loadpagenumber: function () { if (mtid == defaultindex) { if (isnullorempty($("#jb_xy_tp_lbb").html())) { //$("#jb_xy_ym").html(''); return; // $("#jb_xy_ym").html('暂时没有' + $(".jb_xy_xcdk_x").text() + '文档').css({ "font-size": "18px", "text-align": "center", "padding-top": "35px" }); // $("#jb_xy_tpk").hide(); // return; } //无数据 var length = helper_aspx.pagechangelist(mcurrenttextpage, mtextpagecount, mtid, 2, msearch).value; var start = 1; var endindex = 7; var lastvalue = parseint(mcurrenttextpage) + parseint(length); if (mcurrenttextpage > 4) { start = mcurrenttextpage - 3; endindex = start + 6; if (endindex > lastvalue) { endindex = lastvalue; } } if (start < 7 && endindex > lastvalue) { endindex = lastvalue; } var strv = '
'; $("#jb_xy_ym").html(strv).removeattr("style"); pageedit.loadpagecsstext(); return; } // one item switch (mnid) { //mnid case 1: if (isnullorempty($("#jb_xy_sp").html())) { $("#jb_xy_ym").html('暂时没有' + $(".jb_xy_xcdk_x").text() + '教视频').css({ "font-size": "18px", "text-align": "center", "padding-top": "35px" }); return; } //无数据 var length = helper_aspx.pagechangelist(mcurrentvideopage, mvideopagecount, mtid, mnid, msearch).value; //alert(currentpage + "|" + mvideopagecount + "|" + mtid + "|" + mnid); var start = 1; var endindex = 7; var lastvalue = parseint(mcurrentvideopage) + parseint(length); if (mcurrentvideopage > 4) { start = mcurrentvideopage - 3; endindex = start + 6; if (endindex > lastvalue) { endindex = lastvalue; } } if (start < 7 && endindex > lastvalue) { endindex = lastvalue; } var strv = '
'; $("#jb_xy_ym").html(strv).removeattr("style"); pageedit.loadpagecssvideo(); break; case 2: if (isnullorempty($("#jb_xy_tp_lbb").html())) { //$("#jb_xy_ym").html(''); return; $("#jb_xy_ym").html('暂时没有' + $(".jb_xy_xcdk_x").text() + '文档').css({ "font-size": "18px", "text-align": "center", "padding-top": "35px" }); $("#jb_xy_tpk").hide(); return; } //无数据 var length = helper_aspx.pagechangelist(mcurrenttextpage, mtextpagecount, mtid, mnid, msearch).value; var start = 1; var endindex = 7; var lastvalue = parseint(mcurrenttextpage) + parseint(length); if (mcurrenttextpage > 4) { start = mcurrenttextpage - 3; endindex = start + 6; if (endindex > lastvalue) { endindex = lastvalue; } } if (start < 7 && endindex > lastvalue) { endindex = lastvalue; } var strv = '
'; $("#jb_xy_ym").html(strv).removeattr("style"); pageedit.loadpagecsstext(); break; case 3: if (isnullorempty($("#jb_xy_wd_k").html())) { //$("#jb_xy_ym").html(''); return; $("#jb_xy_ym").html('暂时没有' + $(".jb_xy_xcdk_x").text() + '问答').css({ "font-size": "18px", "text-align": "center", "padding-top": "35px" }); return; } var length = helper_aspx.pagechangelist(mcurrentaskpage, maskpagecount, mtid, mnid, msearch).value; //alert(currentpage + "|" + mvideopagecount + "|" + mtid + "|" + mnid); var start = 1; var endindex = 7; var lastvalue = parseint(mcurrentaskpage) + parseint(length); if (mcurrentaskpage > 4) { start = mcurrentaskpage - 3; endindex = start + 6; if (endindex > lastvalue) { endindex = lastvalue; } } if (start < 7 && endindex > lastvalue) { endindex = lastvalue; } // alert('start=' + start + 'end =' + endindex + 'lastvalue' + lastvalue + 'length' + length); var strv = '
'; //var strv = helper_aspx.pagechangelist(mcurrentaskpage, maskpagecount, mtid, mnid, msearch).value; $("#jb_xy_ym").html(strv).removeattr("style"); pageedit.loadpagecssask(); break; case 4: $("#jb_xy_ym").show(); $("#jb_xy_ym").html("售后服务热线:400-9700-866(白天)     0755-8885-6856     售后邮箱: kf@xiniuyun.com").css({ "font-size": "16px", "text-align": "center", "padding-top": "35px" }); pageedit.loadpagecssask() break; default: //$("#jb_xy_tpk").html("default"); } }, loadpagenumbersearch: function (nid) { // if (isnullorempty($("#jb_xy_tp_lbb").html())) { // $("#jb_xy_ym").html('').text("对不起!您搜索的内容,暂时没找到匹配结果!").css({ "font-size": "18px", "text-align": "center", "padding-top": "35px" }); return; // } if (isnullorempty($("#jb_xy_wd_k").html())) { $("#jb_xy_ym").html('').text("对不起!您搜索的内容,暂时没找到匹配结果!").css({ "font-size": "18px", "text-align": "center", "padding-top": "35px" }); return; } //无数据 var length = helper_aspx.pagechangelist(mcurrentsearchpage, msearchpagecount, mtid, nid, msearch).value; //alert(currentpage + "|" + mvideopagecount + "|" + mtid + "|" + mnid); var start = 1; var endindex = 7; var lastvalue = parseint(mcurrentsearchpage) + parseint(length); if (mcurrentsearchpage > 4) { start = mcurrentsearchpage - 3; endindex = start + 6; if (endindex > lastvalue) { endindex = lastvalue; } } if (start < 7 && endindex > lastvalue) { endindex = lastvalue; } // alert('start=' + start + 'end =' + endindex + 'lastvalue' + lastvalue + 'length' + length); var strv = '
'; //var strv = helper_aspx.pagechangelist(mcurrenttextpage, mtextpagecount, mtid, mnid, msearch).value; $("#jb_xy_ym").html(strv).removeattr("style"); pageedit.loadpagecsssearch(); } }; var pageedit = { loadhtmltext: function (ndt) { var temp_str = ""; $("#jb_xy_tpk").html(temp_str).attr("class", "jb_xy_tpk"); if (ndt && ndt.rows.length > 0) { for (i = 0; i < ndt.rows.length; i++) { var _id = ndt.rows[i]["id"].tostring(); var _name = ndt.rows[i]["title"].tostring(); var _type_id = ndt.rows[i]["type_id"].tostring(); var _read_count = ndt.rows[i]["read_count"].tostring(); var _down_count = ndt.rows[i]["down_count"].tostring(); var _up_count = ndt.rows[i]["up_count"].tostring(); if ((i % 2) == 0) { if (i == 0) { temp_str += '
'; } else { temp_str += '
'; } } else { temp_str += '
'; } temp_str += '\ ' + _name + '\ \
\

\ 浏览次数:' + _read_count + '

\
\
\ \

\ 踩( ' + _down_count + ' )

\
\

\ 赞( ' + _up_count + ' )

\
\
\
'; } } $("#jb_xy_tpk").html(temp_str); }, loadhtmlvideo: function (ndt) { var temp_str = ""; $("#jb_xy_tpk").html(temp_str).attr("class", "jb_xy_ybgk"); if (ndt && ndt.rows.length > 0) { for (i = 0; i < ndt.rows.length; i++) { var _id = ndt.rows[i]["id"].tostring(); var _name = ndt.rows[i]["title"].tostring(); var _content = ndt.rows[i]["content"].tostring(); var _type_id = ndt.rows[i]["type_id"].tostring(); var _read_count = ndt.rows[i]["read_count"].tostring(); var _down_count = ndt.rows[i]["down_count"]; var _up_count = ndt.rows[i]["up_count"]; var _play_time = ndt.rows[i]["play_time"]; var _image_path = " /helper/images/jb_sp1.png"; var tempvalue = ndt.rows[i]["video_image_path"]; if (!isnullorempty(tempvalue)) { if (schoolvideodomainname == 'null') { schoolvideodomainname = helper_aspx.schoolvideodomainname().value; } _image_path = schoolvideodomainname + ndt.rows[i]["video_image_path"].tostring(); } if ((i + 1) % 3) { temp_str += '
'; } else { temp_str += '
'; } if (_name.length > 30) { _name = _name.substring(0, 30) + "..."; } // if (_content.length > 40) { // _content = _content.substring(0, 40)+"..."; // } //temp_str += '\ temp_str += '\
jb_sp1
\
\

' + _play_time + '

\

' + _name + '

\
\

浏览次数:' + _read_count + '

\ \
\
\
'; } //

' + _content + '

\ 2014-09-17注释内容 } $("#jb_xy_tpk").html(temp_str); }, loadhtmlsearch: function (ndt) { pagehelp.showsearch(); var temp_str = '
\

标题

\

类型

\
'; $("#jb_xy_tpk").html(temp_str).attr("class", "jb_xy_tpk"); if (ndt && ndt.rows.length > 0) { for (var i = 0; i < ndt.rows.length; i++) { var _id = ndt.rows[i]["id"].tostring(); var _name = ndt.rows[i]["title"].tostring(); var _type_id = ndt.rows[i]["type_id"].tostring(); var _read_count = ndt.rows[i]["read_count"].tostring(); var _down_count = ndt.rows[i]["down_count"].tostring(); var _up_count = ndt.rows[i]["up_count"].tostring(); var _nid = ndt.rows[i]["is_online_item"].tostring(); if ((i % 2) == 0) { temp_str += '
'; } else { temp_str += '
'; } if (_nid == 1) { temp_str += '' + _name + '
视频' temp_str += '
'; } else if (_nid == 2) { temp_str += '' + _name + '
文档' temp_str += '

查看详情

'; } else if (_nid == 3) { temp_str += '' + _name + '
问答' temp_str += '

查看详情

'; } } } $("#jb_xy_tpk").html(temp_str); }, loadhtmlindex: function (ndt) { //首页 $("#jb_xy_tpk").html('').attr("class", "jb_xy_tpk"); var temp_str = ''; $("#jb_xy_tpk").html(temp_str); if (ndt && ndt.rows.length > 0) { for (var i = 0; i < ndt.rows.length; i++) { var _id = ndt.rows[i]["id"].tostring(); var _name = ndt.rows[i]["title"].tostring(); var _type_id = ndt.rows[i]["type_id"].tostring(); var _read_count = ndt.rows[i]["read_count"].tostring(); var _down_count = ndt.rows[i]["down_count"].tostring(); var _up_count = ndt.rows[i]["up_count"].tostring(); var _nid = ndt.rows[i]["is_online_item"].tostring(); if ((i % 2) == 0) { temp_str += '
'; } else { temp_str += ''; if (i == (ndt.rows.length - 1)) { temp_str += '

查看全部课程建议

'; } } } $("#jb_xy_tpk").html(temp_str); }, loadhtmlask: function (ndt) { $("#jb_xy_tpk").html("").attr("class", "jb_xy_ybgk"); var temp_str = '
您有什么疑问,我们帮您解决!
我 要 提 问
'; if (ndt && ndt.rows.length > 0) { for (i = 0; i < ndt.rows.length; i++) { var _id = ndt.rows[i]["id"].tostring(); var _name = ndt.rows[i]["description"]; if (isnullorempty(_name)) { _name = ''; } var _ask = ndt.rows[i]["title"].tostring(); var _content = ndt.rows[i]["content"].tostring(); var _time = ndt.rows[i]["create_time"].tostring(); var _type_id = ndt.rows[i]["type_id"].tostring(); var _read_count = ndt.rows[i]["read_count"].tostring(); var _down_count = ndt.rows[i]["down_count"].tostring(); var _up_count = ndt.rows[i]["up_count"].tostring(); var _username = ndt.rows[i]["username"].tostring(); var dd = new date(_time); if (i == ndt.rows.length - 1) { temp_str += '
'; } else { temp_str += '
'; } temp_str += '
\
\
' + _username + '
\
' + dd.format("mm/dd/yyyy") + '
\
\

' + _ask + '

\
\

' + _content + '

\ \
'; } } $("#jb_xy_tpk").html(temp_str); }, loadhtmlplay: function (id, _up, _down) { pagehelp.showvideo(); var paras = "?op=video&id=" + id + "&up=" + _up + "&down=" + _down + "&r=" + math.random(); var striframe = ''; //// $("#jb_xy_tpk").html("").css("height", 739); //// $("#jb_xy_ym").html(""); $("#iframevideo").css("top", 250); // $("#jb_xy_ynr").css("top") $("#iframevideo").css("left", 380); $("#iframevideo").css("width", 739); $("#iframevideo").css("height", 739); //// $("#iframevideo").show(); $("#jb_xy_tpk").html(striframe); $("#iframevideo").load(function () { var mainheight = $(this).contents().find("body").height(); //+30 $(this).height(mainheight + 10); }); $("#jb_xy_tpk").attr("height", ($("#iframevideo").attr("height"))); //739 541 //$("#jb_xy_tpk").html($("#user1").html()).css("height", "500px"); //$("#jb_xy_tpk").html($("#iframevideo").html()).css("height", "500px"); }, loadhtmldetail: function (id, _up, _down, op) { pagehelp.showvideo(); $("#jb_xy_tpk").html("正在读取页面,请稍后!").attr("class", "jb_xy_sp_xqk"); var paras = "?op=" + op + "&id=" + id + "&up=" + _up + "&down=" + _down + "&r=" + math.random(); var striframe = ''; // $("#iframevideo").bind({ // "readystatechange": function () { // alert('ing'); // if (this.readystate == 'complete') { // $("#iframefather").hide(); // } // } // }); $("#jb_xy_tpk").html(striframe).attr("class", "jb_xy_tpk1"); $("#iframevideo").load(function () { var mainheight = $(this).contents().find("body").height(); //+30 //$("#idtitle", $(this).document).hide(); $(this).height(mainheight + 10); }); $("#jb_xy_tpk").attr("height", ($("#iframevideo").attr("height"))); }, loadnavcss: function () { var temptarget = $("#idnavli" + mnid); //temptarget.attr("class", "on").parent().siblings().find("li").attr("class", ""); temptarget.attr("class", "jb_xy_xxk_k_on").parent().siblings().find("div").attr("class", "jb_xy_xxk_k"); }, loadtypecss: function () { $(".jb_xy_xcdk_x").attr("class", "jb_xy_xcdk_x2"); var temptargettype = $("#idtypeli" + mtid); //temptargettype.attr("class", "on").parent().siblings().find("li").attr("class", "on1"); temptargettype.attr("class", "jb_xy_xcdk_x") }, loadpagecsstext: function () { var temptarget = $("#idpageli" + mcurrenttextpage); temptarget.attr("class", "on").parent().siblings().find("li").attr("class", ""); if (mtid == defaultindex) { $("#jb_xy_xxk").hide(); } else { $("#jb_xy_xxk").show() } }, loadpagecssvideo: function () { var temptarget = $("#idpageli" + mcurrentvideopage); temptarget.attr("class", "on").parent().siblings().find("li").attr("class", ""); }, loadpagecssask: function () { var temptarget = $("#idpageli" + mcurrentaskpage); temptarget.attr("class", "on").parent().siblings().find("li").attr("class", ""); }, loadpagecsssearch: function () { var temptarget = $("#idpageli" + mcurrentsearchpage); temptarget.attr("class", "on").parent().siblings().find("li").attr("class", ""); }, loadpagechangecss: function () {//备注 var $left = $("#idnumberleft"); var $right = $("#idnumberright"); var numberfirest = $("#jb_xy_ym ul").find("a").first().text(); var numberlast = $("#jb_xy_ym ul").find("a").last().text(); var alength = $("#jb_xy_ym ul").find("a").length; if (numberfirest == 1) { $left.hide(); //$left.css("background-image", "none"); } if (afxbool == true || (numberlast - numberfirest) < 6) { afxbool = false; $right.hide(); } } }; var pagehelp = { showvideo: function () { $("#jb_xy_xxk").hide(); $("#jb_xy_tpk").html(""); //.css("height", "802px"); $("#jb_xy_sp_wz").show(); $("#iframevideo").show().css("height", "780px"); $("#iframevideo").show().css("width", "760px"); $("#jb_xy_ym").hide(); }, hidevideo: function () { $("#jb_xy_xxk").show(); $("#jb_xy_sp_wz").hide(); $("#jb_xy_tpk").removeattr("style"); $("#iframevideo").removeattr("style"); $("#iframevideo").hide(); $("#jb_xy_ym").show(); document.title = '犀牛云 · 移动云网站,开启企业移动互联网营销新时代_产品介绍_使用视频教程-犀牛学院,从企业站长到企业cio'; }, showsearch: function () { $("#jb_xy_xxk").hide(); $("#jb_xy_ym").show(); document.title = '犀牛云 · 移动云网站,开启企业移动互联网营销新时代_产品介绍_使用视频教程-犀牛学院,从企业站长到企业cio'; }, hidesearch: function () { msearch = ""; $("#jb_xy_xxk").show(); }, showindex: function () { //$("#jb_xy_rdk").attr("class", "jb_xy_rdk"); $("#xn_xy_rdk").attr("class", "xn_xy_rdk"); $("#jb_xy_xxk").hide(); $("#jb_xy_ym").hide(); }, hideindex: function () { //$("#jb_xy_rdk").attr("class", "jb_xy_rdk_hide"); $("#xn_xy_rdk").attr("class", "xn_xy_rdk_hide"); $("#jb_xy_xxk").show(); $("#jb_xy_ym").show(); }, asking: function () { if (parseint(helper_aspx.getuserid().value) <= 0) { var url = '/subpage/login.aspx?isfromhelper=1'; dialog = art.dialog({ content: url, fixed: true, lock: true, padding: 0, height: 368, width: 580, iframe: true, scroll: false }); return; } var url = '/helper/asking.aspx?tid=' + mtid + '&nid=' + mnid; dialog = art.dialog({ content: url, fixed: true, lock: true, padding: 0, height: 376, width: 435, iframe: true, scroll: false }); }, helping: function () { if (parseint(helper_aspx.getuserid().value) <= 0) { var url = '/subpage/login.aspx?isfromhelper=1'; dialog = art.dialog({ content: url, fixed: true, lock: true, padding: 0, height: 368, width: 580, iframe: true, scroll: false }); return; } var url = '/helper/helping.aspx?tid=' + mtid + '&nid=' + mnid; dialog = art.dialog({ content: url, fixed: true, lock: true, padding: 0, height: 370, width: 435, iframe: true, scroll: false }); } }; date.prototype.format = function (format) { /* * eg:format="yyyy-mm-dd hh:mm:ss"; */ var o = { "m+": this.getmonth() + 1, // month "d+": this.getdate(), // day "h+": this.gethours(), // hour "m+": this.getminutes(), // minute "s+": this.getseconds(), // second "q+": math.floor((this.getmonth() + 3) / 3), // quarter "s": this.getmilliseconds() // millisecond } if (/(y+)/.test(format)) { format = format.replace(regexp.$1, (this.getfullyear() + "").substr(4 - regexp.$1.length)); } for (var k in o) { if (new regexp("(" + k + ")").test(format)) { format = format.replace(regexp.$1, regexp.$1.length == 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length)); } } return format; } var e_v = { nav_click: function (nid) { if (nid > 0) { hidsearchclear(); var $nav = $("#div_nav_" + nid); $nav.attr("class", "ywz_shiping_er1").siblings().attr("class", "ywz_shiping_er").siblings().first().attr("class", "ywz_shiping_yi").siblings().last().attr("class", "ywz_shiping_san"); helper.create_type(parseint(nid)); $("#hidcurrentitem").val(nid); } else { $("#div_nav_1").attr("class", "ywz_shiping_er").siblings().attr("class", "ywz_shiping_er"); $("#ywz_wenzi_daohang_zhong").html(''); $("#hidcurrentitem").val(2); } helper.load_default_type(); }, nav_video_click: function (nid) { $("#hidcurrentitem").val(nid); var $nav = $("#div_nav_" + nid); $nav.attr("class", "ywz_shiping_yi1").siblings().attr("class", "ywz_shiping_er").siblings().last().attr("class", "ywz_shiping_san"); helper.create_type_video(parseint(nid)); helper.load_default_type(); }, nav_hotline_click: function (nid) {//在线服务 $("#hidcurrentitem").val(nid); var $nav = $("#div_nav_" + nid); $nav.attr("class", "ywz_shiping_san1").siblings().attr("class", "ywz_shiping_er").siblings().first().attr("class", "ywz_shiping_yi"); var tempv = helper_default.gethotline(nid).value; if (tempv) { $("#ywz_wenti_daohang_hotline").html(tempv); $("#rpdata").html('').hide(); $("#ywz_wenti_daohang_hotline").show(); $("#ywz_wenti_daohang").hide(); } } }; var helper = { create_type: function (nid) { var temp_str = ""; var dt = helper_default.bindtypes(nid).value; if (dt && dt.rows.length > 0) { for (i = 0; i < dt.rows.length; i++) { var _id = dt.rows[i]["id"].tostring(); var _name = dt.rows[i]["name"].tostring(); temp_str += "
"; temp_str += " "; temp_str += _name + ""; temp_str += "
"; } } $("#ywz_wenzi_daohang_zhong").html(temp_str); }, create_type_video: function (nid) { var temp_str = ""; var dt = helper_default.bindtypes(nid).value; if (dt && dt.rows.length > 0) { for (i = 0; i < dt.rows.length; i++) { var _id = dt.rows[i]["id"].tostring(); var _name = dt.rows[i]["name"].tostring(); temp_str += "
"; temp_str += " "; temp_str += _name + ""; temp_str += "
"; } } $("#ywz_wenzi_daohang_zhong").html(temp_str); }, load_default_type: function () { var tempitem = $("#ywz_wenzi_daohang_zhong").find('div').eq(0); var temptid = tempitem.attr('mid'); load_type_list(temptid); } }; var _video = { _video_view: function (id) { var url = '/helper/videoview.aspx?id=' + id; dialog = art.dialog({ content: url, fixed: true, // 跟随滚动条 lock: true, padding: 0, height: 518, width: 669, iframe: true, scroll: false }); helper_default.addreadcount(id); } }; var dialog; function hidsearchclear() { $("#hidsearchkey").val(''); } function hidsearchset(objv) { $("#hidsearchkey").val(objv); } function hidsearchget() { return $("#hidsearchkey").val(); } /** 帮助中心*/ //var tip = { // _show: function (id, src) { // // $("#" + id).show(); // // $("#" + src).attr("class", "ywz_wanbangz1"); // }, // _hide: function (id, src) { // // $("#" + id).hide(); // // $("#" + src).attr("class", "ywz_wanbangz"); // } //};