1// í¸ë리ì¤í¸ 2 3 4var playpopup; 5var playpopup_timeObject=''; 6 7 8 9var music = { 10 11 //ìì íë ì´ 12 13 play : function(isbn){ 14 this.doOpenPlayPopup('isbn', isbn); 15 }, 16 17 play_track : function(trackid){ 18 this.doOpenPlayPopup('track', trackid); 19 }, 20 21 //ìì 구ì 22 buy : function(isbn){ 23 var url = '/music/wmusicbasket.aspx?action=Add&ISBN=' + isbn; 24 window.open(url, 'MusicBasket', 'width=610,height=500,scrollbars=no'); 25 }, 26 27 //ìì ë³´ê´í¨ë´ê¸° 28 29 musicpaper : function(isbn){ 30 var url = '/shop/common/wmusicmypaper_popup.aspx?ISBN=' + isbn; 31 window.open(url, 'MusicPaper', 'width=410,height=230,scrollbars=no'); 32 }, 33 34 buy_ticket : function(isbn){ 35 //var url = '/order/worder_musicstep1.aspx?AddBook='+ isbn; 36 var url = '/order/worder_musicticket_precheck.aspx?ISBN='+ isbn; 37 window.open(url, 'wMusicTicketPay', 'width=720,height=720,scrollbars=auto'); 38 }, 39 40 buy_ticketautopay : function(isbn, eventId){ 41 var _eventId = (eventId ==null || eventId=='undefined') ? "0" : eventId; 42 var url = '/order/worder_musicticket_precheck.aspx?ISBN='+ isbn+ '&EventId='+ _eventId; 43 //var url = '/order/worder_musicautopay_agree.aspx?ISBN='+ isbn + '&EventId='+ _eventId; 44 window.open(url, 'wMusicTicketAutoPay', 'width=720,height=720,scrollbars=auto'); 45 }, 46 47 is_ie : function(){ 48 return navigator.userAgent.toLowerCase().indexOf("msie")!=-1;; 49 }, 50 51 doOpenPlayPopup : function(mode, id){ 52 53 //ë¹ieì¼ëë ìì¸ì²ë¦¬... 54 if(this.is_ie()==false){ 55 window.open('/music/whelp_ie.aspx', 'MusicPlayer', 'width=360,height=556,scrollbars=no'); 56 return; 57 } 58 59 var url = this.makeNotSSLUrl('/music/winstall.aspx'); 60 var reOpen = false; 61 62 if(typeof(playpopup) == 'undefined') 63 { 64 //ë°ë¥íì´ì§ê° ì´ëëê±°ë ìë¡ê³ 침ëê²½ì°ë¥¼ ê³ ë ¤íì¬ ê¸°ì¡´íì ì¬ì¤í 65 playpopup = window.open('', 'MusicPlayer', 'width=360,height=556,scrollbars=no'); 66 67 //flagPopupOpen ì´'undefined' ì´ë©´ ì²ì ì°½ì ì¬ë ê²½ì° 68 if(typeof(playpopup.flagPopupOpen) == 'undefined'){reOpen=true;} 69 } 70 71 //íì ì°½ì ì´ìë¤ê° ë¤ì ë«ìê²½ì° 72 if(playpopup.closed){reOpen=true;} 73 74 if(reOpen){ 75 playpopup = window.open(url, 'MusicPlayer', 'width=360,height=556,scrollbars=no'); 76 } 77 78 79 //flagPopupOpen ì´'undefined' ì´ë©´ íì ë¡ë©ì ì´ê¸°ë문ì... ìê°ì ëë¤... 80 if(typeof(playpopup.oMP3Player) == 'undefined'){ 81 music.resetTimer(playpopup_timeObject); 82 playpopup_timeObject = setTimeout(function(){music.doOpenPlayPopup(mode, id);}, 600); 83 return; 84 } 85 86 87 //íë ì´ ëª©ë¡ ë¡ë©ì ì´ê¸° ë문ì.. ìê°ì ëë¤... 88 if(playpopup.oMP3Player.initplaylist_finished == false){ 89 music.resetTimer(playpopup_timeObject); 90 playpopup_timeObject = setTimeout(function(){music.doOpenPlayPopup(mode, id);}, 600); 91 return; 92 } 93 94 95 if(mode=='mymusic'){ 96 playpopup.showMyMusic(); 97 }else if(mode=='isbn'){ 98 playpopup.addisbn(id); 99 }else if(mode=='track'){ 100 playpopup.addTrack(id); 101 } 102 103 104 playpopup.focus(); 105 }, 106 107 resetTimer : function(timeObj){ 108 if(timeObj && timeObj!='') clearTimeout(timeObj); 109 }, 110 111 112 makeNotSSLUrl : function(url){ 113 var preFix=''; 114 if(document.location.protocol == "https:"){ //https íì´ì§ ì¬ë¶ íì¸ 115 preFix='http://' + document.location.host; 116 } 117 return preFix + url; 118 } 119 120} 121 122// mode 123//'one':í곡ë£ê¸° 124//'all':ì ì²´ë£ê¸° 125//'sel':ì íë£ê¸° 126//'ran':ëë¤ë£ê¸° 127 128function TrackList(){ 129 this.div=''; 130 131} 132 133TrackList.prototype.checkall=function(flag){ 134 var objs = this.div.getElementsByTagName("input"); 135 for(var i=0;i<objs.length;i++){ 136 if(objs[i].type=="checkbox") 137 { 138 objs[i].checked=flag; 139 } 140 } 141} 142 143TrackList.prototype.cartlist=function(){ 144 var cart = new Array(); 145 var objs = this.div.getElementsByTagName("input"); 146 for(var i=0;i<objs.length;i++){ 147 if(objs[i].type=="checkbox") 148 { 149 if(objs[i].checked && objs[i].value>0){ 150 cart.push(objs[i].value); 151 } 152 } 153 } 154 return cart; 155} 156 157TrackList.prototype.shuffle=function(array){ 158 var len = array.length; 159 for(var i=len ; i>0 ; i--) { 160 array[len-1] = array.splice(Math.floor(Math.random() * i),1)[0]; 161 } 162} 163 164TrackList.prototype.play=function(mode, trackid){ 165 var id = ''; 166 switch(mode){ 167 case 'one':id=trackid;break; 168 case 'sel':id=this.cartlist();break; 169 case 'all':this.checkall(true);id=this.cartlist();break; 170 case 'ran': 171 var array = (this.cartlist() + '').split(','); 172 this.shuffle(array); 173 id=array.join(); 174 break; 175 } 176 177 if(id==''){ 178 alert('íë ì´ì´ì ì¶ê°í ìì ì ì íí´ ì£¼ì¸ì'); 179 return; 180 } 181 music.doOpenPlayPopup('track',id); 182} 183 184TrackList.prototype.resetTimer=function(timeObj){ 185 if(timeObj && timeObj!='') clearTimeout(timeObj); 186} 187 188 189 190 191//ìì ë³´ê´í¨ ë´ê¸° 192TrackList.prototype.musicpaper=function(mode, trackid){ 193 var id = ''; 194 195 switch(mode){ 196 case 'one':id=trackid;break; 197 case 'sel':id=this.cartlist();break; 198 case 'all':this.checkall(true);id=this.cartlist();break; 199 } 200 201 if(id==''){ 202 alert('ë³´ê´í¨ì ë´ì ìì ì ì íí´ ì£¼ì¸ì'); 203 return; 204 } 205 206 var url = this.makeNotSSLUrl('/shop/common/wmusicmypaper_popup.aspx?trackId=' + id); 207 window.open(url, 'MusicPaper', 'width=410,height=230,scrollbars=no'); 208} 209 210//mp3 구매í기 211TrackList.prototype.buy=function(mode, trackid){ 212 var id = ''; 213 214 switch(mode){ 215 case 'one':id=trackid;break; 216 case 'sel':id=this.cartlist();break; 217 case 'all':this.checkall(true);id=this.cartlist();break; 218 } 219 220 if(id==''){ 221 alert('구매íì¤ ìì ì ì íí´ ì£¼ì¸ì'); 222 return; 223 } 224 225 var url = this.makeNotSSLUrl('/music/wmusicbasket.aspx?action=Add&trackId=' + id); 226 window.open(url, 'MusicBasket', 'width=610,height=500,scrollbars=no'); 227} 228 229 230 231//mp3 ë¤ì´ë¡ë 232TrackList.prototype.down=function(mode, trackid){ 233 var id = ''; 234 235 switch(mode){ 236 case 'one':id=trackid;break; 237 case 'sel':id=this.cartlist();break; 238 case 'all':this.checkall(true);id=this.cartlist();break; 239 } 240 241 if(id==''){ 242 alert('ë¤ì´ë¡ëíì¤ ìì ì ì íí´ ì£¼ì¸ì'); 243 return; 244 } 245 246 247 var url = this.makeNotSSLUrl('/music/wdown.aspx?trackId=' + id); 248 window.open(url, 'MusicDown', 'width=750,height=500,scrollbars=no'); 249} 250 251TrackList.prototype.makeNotSSLUrl = function(url){ 252 var preFix=''; 253 if(document.location.protocol == "https:"){ //https íì´ì§ ì¬ë¶ íì¸ 254 preFix='http://' + document.location.host; 255 } 256 return preFix + url; 257} 258 259 260TrackList.prototype.lyrics=function(trackid){ 261 var url = this.makeNotSSLUrl('/music/wlyrics.aspx?trackId=' + trackid); 262 window.open(url, 'MusicLyrics', 'width=400,height=500,scrollbars=no'); 263} 264 265 266TrackList.prototype.clickCheckAll=function(){ 267 if($('chk_track_all').checked){ 268 $('img_track_all').src = "http://image.aladdin.co.kr/img/music/musicmp3/bt/nm_bt_choice_1_off.gif"; 269 $('img_track_all_down').src = "http://image.aladdin.co.kr/img/music/musicmp3/bt/nm_bt_choice_1_off.gif"; 270 $('chk_track_all').checked = false;
271 }else{ 272 $('img_track_all').src = "http://image.aladdin.co.kr/img/music/musicmp3/bt/nm_bt_choice_2_off.gif"; 273 $('img_track_all_down').src = "http://image.aladdin.co.kr/img/music/musicmp3/bt/nm_bt_choice_2_off.gif"; 274 $('chk_track_all').checked = true; 275 } 276 277 this.checkall($('chk_track_all').checked); 278} 279 280TrackList.prototype.mouseOn=function(img){img.src=img.src.replace('off.gif','on.gif');} 281TrackList.prototype.mouseOff=function(img){img.src=img.src.replace('on.gif','off.gif');}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.