var Web_Images_BasePath="http://widget.top100.cn/images/",geteventsrc=function(a){a=a?a:window.event?window.event:null;return a.srcElement?a.srcElement:a.target},Step1_ChineseSongPop_List="",Step1_EnglishSongPop_List="",Step1_OtherSongPop_List="",Step1_HKSongNew_List="",Step1_LandNew_List="",Step1_EngNew_List="",Step1_JpPop_List="",Step1_HotAlbum_List="",Step1_NewAlbum_List="",Step1_YaogunAlbum_List="",Step1_YuanShengAlbum_List="",Step1_LightAlbum_List="",Step1_XihaAlbum_List="",Step1_MinyaoAlbum_List=
"",Step1_DianziAlbum_List="",Step1_XinshijiAlbum_List="",Step1_PengkeAlbum_List="",Step1_OtherAlbum_List="",Step1_Singer_Hot="",Step1_Singer_ChMen="",Step1_Singer_ChWomen="",Step1_Singer_ChGroup="",Step1_Singer_EnMen="",Step1_Singer_EnWomen="",Step1_Singer_EnGroup="",Step1_Singer_JpMen="",Step1_Singer_JpWomen="",Step1_Singer_JpGroup="",Step1_MyPlaylist_List="",Step1_NewPlaylist_List="",Step1_NewTop_List="",addSong_Limit_Count=100,step1={GetList:function(a,d){var c=document.getElementById("tdList");
switch(d){case 11:if(Step1_HKSongNew_List=="")Widgets.Web.ajax.AjaxHandle.GetMusicListHtml(a,function(b){b=b.value;Step1_HKSongNew_List=c.innerHTML=b});else c.innerHTML=Step1_HKSongNew_List;break;case 12:if(Step1_LandNew_List=="")Widgets.Web.ajax.AjaxHandle.GetMusicListHtml(a,function(b){b=b.value;Step1_LandNew_List=c.innerHTML=b});else c.innerHTML=Step1_LandNew_List;break;case 13:if(Step1_ChineseSongPop_List=="")Widgets.Web.ajax.AjaxHandle.GetMusicListHtml(a,function(b){b=b.value;Step1_ChineseSongPop_List=
c.innerHTML=b});else c.innerHTML=Step1_ChineseSongPop_List;break;case 14:if(Step1_EngNew_List=="")Widgets.Web.ajax.AjaxHandle.GetMusicListHtml(a,function(b){b=b.value;Step1_EngNew_List=c.innerHTML=b});else c.innerHTML=Step1_EngNew_List;break;case 15:if(Step1_EnglishSongPop_List=="")Widgets.Web.ajax.AjaxHandle.GetMusicListHtml(a,function(b){b=b.value;Step1_EnglishSongPop_List=c.innerHTML=b});else c.innerHTML=Step1_EnglishSongPop_List;break;case 16:if(Step1_JpPop_List=="")Widgets.Web.ajax.AjaxHandle.GetMusicListHtml(a,
function(b){b=b.value;Step1_JpPop_List=c.innerHTML=b});else c.innerHTML=Step1_JpPop_List;break;case 17:if(Step1_OtherSongPop_List=="")Widgets.Web.ajax.AjaxHandle.GetMusicListHtml(a,function(b){b=b.value;Step1_OtherSongPop_List=c.innerHTML=b});else c.innerHTML=Step1_OtherSongPop_List;break;case 21:if(Step1_NewAlbum_List=="")Widgets.Web.ajax.AjaxHandle.GetMusicListHtml(a,function(b){b=b.value;Step1_NewAlbum_List=c.innerHTML=b});else c.innerHTML=Step1_NewAlbum_List;break;case 22:if(Step1_HotAlbum_List==
"")Widgets.Web.ajax.AjaxHandle.GetMusicListHtml(a,function(b){b=b.value;Step1_HotAlbum_List=c.innerHTML=b});else c.innerHTML=Step1_HotAlbum_List;break;case 23:if(Step1_YaogunAlbum_List=="")Widgets.Web.ajax.AjaxHandle.GetMusicListHtml(a,function(b){b=b.value;Step1_YaogunAlbum_List=c.innerHTML=b});else c.innerHTML=Step1_YaogunAlbum_List;break;case 24:if(Step1_YuanShengAlbum_List=="")Widgets.Web.ajax.AjaxHandle.GetMusicListHtml(a,function(b){b=b.value;Step1_YuanShengAlbum_List=c.innerHTML=b});else c.innerHTML=
Step1_YuanShengAlbum_List;break;case 25:if(Step1_LightAlbum_List=="")Widgets.Web.ajax.AjaxHandle.GetMusicListHtml(a,function(b){b=b.value;Step1_LightAlbum_List=c.innerHTML=b});else c.innerHTML=Step1_LightAlbum_List;break;case 26:if(Step1_XihaAlbum_List=="")Widgets.Web.ajax.AjaxHandle.GetMusicListHtml(a,function(b){b=b.value;Step1_XihaAlbum_List=c.innerHTML=b});else c.innerHTML=Step1_XihaAlbum_List;break;case 27:if(Step1_MinyaoAlbum_List=="")Widgets.Web.ajax.AjaxHandle.GetMusicListHtml(a,function(b){b=
b.value;Step1_MinyaoAlbum_List=c.innerHTML=b});else c.innerHTML=Step1_MinyaoAlbum_List;break;case 28:if(Step1_DianziAlbum_List=="")Widgets.Web.ajax.AjaxHandle.GetMusicListHtml(a,function(b){b=b.value;Step1_DianziAlbum_List=c.innerHTML=b});else c.innerHTML=Step1_DianziAlbum_List;break;case 29:if(Step1_XinshijiAlbum_List=="")Widgets.Web.ajax.AjaxHandle.GetMusicListHtml(a,function(b){b=b.value;Step1_XinshijiAlbum_List=c.innerHTML=b});else c.innerHTML=Step1_XinshijiAlbum_List;break;case 210:if(Step1_PengkeAlbum_List==
"")Widgets.Web.ajax.AjaxHandle.GetMusicListHtml(a,function(b){b=b.value;Step1_PengkeAlbum_List=c.innerHTML=b});else c.innerHTML=Step1_PengkeAlbum_List;break;case 211:if(Step1_OtherAlbum_List=="")Widgets.Web.ajax.AjaxHandle.GetMusicListHtml(a,function(b){b=b.value;Step1_OtherAlbum_List=c.innerHTML=b});else c.innerHTML=Step1_OtherAlbum_List;break;case 31:if(Step1_Singer_Hot=="")Widgets.Web.ajax.AjaxHandle.GetMusicListHtml(a,function(b){b=b.value;Step1_Singer_Hot=c.innerHTML=b});else c.innerHTML=Step1_Singer_Hot;
break;case 32:if(Step1_Singer_ChMen=="")Widgets.Web.ajax.AjaxHandle.GetMusicListHtml(a,function(b){b=b.value;Step1_Singer_ChMen=c.innerHTML=b});else c.innerHTML=Step1_Singer_ChMen;break;case 33:if(Step1_Singer_ChWomen=="")Widgets.Web.ajax.AjaxHandle.GetMusicListHtml(a,function(b){b=b.value;Step1_Singer_ChWomen=c.innerHTML=b});else c.innerHTML=Step1_Singer_ChWomen;break;case 34:if(Step1_Singer_ChGroup=="")Widgets.Web.ajax.AjaxHandle.GetMusicListHtml(a,function(b){b=b.value;Step1_Singer_ChGroup=c.innerHTML=
b});else c.innerHTML=Step1_Singer_ChGroup;break;case 35:if(Step1_Singer_EnMen=="")Widgets.Web.ajax.AjaxHandle.GetMusicListHtml(a,function(b){b=b.value;Step1_Singer_EnMen=c.innerHTML=b});else c.innerHTML=Step1_Singer_EnMen;break;case 36:if(Step1_Singer_EnWomen=="")Widgets.Web.ajax.AjaxHandle.GetMusicListHtml(a,function(b){b=b.value;Step1_Singer_EnWomen=c.innerHTML=b});else c.innerHTML=Step1_Singer_EnWomen;break;case 37:if(Step1_Singer_EnGroup=="")Widgets.Web.ajax.AjaxHandle.GetMusicListHtml(a,function(b){b=
b.value;Step1_Singer_EnGroup=c.innerHTML=b});else c.innerHTML=Step1_Singer_EnGroup;break;case 38:if(Step1_Singer_JpMen=="")Widgets.Web.ajax.AjaxHandle.GetMusicListHtml(a,function(b){b=b.value;Step1_Singer_JpMen=c.innerHTML=b});else c.innerHTML=Step1_Singer_JpMen;break;case 39:if(Step1_Singer_JpWomen=="")Widgets.Web.ajax.AjaxHandle.GetMusicListHtml(a,function(b){b=b.value;Step1_Singer_JpWomen=c.innerHTML=b});else c.innerHTML=Step1_Singer_JpWomen;break;case 310:if(Step1_Singer_JpGroup=="")Widgets.Web.ajax.AjaxHandle.GetMusicListHtml(a,
function(b){b=b.value;Step1_Singer_JpGroup=c.innerHTML=b});else c.innerHTML=Step1_Singer_JpGroup;break;case 41:if(Step1_MyPlaylist_List=="")Widgets.Web.ajax.AjaxHandle.GetMusicListHtml(a,function(b){b=b.value;Step1_MyPlaylist_List=c.innerHTML=b});else c.innerHTML=Step1_MyPlaylist_List;break;case 42:if(Step1_NewPlaylist_List=="")Widgets.Web.ajax.AjaxHandle.GetMusicListHtml(a,function(b){b=b.value;Step1_NewPlaylist_List=c.innerHTML=b});else c.innerHTML=Step1_NewPlaylist_List;break;case 51:if(Step1_NewTop_List==
"")Widgets.Web.ajax.AjaxHandle.GetMusicListHtml(a,function(b){b=b.value;Step1_NewTop_List=c.innerHTML=b});else c.innerHTML=Step1_NewTop_List;break;default:return false}},dis_Menu:function(a){a=geteventsrc(a);$(a).find("ul").show()},get_iaddsongs:function(){var a=getPrameter.getpram("wgp_musicContent");a!=null&&$.trim(a)!=""?Widgets.Web.ajax.AjaxHandle.GetSongsByProductIDs(a,function(d){if(d.value!=null&&d.value!=""){eval("sdata="+d.value);var c="";$(sdata).each(function(){c+=step1.addsongstr(this.name,
this.id)});$("#tbmysong").append(c);step1.Number()}else $("#trAddsong").hide()}):$("#trAddsong").hide();$("#sp_interface_info").fadeOut(8E3)},addsong:function(a){var d=$("#tbmysong table").length;if(!step1.isFull(d)){a=geteventsrc(a);d=$(a.parentNode.parentNode).find(":hidden").val();if(step1.TestAdd(d)){a=step1.addsongstr($(a.parentNode.parentNode).find("#songname").html(),d);$("#tbmysong").append(a);step1.add_cookie()}step1.Number();$("#trAddsong").show();$("#ckbSelAllDel").removeAttr("checked")}},
addsong_iframe:function(a){var d=$(parent.document.getElementById("tbmysong")).find("table").length;if(step1.isFull_iframe(d)){a=$(parent.document.getElementById("seach_info"));a.html("\u6b4c\u66f2\u5df2\u6ee1");a.show();a.fadeOut(3E3)}else{a=geteventsrc(a);d=$(a.parentNode.parentNode).find(":hidden").val();if(step1.TestAdd_iframe(d)){a=step1.addsongstr($(a.parentNode.parentNode).find("#songname").html(),d);$(parent.document.getElementById("tbmysong")).append(a);step1.add_cookie_iframe()}a=$(parent.document.getElementById("seach_info"));
a.html("\u6dfb\u52a0\u6210\u529f");a.show();a.fadeOut(3E3);step1.Number_iframe();$(parent.document.getElementById("trAddsong")).show();$(parent.document.getElementById("ckbSelAllDel")).removeAttr("checked")}},isFull:function(a){var d=false;if(a>=addSong_Limit_Count)d=true;return d},isFull_iframe:function(a){var d=false;if(a>=addSong_Limit_Count)d=true;return d},addsongstr:function(a,d){var c='<tr id="trMysongs"><td id="tdselsong" class="musicsrclineunselect" onmouseover="step1.hoverSong(event);" onmouseout="step1.outSong(event);"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">';
c+="<tr>";c+='<td width="25" height="28" align="center"><input class="mousehand" type="checkbox" /></td>';c+='<td width="30" class="txt2"><input  type="hidden"  value="';c+=d;c+='"/><div align="center">';c+='</div></td> <td width="207" class="txt2">';c+=a.substr(0,20);c+="</td>";c+='<td width="30"><img width="10" height="10" class="mousehand" src="../images/up.gif" onclick="step1.moveSong(event,true)"/></td>';c+='<td width="30"><img width="10" height="10" class="mousehand" src="../images/down.gif" onclick="step1.moveSong(event,false)"/></td>';
c+='<td width="22" align="center"><img src="'+Web_Images_BasePath+'x.gif" class="mousehand" width="14" height="13" onclick="step1.delMe(event);"/></td>';c+="</tr>";c+="</table></td></tr>";return c},curEle:null,moveSong:function(a,d){$(".musicsrclineunselect").css("background-color","#ffffff");step1.curEle=$(geteventsrc(a));a=step1.curEle.parents("#trMysongs");d=d?$(step1.curEle).parents("#trMysongs").prev():$(step1.curEle).parents("#trMysongs").next();var c=a.html(),b=d.html();a.html(b);d.html(c);
c=a.find("div").html();b=d.find("div").html();a.find("div").html(b);d.find("div").html(c);d.find(".musicsrclineunselect").css("background-color","#efefef");step1.add_cookie()},reCount:function(){var a=$("#tbmysong table").length;$("#selCount").html(a+"");$("#addCount").html(addSong_Limit_Count-a+"")},reCount_iframe:function(){var a=$(parent.document.getElementById("tbmysong")).find("table").length;$(parent.document.getElementById("selCount")).html(a+"");$(parent.document.getElementById("addCount")).html(addSong_Limit_Count-
a+"")},isNotSongs:function(){if($("#tbmysong table").length==0){$("#trAddsong").hide();cookiehelper.delCookie("wgp_musicContent")}else{$("#trAddsong").show();step1.add_cookie()}},Number:function(){$("#tbmysong").find("div").each(function(a){$(this).html(a+1+".")});step1.reCount()},Number_iframe:function(){$(parent.document.getElementById("tbmysong")).find("div").each(function(a){$(this).html(a+1+".")});step1.reCount_iframe()},viewsongs:function(a,d,c){c=geteventsrc(c);var b=$(c).parents("#tb_musongs").find("#musongs");
b.toggle();if($.trim(b.html())==""){b.html("<img id='load'  src='"+Web_Images_BasePath+"loading.gif'/>");step1.getChildSongs(a,d,b,c)}a=Web_Images_BasePath;switch(c.src){case a+"shzzqm-.gif":c.src=a+"xszjqm-.gif";break;case a+"xszjqm-.gif":c.src=a+"shzzqm-.gif";break;case a+"xsysjqm.gif":c.src=a+"shysjqm.gif";break;case a+"shysjqm.gif":c.src=a+"xsysjqm.gif";break;case a+"xslbqm.gif":c.src=a+"shlbqm.gif";break;case a+"shlbqm.gif":c.src=a+"xslbqm.gif";break;case a+"xsqbqm.gif":c.src=a+"shxsqm.gif";
break;case a+"shxsqm.gif":c.src=a+"xsqbqm.gif";break}},getChildSongs:function(a,d,c,b){Widgets.Web.ajax.AjaxHandle.GetChildSongs(a,d,function(e){c.html(e.value);if(b.id=="addalbum"){$(b).next().remove();step1.addAlbum(b)}b.id=="playalbum"&&step1.playAllSong(b);c.find("#tdRpt :checkbox").length<1&&c.find("#td_addsel").html("<span style='font-size:12px;'>\u6682\u65f6\u6ca1\u6709\u76f8\u5173\u6b4c\u66f2</span>")})},selAllSong:function(a){a=geteventsrc(a);$(a).parents("#tbsonglist").find("#tdRpt :checkbox").attr("checked",
$(a).attr("checked"))},selAllSong_Text:function(a){a=geteventsrc(a);$(a).parents("#tbsonglist").find("#ckbSelAll").click()},selAllDel:function(a){a=geteventsrc(a);$(a).parents("#tb_right").find("#tbmysong :checkbox").attr("checked",$(a).attr("checked"))},moveAllSel:function(a){var d=$("#tbmysong table").length;if(!step1.isFull(d)){var c=addSong_Limit_Count-d;a=geteventsrc(a);var b="";$(a).parents("#tbsonglist").find("#tdRpt :checked").each(function(e){if(e<c){e=$(this).next().val();if(step1.TestAdd(e)){b+=
step1.addsongstr($(this.parentNode.parentNode).find("#songname").get(0).innerHTML,e);add_Test=true}}});if(b!=""){$("#tbmysong").append(b);$("#trAddsong").show();$("#ckbSelAllDel").removeAttr("checked");step1.Number();step1.add_cookie()}}},moveAllSel_iframe:function(a){var d=$(parent.document.getElementById("tbmysong")).find("table").length;if(step1.isFull_iframe(d)){a=$(parent.document.getElementById("seach_info"));a.html("\u6b4c\u66f2\u5df2\u6ee1");a.show();a.fadeOut(3E3)}else{var c=addSong_Limit_Count-
d;a=geteventsrc(a);var b=false,e="";$(a).parents("#tbsonglist").find("#tdRpt :checked").each(function(g){if(g<c){g=$(this).next().val();if(step1.TestAdd_iframe(g)){e+=step1.addsongstr($(this.parentNode.parentNode).find("#songname").html(),g);b=true}}});if(b){$(parent.document.getElementById("tbmysong")).append(e);step1.add_cookie_iframe();a=$(parent.document.getElementById("seach_info"));a.html("\u6dfb\u52a0\u6210\u529f");a.show();a.fadeOut(3E3);step1.Number_iframe();$(parent.document.getElementById("trAddsong")).show();
$(parent.document.getElementById("ckbSelAllDel")).removeAttr("checked")}}},moveAlbum:function(a,d,c){c=geteventsrc(c);var b=$(c).parents("#tb_musongs").find("#musongs");$.trim(b.html())==""?step1.getChildSongs(a,d,b,c):step1.addAlbum(c)},addAlbum:function(a){var d=$("#tbmysong table").length;if(!step1.isFull(d)){var c=addSong_Limit_Count-d,b="";$(a).parents("#tb_musongs").find("#tdRpt :checkbox").each(function(e){if(e<c){e=$(this.parentNode.parentNode).find(":hidden").val();if(step1.TestAdd(e))b+=
step1.addsongstr($(this.parentNode.parentNode).find("#songname").html(),e)}});if(b!=""){$("#tbmysong").append(b);$("#trAddsong").show();$("#ckbSelAllDel").removeAttr("checked");step1.Number();step1.add_cookie()}}},delMe:function(a){a=geteventsrc(a);$(a).parents("#trMysongs").remove();step1.Number();step1.isNotSongs()},funDelAll:function(){$("#tbmysong").find(":checked").each(function(){$(this).parents("#trMysongs").remove()});step1.Number();step1.isNotSongs();$("#ckbSelAllDel").removeAttr("checked")},
TestAdd_iframe:function(a){var d=true;$(parent.document.getElementById("tbmysong")).find(":hidden").each(function(){if($(this).val()==a)d=false});return d},TestAdd:function(a){var d=true;$("#tbmysong :hidden").each(function(){if($(this).val()==a)d=false});return d},add_song_cookie:function(a){if($("#tbmysong :hidden").length>0){if(a=="2")window.location.href="step2_fashion.aspx";if(a=="3")window.location.href="step3_preview.aspx"}else alert("\u8bf7\u5148\u6dfb\u52a0\u6b4c\u66f2")},add_cookie:function(){var a=
"";$("#tbmysong :hidden").each(function(){a+=$(this).val()+","});if(a!=""){cookiehelper.delCookie("wgp_musicContent");a=a.substr(0,a.length-1);a!=""&&cookiehelper.setCookie("wgp_musicContent",a)}},add_cookie_iframe:function(){var a="";$(parent.document.getElementById("tbmysong")).find(":hidden").each(function(){a+=$(this).val()+","});if(a!=""){cookiehelper.delCookie("wgp_musicContent");a=a.substr(0,a.length-1);a!=""&&cookiehelper.setCookie("wgp_musicContent",a)}},tabclass:function(a,d,c){c=geteventsrc(c);
var b=$(c.parentNode.parentNode).find("."+a);b.removeClass(a);b.addClass(d);$(c).removeClass(d);$(c).addClass(a)},hoverSong:function(a){a=geteventsrc(a);$(a).parents("#tdsong_container").css("background-color","#efefef")},outSong:function(a){a=geteventsrc(a);$(a).parents("#tdsong_container").css("background-color","#FFFFFF")},hoverAlbum:function(a){a=geteventsrc(a);$(a).parents("#tdalbum_container").css("background-color","#efefef")},outAlbum:function(a){a=geteventsrc(a);$(a).parents("#tdalbum_container").css("background-color",
"#FFFFFF")},playAlbum:function(a,d,c){c=geteventsrc(c);var b=$(c).parents("#tb_musongs").find("#musongs");$.trim(b.html())==""?step1.getChildSongs(a,d,b,c):step1.playAllSong(c)},playAllSong:function(a){var d="";$(a).parents("#tb_musongs").find("#tdRpt :checkbox").each(function(){d+=$(this.parentNode.parentNode).find(":checkbox").val()+","});if(d!=""){d=d.substring(0,d.lastIndexOf(","));openPlayer(d)}else alert("\u8be5\u4e13\u8f91\u91cc\u9762\u6ca1\u6709\u6b4c\u66f2")},search_song:function(){var a=
$.trim($("#textfield").val());a=filterHtmlTag(a);if(a!=""){$("#ifr_search").attr("src","search_song.aspx?songkey="+a);$.blockUI({message:$("#div_search"),css:{left:($(window).width()-554)/2+"px",top:($(window).height()-490)/2+"px"}});$("#sp_search").html("\u5173\u4e8e\u201c<b>"+a+"</b>\u201d\u7684\u6b4c\u66f2\u6709\uff1a")}},search_song_key:function(a){a=a?a:window.event?window.event:null;if(a.keyCode==13){a=$.trim($("#textfield").val());a=filterHtmlTag(a);if(a!=""){$("#ifr_search").attr("src","search_song.aspx?songkey="+
a);$.blockUI({message:$("#div_search"),css:{left:($(window).width()-554)/2+"px",top:($(window).height()-490)/2+"px"}});$("#sp_search").html("\u5173\u4e8e\u201c<b>"+a+"</b>\u201d\u7684\u6b4c\u66f2\u6709\uff1a")}}},close:function(){$.unblockUI()},li_hover:function(a){a=geteventsrc(a);$(a).css("color","#DD040A");$(a).css("background","#ffffff");$(a).css("font-weight","bold")},li_out:function(a){a=geteventsrc(a);$(a).css("color","#333333");$(a).css("background","#efefef");$(a).css("font-weight","normal")},
body_mousedown:function(a){a=geteventsrc(a);if(a.id=="more_div")$(a).find("ul").toggle();else $(a).parents("#more_div").length<1&&$("#more_div ul").hide()}},step2_fashion={SelectWidget:function(a,d,c,b,e){cookiehelper.setCookie("wgp_func",a);cookiehelper.setCookie("wgp_width",d);cookiehelper.setCookie("wgp_height",c);cookiehelper.setCookie("wgp_baimg",b);cookiehelper.setCookie("wgp_textcolor",e);cookiehelper.setCookie("wgp_bgcolor","");try{var g=$("#widgethtml").get(0);step2_fashion.getWidgetHtml(g)}catch(j){alert(j.description)}},
dis_all:function(a){a=geteventsrc(a);if($.trim($(a).html())=="\u663e\u793a\u5168\u90e8"){$(a).parents("#tbstyle").find(".tb_style").show();$(a).html("\u9ed8\u8ba4\u663e\u793a")}else{$(a).parents("#tbstyle").find(".tb_style").each(function(d){d>=4&&$(this).hide()});$(a).html("\u663e\u793a\u5168\u90e8")}},getEncodPram:function(a){Widgets.Web.ajax.AjaxHandle.GetEncodePram(a)},getWidgetHtml:function(a){var d=getPrameter.getpram("wgp_height"),c=getPrameter.getpram("wgp_width"),b=getPrameter.getpram("wgp_func"),
e=getPrameter.getpram("userName"),g=getPrameter.getpram("wgp_musicContent"),j=getPrameter.getpram("wgp_bgcolor"),l=getPrameter.getpram("wgp_textcolor"),m=getPrameter.getpram("wgp_baimg");getPrameter.getpram("wpid");var n=getPrameter.getpram("autoplay"),o=getPrameter.getpram("shuffle"),k="";if(document.getElementById("basepath")!=null)k=$("#basepath").val();var f='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';f+='id="widgetplayer" width="'+c+'" height="'+d+'"';f+=' codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">';
f+='<param name="movie" value="'+k+"swf/widgetplayer.swf?p=";b="widget="+k+"swf/"+b+"&noad=1&user="+e+"&type=song&width="+c+"&content="+g+"&autoplay="+n+"&shuffle="+o;b+=j==""?"&tbgimage="+m:"&tbgcolor="+j;b+="&ttextcolor="+l+'" />';Widgets.Web.ajax.AjaxHandle.GetEncodePram(b,function(i){f+=i.value;f+='"<param name="quality" value="high" />';f+='<param name="bgcolor" value="#ffffff" />';f+='<param name="allowScriptAccess" value="sameDomain" />';f+='<param name="wmode" value="transparent" />';f+='<embed src= "'+
k+"swf/widgetplayer.swf?p=";f+=i.value;f+='" width="'+c+'" height="'+d+'" name="widgetplayer" align="middle"';f+='play="true"';f+='loop="false"';f+='quality="high"';f+='allowScriptAccess="sameDomain"';f+='type="application/x-shockwave-flash"';f+='wmode="transparent"';f+='pluginspage="http://www.adobe.com/go/getflashplayer"></embed></object>';a.innerHTML=f})},init:function(){var a=$("#widgethtml").get(0);step2_fashion.getWidgetHtml(a)}},step2_sugar={initdata:function(){var a=$("#widgethtml").get(0);
step2_fashion.getWidgetHtml(a);$("#bgColorPick").colorpicker("#textfield","#colorval",1);$("#fontColorPick").colorpicker("#textfield2","#fontColor",2);step2_sugar.GetUpImgs();step2_sugar.GetDefaultImgs()},flash_bg:function(){step2_sugar.BgColor($("#textfield").val().substring(1))},flash_txt:function(){step2_sugar.TextColor($("#textfield2").val().substring(1))},witeWidget:function(){$("#bgColorPick").colorpicker("#textfield","#colorval",1);$("#fontColorPick").colorpicker("#textfield2","#fontColor",
2)},thisMovie:function(a){return navigator.appName.indexOf("Microsoft")!=-1?document.getElementById(a):document[a]},BgColor:function(a){var d=step2_sugar.thisMovie("widgetplayer");cookiehelper.setCookie("wgp_bgcolor",a);d.tbgcolor(a);cookiehelper.setCookie("wgp_baimg","")},BgImage:function(a){var d=step2_sugar.thisMovie("widgetplayer");cookiehelper.setCookie("wgp_baimg",a);d.tbgimage(a);cookiehelper.setCookie("wgp_bgcolor","")},TextColor:function(a){var d=step2_sugar.thisMovie("widgetplayer");cookiehelper.setCookie("wgp_textcolor",
a);d.ttextcolor(a)},GetUpImgs:function(){Widgets.Web.ajax.AjaxHandle.GetUserUpPlayerImg(function(a){$("#tbUpimg").html(a.value)})},GetDefaultImgs:function(){Widgets.Web.ajax.AjaxHandle.GetDefaultPlayerImg(function(a){$("#tb_dft_img").html(a.value)})},selectImg:function(a,d){a=geteventsrc(a);$(a).parents("#td_img_parent").find("."+d).removeClass(d);$(a.parentNode.parentNode).addClass(d)},doajaxFileUpload:function(){if(step2_sugar.Valid()){$("#upinfo").ajaxStart(function(){$(this).html("\u6b63\u5728\u4e0a\u4f20...")});
$.ajaxFileUpload({url:"ajax/upload.ashx",secureuri:false,fileElementId:"fileupload",dataType:"json",success:function(a){step2_sugar.GetUpImgs();$("#upinfo").html(a.msg)},error:function(){$("#upinfo").html("\u4e0a\u4f20\u5931\u8d25\uff01")}})}},Valid:function(){var a=false,d=$("#fileupload").val();if($.trim(d)==""){$("#upinfo").html(" \u8bf7\u8f93\u5165\u56fe\u7247\u5730\u5740! ");$("#fileupload").focus()}else{d=d.substr(d.lastIndexOf(".")+1,3);if(d!="gif"&&d!="jpg"&&d!="bmp")$("#upinfo").html(" \u8bf7\u9009\u62e9\u6b63\u786e\u7684\u56fe\u7247\u683c\u5f0f! ");
else{d=new Image;d.src=$("#fileupload").val();if(d.fileSize>102400){$("#upinfo").html(" \u8bf7\u4e0a\u4f20\u5c0f\u4e8e100K\u7684\u56fe\u7247 ");$("#fileupload").focus()}else a=true}}return a}},step3_preview={ChangeWidth:function(a){if(getPrameter.getpram("wgp_width")!=a){cookiehelper.setCookie("wgp_width",a);$("#textfield").val(a+"");step3_preview.viewWidget()}$("#codetr").hide();$("#info").hide();$("#yes").hide();$("#no").hide()},GetDefaultWidth:function(){var a=$(":checked").next().next().next("#hid_zonewidth").val();
step3_preview.ChangeWidth(a)},SetAutoPlay:function(){var a=$("#ckAutoPlay").attr("checked");cookiehelper.setCookie("autoplay",a?"1":"0")},SetRandomPlay:function(){var a=$("#ckRandomPlay").attr("checked");cookiehelper.setCookie("shuffle",a?"1":"0")},PreWidth:function(){var a=$.trim($("#textfield").val());if(a==""){$("#widthinfo").html("\u8bf7\u5148\u8f93\u5165\u5bbd\u5ea6");$("#widthinfo").show()}else if(/^[1-9]+[0-9]*]*$/.test(a)){a=parseInt(a);if(a<150){a=150;$("#textfield").val("150")}if(a>360){a=
360;$("#textfield").val("360")}step3_preview.ChangeWidth(a);$("#widthinfo").hide()}else{$("#widthinfo").html("\u53ea\u80fd\u662f\u6b63\u6574\u6570");$("#widthinfo").show()}},viewWidget:function(){var a=$("#widgethtml").get(0);step2_fashion.getWidgetHtml(a)},resetWgtName:function(){$("#wpname").val("");$("#info").hide();$("#yes").hide();$("#no").hide();$("#codetr").hide()},wgtNameChange:function(){$("#info").hide();$("#yes").hide();$("#no").hide()},initdpredata:function(){var a=cookiehelper.getCookie_decode("widgetName"),
d=cookiehelper.getCookie("zstyleid"),c=getPrameter.getpram("wgp_width"),b=getPrameter.getpram("Edit");$("#textfield").val(c);if(a!=null){$("#wpname").val(a);if(b!=null){$("#wpname").attr("readonly","readonly");$("#editname").show()}}if(d!=null)$(":radio").each(function(){if($.trim($(this).next().next("#hid_syleid").val())==$.trim(d)){$(this).attr("checked","checked");return false}});else $(":radio").get(0).checked="checked";$("#ckAutoPlay")[0].checked=getPrameter.getpram("autoplay")=="1"?true:false;
$("#ckRandomPlay")[0].checked=getPrameter.getpram("shuffle")=="1"?true:false;step3_preview.viewWidget();$("#savewidget").click(function(){var e,g=$.trim($("#textfield").val());if(g!="")if(/^[1-9]+[0-9]*]*$/.test(g)){g=parseInt(g);if(g<150)g=150;if(g>360)g=360;step3_preview.ChangeWidth(g)}else step3_preview.GetDefaultWidth();else step3_preview.GetDefaultWidth();e=getPrameter.getpram("wgp_width");var j=getPrameter.getpram("wgp_height");g=getPrameter.getpram("wgp_musicContent");var l=getPrameter.getpram("wgp_func"),
m=getPrameter.getpram("wgp_bgcolor"),n=getPrameter.getpram("wgp_textcolor"),o=getPrameter.getpram("wgp_baimg"),k=getPrameter.getpram("autoplay"),f=getPrameter.getpram("shuffle"),i=$.trim($("#wpname").val());if(i==""){$("#info").html("\u540d\u5b57\u4e0d\u80fd\u7a7a");$("#info").show()}else{i=filterHtmlTag(i);if(i==""){$("#info").html("\u8f93\u5165\u65e0\u6548\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165");$("#info").show()}else{$("#info").hide();var p=$.trim($(":checked").next().next(":hidden").val());cookiehelper.setCookie("zstyleid",
p);$("#saveinfo").html("\u6b63\u5728\u751f\u6210...");$("#saveinfo").show();Widgets.Web.ajax.AjaxHandle.SaveWidget(l,i,e,j,m,n,o,g,"\u5de8\u9cb8\u4e50\u5ba2",p,k,f,function(h){h=h.value;if(h=="wpname"){$("#info").html("widget\u7684\u540d\u5b57\u4e0d\u80fd\u8d85\u8fc748\u4e2a\u5b57\u7b26");$("#info").show();$("#codetr").hide();$("#saveinfo").hide()}else if(h!="Exists")if(h=="stopword")alert("\u8bf7\u4e0d\u8981\u8f93\u5165\u975e\u6cd5\u5185\u5bb9");else if(h.indexOf("Error")==0)alert(h);else{h="http://widget.top100.cn/swf/widgetplayer.swf?p="+
h;var q="<embed src='"+h+"' width='"+e+"' height='"+j+"' type='application/x-shockwave-flash' wmode='transparent'></embed>";$("#codetr").show();$("#code_textarea").val(q);$("#code_src").val(h);$("#saveinfo").html("\u751f\u6210\u6210\u529f\uff01");step3_preview.viewWidget();$("#saveinfo").fadeOut(3E3);$("#textfield").val(e);$("#widthinfo").hide();$("#info").hide();$("#yes").hide();$("#no").hide();$("#yes").unbind("click")}else{$("#saveinfo").hide();$("#info").html("\u540d\u5b57\u5df2\u5b58\u5728,\u66f4\u65b0\u539f\u6709\u7684Widget? ");
$("#yes").show();$("#no").show();$("#info").show();$("#codetr").hide();$("#yes").bind("click",function(){$("#info").hide();$("#yes").hide();$("#no").hide();cookiehelper.setCookie("update","update");$("#savewidget").click()})}})}}})}},getPrameter={getpram:function(a){var d=cookiehelper.getCookie(a);if(d==null)d=getPrameter.pramDefault(a);return d},pramDefault:function(a){switch(a){case "wgp_bgcolor":return"";case "wgp_musicType":return"song";case "autoplay":return"1";case "shuffle":return"0";default:return null}}},
cookiehelper={setCookie:function(a,d){var c=new Date;c.setTime(c.getTime()+2592E6);document.cookie=a+"="+escape(d)+";expires="+c.toGMTString()+";path=/;domain=top100.cn"},getCookie:function(a){var d;return(d=document.cookie.match(new RegExp("(^| )"+a+"=([^;]*)(;|$)")))?unescape(d[2]):null},getCookie_decode:function(a){var d;return(d=document.cookie.match(new RegExp("(^| )"+a+"=([^;]*)(;|$)")))?decodeURIComponent(d[2]):null},delCookie:function(a){var d=new Date;d.setTime(d.getTime()-1);var c=cookiehelper.getCookie(a);
if(c!=null)document.cookie=a+"="+c+";expires="+d.toGMTString()+";path=/;"}},copyToClipboard=function(a){if(window.clipboardData){window.clipboardData.clearData();window.clipboardData.setData("Text",a)}else if(navigator.userAgent.indexOf("Opera")!=-1)window.location=a;else if(window.netscape){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")}catch(d){alert("\u60a8\u7684firefox\u5b89\u5168\u9650\u5236\u9650\u5236\u60a8\u8fdb\u884c\u526a\u8d34\u677f\u64cd\u4f5c\uff0c\u8bf7\u5728\u5730\u5740\u680f\u4e2d\u8f93\u5165\u201cabout:config\u201d\u5c06\u201csigned.applets.codebase_principal_support\u201d\u8bbe\u7f6e\u4e3a\u201ctrue\u201d\u4e4b\u540e\u91cd\u8bd5");
return false}var c=Components.classes["@mozilla.org/widget/clipboard;1"].createInstance(Components.interfaces.nsIClipboard);if(c){var b=Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);if(b){b.addDataFlavor("text/unicode");var e={};e=Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);e.data=a;b.setTransferData("text/unicode",e,a.length*2);if(!c)return false;c.setData(b,null,Components.interfaces.nsIClipboard.kGlobalClipboard)}}}},
trimArrayItemFirstFlag=function(a){a=a.split(",");for(var d=0;d<a.length;d++)a[d]=a[d].substring(1);return a.join(",")},openPlayer=function(a){var d="artist";if(a.indexOf("m")==0)d="song";if(a.indexOf("s")==0)d="album";if(a.indexOf("p")==0)d="top100songlist";a="http://www.top100.cn/audition/flplayer.html?"+d+"="+trimArrayItemFirstFlag(a);window.open(a,"playWindow","width=790px,height=590px,top=100px,left=120px,scrollbars=no,resizable=yes").focus()},trim=function(a){return a.replace(/(^\s*)|(\s*$)/g,
"")},openAllPlayer=function(a){a=a.substr(0,a.length-1);cookiehelper.setCookie("AuditionTrackList",a);playWindow=window.open("http://www.top100.cn/Audition/flplayer.html?cookie=AuditionTrackList","playWindow","width=800px,height=600px,top=100px,left=120px,scrollbars=no,resizable=yes");playWindow.focus()},filterHtmlTag=function(a){return a.replace(/"/g,"").replace(/'/g,"").replace(/(\<.[^\<]*\>)/g,"")};
