function get_code() { if (document.getelementbyid("imgid")) { document.getelementbyid("imgid").innerhtml = "验证码加载中"; var dv_codefile = "/verificationcode/index"; document.getelementbyid("imgid").innerhtml = '点击刷新验证码' } } function displaysubmenu(li) { var submenu = li.getelementsbytagname("ul")[0]; submenu.style.display = "block"; } function hidesubmenu(li) { var submenu = li.getelementsbytagname("ul")[0]; submenu.style.display = "none"; } function tab(ption,objid, counts) { for (var i = 1; i <= counts; i++) { $("#tb_" + ption + "_" + i).removeclass(); $("#tab_" + ption + "_" + i).hide(); } $("#tb_" + ption + "_" + objid).addclass("curr"); $("#tab_" + ption + "_" + objid).show(); } function checkform() { var title = $("input[name='title']").val(); if (title.length < 4) { alert("留言主题不能少于4个字"); return false; } var xingming = $("input[name='xingming']").val(); if (xingming.length<2) { alert("姓名不能为空"); return false; } var laizi = $("input[name='laizi']").val(); if (laizi.length < 1) { alert("来自地区不能为空"); return false; } var lxdh = $("input[name='lxdh']").val(); if (lxdh.length < 8) { alert("请输入正确的联系电话"); return false; } var message = $("textarea[name='message']").val(); if (message.length < 10) { alert("内容不能少于10个字"); return false; } var ecoder = $("input[name='ecoder']").val(); if (ecoder.length < 4) { alert("请输入正确的验证码"); return false; } return true; } //加入收藏 function addfavorite(surl, stitle) { surl = encodeuri(surl); try { window.external.addfavorite(surl, stitle); } catch (e) { try { window.sidebar.addpanel(stitle, surl, ""); } catch (e) { alert("加入收藏失败,请使用ctrl+d进行添加,或手动在浏览器里进行设置."); } } } //设为首页 function sethome(url) { if (document.all) { document.body.style.behavior = 'url(#default#homepage)'; document.body.sethomepage(url); } else { alert("您好,您的浏览器不支持自动设置页面为首页功能,请您手动在浏览器里设置该页面为首页!"); } } /*$(window).bind('beforeunload',function(){ addfavorite(window.location,document.title); return '您输入的内容尚未保存,确定离开此页面吗?'; });*/ function showinnerleftmenubox() { $(".mainleftbox_li ul>li").bind({ mouseover: function () { $(this).find("ul").show(); $(this).addclass("ischoose"); $(this).find("a").css({"color":"#fff"}) }, mouseout: function () { $(this).find("ul").hide(); $(this).removeclass("ischoose"); $(this).find("a").css({ "color": "#333" }) } }); } function loadflash(_flashid, _flashpath, _flashwidth, _flashheigth) { var _mathnumber = math.floor(math.random() * 100000000); if (_flashpath.indexof("?") == "-1") { _flashpath = _flashpath + "?v=" + _mathnumber + ""; } else { _flashpath = _flashpath + "&v=" + _mathnumber + ""; } str = ""; str += ""; str += ""; str += ""; str += ""; str += ""; document.write(str); } //====================== $(function () { // $("#kinmaxshow").kinmaxshow({ // height: 286, // //width: 100%, // button: { // showindex: true, // normal: { width: '18px', height: '18px', lineheight: '18px', fontsize: '12px', background: "#666666", border: "1px solid #000000", color: "#fff", marginright: '5px' }, // focus: { background: "#ff6508", border: "1px solid #000000", color: "#000" } // } // }); // $("#kinmaxshow .kmsprefix_kinmaxshow_button").css({ "right": "0", "bottom": "6px" }); showinnerleftmenubox(); /*$('body').bind('contextmenu', function () { return false; }); $('body').bind("selectstart", function () { return false; }); */ //marqueestart(1, "left"); //marqueestart(2, "left"); //marqueestart(3, "left"); }); function marquee(i, direction) { var obj = document.getelementbyid("marquee" + i); var obj1 = document.getelementbyid("marquee" + i + "_1"); var obj2 = document.getelementbyid("marquee" + i + "_2"); if (direction == "up") { if (obj2.offsettop - obj.scrolltop <= 0) { obj.scrolltop -= (obj1.offsetheight + 20); } else { var tmp = obj.scrolltop; obj.scrolltop++; if (obj.scrolltop == tmp) { obj.scrolltop = 1; } } } else { if (obj2.offsetwidth - obj.scrollleft <= 0) { obj.scrollleft -= obj1.offsetwidth; } else { obj.scrollleft++; } } } function changeimg(objimg,objwidth) { var most = objwidth; //设置最大宽度 if(objimg.width > most) { var scaling = 1-(objimg.width-most)/objimg.width; //计算缩小比例 objimg.width = objimg.width*scaling; objimg.height = objimg.height; //img元素没有设置高度时将自动等比例缩小 //objimg.height = objimg.height*scaling; //img元素设置高度时需进行等比例缩小 } } function marqueestart(i, direction) { var obj = document.getelementbyid("marquee" + i); var obj1 = document.getelementbyid("marquee" + i + "_1"); var obj2 = document.getelementbyid("marquee" + i + "_2"); obj2.innerhtml = obj1.innerhtml; var marqueevar = window.setinterval("marquee(" + i + ", '" + direction + "')", 20); obj.onmouseover = function () { window.clearinterval(marqueevar); } obj.onmouseout = function () { marqueevar = window.setinterval("marquee(" + i + ", '" + direction + "')", 20); } } //会员订单处理 function useroredradd(proid) { if (isuserok == 1) { dialog("订单生成", "iframe:/member/userorderadd/?proid=" + proid, "550", "200", true); } else { alert("你还未登录,请先登录!"); } }