/* //屏蔽右键菜单 document.oncontextmenu = function (event){ if(window.event){ event = window.event; }try{ var the = event.srcElement; if (!((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")){ return false; } return true; }catch (e){ return false; } } //屏蔽粘贴 document.onpaste = function (event){ if(window.event){ event = window.event; }try{ var the = event.srcElement; if (!((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")){ return false; } return true; }catch (e){ return false; } } //屏蔽复制 document.oncopy = function (event){ if(window.event){ event = window.event; }try{ var the = event.srcElement; if(!((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")){ return false; } return true; }catch (e){ return false; } } //屏蔽剪切 document.oncut = function (event){ if(window.event){ event = window.event; }try{ var the = event.srcElement; if(!((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")){ return false; } return true; }catch (e){ return false; } } //屏蔽选中 document.onselectstart = function (event){ if(window.event){ event = window.event; }try{ var the = event.srcElement; if (!((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")){ return false; } return true; } catch (e) { return false; } } */ //屏蔽鼠标右键 function disabledRightButton() { document.oncontextmenu = function(e){return false;} document.onselectstart = function(e){return false;} if (navigator.userAgent.indexOf("Firefox") > -1) { document.writeln(""); } } // 设为首页 function setHome(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("此操作被浏览器拒绝!\n请在浏览器地址栏输入“about:config”并回车\n然后将[signed.applets.codebase_principal_support]的值设置为'true',双击即可。"); return; } var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch); prefs.setCharPref('browser.startup.homepage', vrl); } } } // 加入收藏 function addFavorite(sURL, sTitle) { try { window.external.addFavorite(sURL, sTitle); } catch (e) { try { window.sidebar.addPanel(sTitle, sURL, ""); } catch (e) { alert("您使用的浏览器不支持此功能,请使用Ctrl+D进行添加"); } } } function flashPlay( pics, texts, links, flash_width, flash_height, text_height){ var swf_height = flash_height + text_height; var banner = '' document.write(''); document.write(banner); document.write(''); document.write(''); document.write(''); document.write(''); } // 回到顶部 $(document).ready(function(){ $(window).scroll(function(){ var scrollH = $(window).scrollTop(); if(scrollH>300){ $(".back-to").fadeIn(); }else{ $(".back-to").fadeOut(); } }) $(".back-to").on('click',function(){ $('html,body').animate({'scrollTop':0},500); }); }) // 在线QQ $(function(){ var m_woo_panel = $('#m-woo-panel'); $('#j-close').on('click',function(){ m_woo_panel.hide(); }); $('#j-console').on("click",function(){ if($(this).hasClass("m-console-active")){ $(this).removeClass("m-console-active"); m_woo_panel.animate({right:0}); }else{ $(this).addClass("m-console-active"); m_woo_panel.animate({right:-164}); }; }); }); // QQ滚动特效 $(document).ready(function(){ $(".online_qq").floatadv(); }); jQuery.fn.floatadv = function(loaded) { var obj = this; body_height = parseInt($(window).height()); block_height = parseInt(obj.height()); top_position = parseInt((body_height/2) - (block_height/2) + $(window).scrollTop()); if (body_height