function flash2(tag, url,w,h,flashvars){var s='';tag?tag.html(s):document.write(s);}
function flash(url,w,h,flashvars){document.write('');}
function wdate(){var today = new date();var yy=today.getfullyear();var mm=today.getmonth()+1;var dd=today.getdate();var isndays="星期日|星期一|星期二|星期三|星期四|星期五|星期六|星期日".split("|");if(mm<10)mm="0"+mm;if(dd<10)dd="0"+dd;document.write("今天是:" + yy + "年" + mm + "月" + dd + "日 " + isndays[today.getday()]);}
string.prototype.trim = function(){return this.tostring().replace(/(^[\s\u3000\ufeff\u00a0]+)|([\s\u3000\ufeff\u00a0]+$)/g, '');}
function sethome(obj){var url = window.location;try{obj.style.behavior='url(#default#homepage)';obj.sethomepage(url);}catch(e){if(window.netscape){try{netscape.security.privilegemanager.enableprivilege("universalxpconnect");}catch(e){alert("此操作被浏览器拒绝!\n请在浏览器地址栏输入\"about:config\"并回车\n然后将 [signed.applets.codebase_principal_support]的值设置为'true',双击即可");}var prefs = components.classes['@mozilla.org/preferences-service;1'].getservice(components.interfaces.nsiprefbranch);prefs.setcharpref('browser.startup.homepage',url);}else{alert("您的浏览器不支持,请按照下面步骤操作:\n1、打开浏览器设置\n2、点击设置网页\n3、输入:"+url+"\n4、点击确定");}}}
function addfavourite(){var title=document.title,url=window.location;try{window.external.addfavorite(url, title)}catch(e){try{window.sidebar.addpanel(title, url, "")}catch(e){alert("请使用ctrl+d进行添加")}}}
/*edgesun@126.com 20140610 -- $('.ul'), 是否显示向前向生按钮, 是否显示索引, 是否数字索引, 鼠标滑过时是否暂停*/
function edgesunimgfade(a,b,c,d,e){if(this.i=0,this.ul=a,this.li=a.find("li"),this.showindex=!!c,!(this.li.size()<2)){var f=this;e&&this.ul.hover(function(){f.stop()},function(){f.auto()}),b&&this.showbtn(f),this.showindex&&this.addindex(f,!!d),this.auto()}}edgesunimgfade.prototype.showbtn=function(a){$('').appendto(this.ul.parent()),this.ul.parent().find("a.prev").click(function(){a.play(-1)}),$('').appendto(this.ul.parent()),this.ul.parent().find("a.next").click(function(){a.play(1)}),this.ul.parent().find("a.btn").each(function(){$(this).hover(function(){a.stop()},function(){a.auto()})})},edgesunimgfade.prototype.addindex=function(a,b){var d,c=$('
').appendto(this.ul.parent());for(d=0;d",{"class":d?"":"on",text:b?d+1:"",data:{index:d},click:function(){a.i=$(this).data("index")-1,a.play(1)},mouseover:function(){a.stop()},mouseout:function(){a.auto()}}).appendto(c);c.css({marginleft:0-c.width()/2+"px"})},edgesunimgfade.prototype.play=function(a){this.i+=a,this.i>=this.li.size()&&(this.i=0),this.i<0&&(this.i=this.li.size()-1),this.showindex&&(this.ul.parent().find("ul.index > li").removeclass("on"),this.ul.parent().find("ul.index > li").eq(this.i).addclass("on")),this.li.eq(this.i).siblings().fadeout(800),this.li.eq(this.i).fadein(800)},edgesunimgfade.prototype.auto=function(){var a=this;this.intervalid=window.setinterval(function(){a.play(1)},3e3)},edgesunimgfade.prototype.stop=function(){window.clearinterval(this.intervalid)};
function edgesunproductbackgroundslide(ul){ul.find('li').hover(function(){$(this).find('div').animate({'height':$(this).height()+'px'}, 200, function(){$(this).parent().addclass('on')})}, function(){$(this).removeclass('on');$(this).find('div').animate({'height':0}, 200, function(){$(this).parent().removeclass('on')})})};
//横向滚动--$('#ul')
function edgesunmoving(a){var f,g,b=a.parent(),c=a.find("li"),d=0,e="";c.size()&&(e=b.css("display"),"none"==e&&b.css({display:"block"}),d=c.outerwidth(!0)*c.size(),"none"==e&&b.css({display:"none"}),b.width()>d||(a.html(a.html()+a.html()),a.css({width:2*d+"px"}),f=function(){b.scrollleft()==d?b.scrollleft(1):b.scrollleft(b.scrollleft()+1)},g=setinterval(f,10),b.mouseover(function(){clearinterval(g)}),b.mouseout(function(){clearinterval(g),g=setinterval(f,10)})))};
//纵向滚动--$('#ul')
function edgesunmovingvertical(a){function d(){b.scrolltop()==c?b.scrolltop(1):b.scrolltop(b.scrolltop()+1)}var e,b=a.parent(),c=a.height();!a.find("li").size()||b.height()>c||(a.html(a.html()+a.html()),e=setinterval(d,25),b.mouseover(function(){clearinterval(e)}),b.mouseout(function(){e=setinterval(d,25)}))};
//arr=[image, url, text],间隔时间|文字颜色|文字背景|背景透明度|按钮文字颜色|当前按钮背景颜色|按钮背景颜色
function bcastr2(a,b,c,d){var e="5|0xffffff|0x000000|50|0xffffff|0xcc0000|0x000000";document.write('')};
//js加载vcastr并实现视频的自动播放
function vcastr(obj, url, w, h){obj.innerhtml='';}
//inarray
function in_array(obj, arr){for(var i in arr){if(arr[i]===obj)return true;}return false;}