/* * cmp embed javascript * http://bbs.cenfun.com/ * * 1, cmp.write(id, width, height, swf_url, flashvars, params, attrs); * 2, var htm = cmp.create(id, width, height, swf_url, flashvars, params, attrs); * 3, var cmpo = cmp.get(id); * 4, cmp.remove(id/cmpo); * * mini version: http://cenfunmusicplayer.googlecode.com/svn/trunk/js/cmp.js * source file: http://cenfunmusicplayer.googlecode.com/svn/trunk/js/cmp_src.js * minification by: http://marijnhaverbeke.nl/uglifyjs */ (function(a){typeof a.cmp=="undefined"&&(a.cmp=function(){var b=/msie/.test(navigator.useragent.tolowercase()),c=function(a,b){if(b&&typeof b=="object")for(var c in b)a[c]=b[c];return a},d=function(a,d,e,f,g,h,i){i=c({width:d,height:e,id:a},i),h=c({allowfullscreen:"true",allowscriptaccess:"always"},h);var j,k,l=[];if(g){j=g;if(typeof g=="object"){for(var m in g)l.push(m+"="+encodeuricomponent(g[m]));j=l.join("&")}h.flashvars=j}k="':">";for(m in h)k+='';return k+="",k},e=function(c){var d=document.getelementbyid(c);if(!d||d.nodename.tolowercase()!="object")d=b?a[c]:document[c];return d},f=function(a){if(a){for(var b in a)typeof a[b]=="function"&&(a[b]=null);a.parentnode.removechild(a)}},g=function(a){if(a){var c=typeof a=="string"?e(a):a;if(c&&c.nodename.tolowercase()=="object")return b?(c.style.display="none",function(){c.readystate==4?f(c):settimeout(arguments.callee,15)}()):c.parentnode.removechild(c),!0}return!1};return{create:function(){return d.apply(this,arguments)},write:function(){var a=d.apply(this,arguments);return document.write(a),a},get:function(a){return e(a)},remove:function(a){return g(a)}}}());var b=function(b){b=b||a.event;var c=b.target||b.srcelement;if(c&&typeof c.cmp_version=="function"){var d=c.skin("list.tree","maxverticalscrollposition");if(d>0)return c.focus(),b.preventdefault&&b.preventdefault(),!1}};a.addeventlistener&&a.addeventlistener("dommousescroll",b,!1),a.onmousewheel=document.onmousewheel=b})(window);