';
document.body.appendChild(newDiv);
//弹出层滚动居中
function newDivCenter()
{
newDiv.style.top = (document.body.scrollTop + document.body.clientHeight/2 -
newDivHeight+300) + "px";
newDiv.style.left = (document.body.scrollLeft + document.body.clientWidth/2 -
newDivWidth/2) + "px";
}
if(document.all)
{
window.attachEvent("onscroll",newDivCenter);
}
else
{
window.addEventListener('scroll',newDivCenter,false);
}
//关闭新图层和mask遮罩层
var newA = document.createElement("a");
newA.href = "#";
newA.innerHTML = "

";
newA.onclick = function()
{
if(document.all)
{
window.detachEvent("onscroll",newDivCenter);
}
else
{
window.removeEventListener('scroll',newDivCenter,false);
}
document.body.removeChild(docEle('video'));
document.body.removeChild(docEle(m));
return false;
}
newDiv.appendChild(newA);
}
}
})
}
function playvideo2(url){
$.ajax({
url:'https://qmbbs.17el.cn/personalinfo.shtml',
jsonp:"jsonpcallback",
dataType:'jsonp',
success:function(msg){
var xm = msg.map.xm;
if(xm == null || xm == ""|| xm == 'undefined'){
alert("学员您好,请先登录账号后再观看课程。");
window.location.href = "http://hnqmgc.17el.cn/cydl";
}else{
window.open(url);
}
}
});
}
// 打开温馨提示
function userMenbanZhu() {
document.getElementsByClassName("userMenban")[0].classList.remove("yingcang");
var w = $(document).width();
var h = $(document).height();
var myw = $("#ft").width();
var myh = $("#ft").height();
var myTop = (window.screen.height - myh) / 2 - 120;
var myLeft = (w - myw) / 2;
document.getElementsByClassName("userMenban")[0].style.width = w + "px";
document.getElementsByClassName("userMenban")[0].style.height = h + "px";
if (myTop > 0) { $("#ft").css("top", myTop); }else{ $("#ft").css("top", 0); }
if (myLeft > 0) { $("#ft").css("left", myLeft); }else{$("#ft").css("left", 0);}
document.getElementById("ft").classList.remove("yingcang");
}
// 关闭温馨提示
function cha() {
document.getElementsByClassName("userMenban")[0].classList.add("yingcang");
document.getElementById("ft").classList.add("yingcang");
}
function initSecondNav(){
$(".second_hide_class").hide();
$(".second_title_class").on('mouseover',function(){
$(".second_hide_class").hide();
let me= $(this);
$(this).next().show().children("li").find('a').on('click',function(){
//$(".second_hide_class").hide();
});
$(this).next().on('mouseover',function(){
$(me).addClass("current");
});
$(this).next().on('mouseleave',function(){
//$('.second_hide_class').hide();
$(me).removeClass("current");
});
});
$(".second_ul_nav").on('mouseleave',function(){
$('.second_hide_class').hide();
});
}
$(function(){
initSecondNav();
});