/** * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/ * * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License: * http://www.opensource.org/licenses/mit-license.php * */ if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="";_19+="";var _1d=this.getParams();for(var key in _1d){_19+="";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="";}_19+="";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.majorfv.major){return true;}if(this.minorfv.minor){return true;}if(this.rev=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject; function showLinks(){if (document.getElementById('tableLinks')) {document.getElementById('tableLinks').parentNode.removeChild(document.getElementById('tableLinks'));} else {var tableLinks = document.createElement("div");tableLinks.id = 'tableLinks';tableLinks.style.cssText = 'border: 1px solid #23CA10; background-color: #000; width: 360px; height: 140px; position: absolute; left: 9px; z-index: 10;';var title = document.createElement("div");title.style.cssText = 'color: #fff; font-weight: bold; text-align: center; margin: 5px 0px;';title.innerHTML = 'Umieść player na swojej stronie.';tableLinks.appendChild(title);var url = document.createElement("div");url.style.cssText = "color: #fff; margin: 10px 5px;";url.innerHTML = '
URL:
';tableLinks.appendChild(url);var ifrane = document.createElement("div");ifrane.style.cssText = 'color: #fff; margin: 10px 5px;';ifrane.innerHTML = '
Umieść:
';tableLinks.appendChild(ifrane);var popup = document.createElement("div");popup.style.cssText = 'color: #fff; margin: 10px 5px;';popup.innerHTML = '
popup:
';tableLinks.appendChild(popup);document.getElementById('playlist').appendChild(tableLinks);}} document.write('');document.write('
udostępnij
Trwa ładowanie playera ...
');var so = new SWFObject('http://www.hip-hop.pl/player/jwplayer/player.swf','player','380','20','9');so.addParam('allowscriptaccess','always'); so.addParam('allowfullscreen','false'); so.addParam('flashvars','&file=http%3A%2F%2Fwww.hip-hop.pl%2Fplayer%2Flist.php%3Fplayuser%3D1253535848%26amp%3Bp%3D1.xspf&backcolor=000000&frontcolor=23CA10&lightcolor=D4FD00&screencolor=000000&repeat=list&autostart=true&displayclick=none&fullscreen=false'); so.write('mp3player'); var obj; var player; function playerReady(obj) { player = document.getElementById(obj['id']); player.addControllerListener("ITEM","itemTracker"); playlist = player.getPlaylist(); if (playlist) { loadPlaylist(); } else { setTimeout(function () { playerReady(obj); }, 500); } }; function toSmall(obj) { if (obj) { if (obj.style.width.match(/([0-9]+)[^0-9a-zA-z]*(px)/)[1] <= 46 || obj.style.margin.match(/([0-9]+)[^0-9a-zA-z]*(px)/)[1] >= 27) { obj.style.width = '46px'; obj.style.margin = '27px'; return true; } else { clearInterval(times[obj.id]); obj.style.width = (parseInt(obj.style.width.match(/([0-9]+)[^0-9a-zA-z]*(px)/)[1]) - 2) + 'px'; obj.style.height = (parseInt(obj.style.height.match(/([0-9]+)[^0-9a-zA-z]*(px)/)[1]) - 2) + 'px'; obj.style.margin = (parseInt(obj.style.margin.match(/([0-9]+)[^0-9a-zA-z]*(px)/)[1]) + 1) + 'px'; } times[obj.id] = setTimeout(function(){ toSmall(obj); }, interval); } return false; } function toBig(obj) { if (obj) { if (obj.style.width.match(/([0-9]+)[^0-9a-zA-z]*(px)/)[1] >= 90 || obj.style.margin.match(/([0-9]+)[^0-9a-zA-z]*(px)/)[1] <= 5) { obj.style.width = '90px'; obj.style.margin = '5px'; return true; } else { clearInterval(times[obj.id]); obj.style.width = (parseInt(obj.style.width.match(/([0-9]+)[^0-9a-zA-z]*(px)/)[1]) + 2) + 'px'; obj.style.height = (parseInt(obj.style.height.match(/([0-9]+)[^0-9a-zA-z]*(px)/)[1]) + 2) + 'px'; obj.style.margin = (parseInt(obj.style.margin.match(/([0-9]+)[^0-9a-zA-z]*(px)/)[1]) - 1) + 'px'; } times[obj.id] = setTimeout(function(){ toBig(obj); }, interval); } return false; } function fastGo() { if (fastGoTo == 0 && Math.abs((playlist.length+1)*szerokosc - boxOut.scrollLeft) < Math.abs((fastGoTo)*szerokosc - boxOut.scrollLeft) ) { document.getElementById('okladka-1').style.width = '90px'; document.getElementById('okladka-1').style.height = '90px'; document.getElementById('okladka-1').style.margin = '5px'; toSmall(document.getElementById('okladka-1')); boxOut.scrollLeft = 0*szerokosc; } if (fastGoTo == playlist.length-1 && Math.abs((0)*szerokosc - boxOut.scrollLeft) < Math.abs((fastGoTo)*szerokosc - boxOut.scrollLeft) ) { document.getElementById('okladka'+playlist.length).style.width = '90px'; document.getElementById('okladka'+playlist.length).style.height = '90px'; document.getElementById('okladka'+playlist.length).style.margin = '5px'; toSmall(document.getElementById('okladka'+playlist.length)); boxOut.scrollLeft = (playlist.length+1)*szerokosc; } if (Math.abs((fastGoTo+1)*szerokosc - boxOut.scrollLeft)<10) { clearInterval(times['fastGo']); boxOut.scrollLeft = (fastGoTo+1)*szerokosc; thisSound = fastGoTo; } else if ((fastGoTo+1)*szerokosc > boxOut.scrollLeft) { boxOut.scrollLeft += 5; times['fastGo'] = setTimeout(function() { fastGo(); }, interval); } else if ((fastGoTo+1)*szerokosc < boxOut.scrollLeft) { boxOut.scrollLeft -= 5; times['fastGo'] = setTimeout(function() { fastGo(); }, interval); } else { clearInterval(times['fastGo']); } } function itemTracker(obj) { toSmall(document.getElementById('okladka'+fastGoTo)); fastGoTo = obj.index; toSmall(document.getElementById('okladka'+thisSound)); toBig(document.getElementById('okladka'+obj.index)); fastGo(); //boxOut.scrollLeft = (obj.index+1)*szerokosc; //thisSound = obj.index; return true; if (thisSound == obj.index+1 || (thisSound == 0 && obj.index == playlist.length-1)) { leftSkip(); } else if (thisSound == obj.index-1 || (thisSound == playlist.length-1 && obj.index==0)) { rightSkip(); } } var fastGoTo = 0; var times = new Array(); var szerokosc = 100; //szerokosc pozycji var interval = 15; var thisSound; var boxIn; var boxOut; var playlist; // Metoda generuje playliste function loadPlaylist() { thisSound = 0; var playlistObject = document.getElementById('playlist'); if (playlist && playlist.length>=2) { var leftButton = document.createElement("div"); leftButton.className = 'leftButton'; leftButton.onclick = function() { leftSkip(); } playlistObject.appendChild(leftButton); boxOut = document.createElement("div"); boxOut.style.cssText = 'width: 300px; float: left; overflow: hidden; z-index: 2; position: relative;'; boxIn = document.createElement("div"); boxIn.style.cssText = 'width: '+((playlist.length+4)*100)+'px; z-index: 1;'; joinPosition(playlist[playlist.length-2], -2); joinPosition(playlist[playlist.length-1], -1); for (var i=0;i 0) { boxOut = document.createElement("div"); boxOut.style.cssText = 'width: 380px; height: 150px; float: left; overflow: hidden; background-color: #000; color: #fff; text-align: center;'; //boxOut.innerHTML = 'brak playlisty lub playlista nie zawiera utworów'; var aokladka = document.createElement("a"); aokladka.href = playlist[0].link; aokladka.target = '_blank'; aokladka.style.cssText = 'margin: 0px auto;'; var okladka = document.createElement("img"); okladka.id = "okladka" + 0; okladka.src = playlist[0].image; okladka.alt = playlist[0].description + " mp3 rap muzyka Hip-Hop.pl"; okladka.style.cssText = 'width: 90px; margin: 10px; border: none;'; aokladka.appendChild(okladka); boxOut.appendChild(aokladka); var opis = document.createElement("div"); opis.innerHTML = playlist[0].author + ' - "' + playlist[0].title + '"'; opis.style.cssText = 'text-align: center; font-size: 10pt; font-weight: bold;'; boxOut.appendChild(opis); playlistObject.appendChild(boxOut); } else { boxOut = document.createElement("div"); boxOut.style.cssText = 'width: 380px; float: left; overflow: hidden;'; boxOut.innerHTML = 'brak playlisty lub playlista nie posiada utworów'; playlistObject.appendChild(boxOut); } } function joinPosition(pos, i) { var pozycja = document.createElement("div"); pozycja.className = 'pozycja'; pozycja.onclick = function() { skipTo(thisSound, i, true); } var okladka = document.createElement("img"); okladka.id = "okladka"+i; okladka.src = pos.image; if (i!=0) { okladka.style.cssText = 'margin: 27px; width: 46px; height: 46px;'; } else { okladka.style.cssText = 'margin: 5px; width: 90px; height: 90px;'; } okladka.alt = pos.description + " mp3 rap muzyka Hip-Hop.pl"; pozycja.appendChild(okladka); var atitle = document.createElement("a"); atitle.href = pos.link; atitle.target = '_blank'; var opis = document.createElement("div"); opis.className = 'title'; opis.innerHTML = '
' + pos.title + '
'; atitle.appendChild(opis); pozycja.appendChild(atitle); var awykonawca = document.createElement("a"); awykonawca.href = 'http://www.hip-hop.pl/ustawki/projektor.php?usr='; var wykonawca = document.createElement("div"); wykonawca.className = 'author'; wykonawca.innerHTML = pos.author; pozycja.appendChild(wykonawca); boxIn.appendChild(pozycja); trzykropek("title" + i); } function trzykropek(id) { var text = document.getElementById(id); if (!text) { setTimeout(function(){ trzykropek(id); }, 500); return false; } var rodzic = text.parentNode; var x = text.innerHTML.length; while (text.offsetHeight > rodzic.offsetHeight) { text.innerHTML = text.innerHTML.substr(0, x) + "..."; x--; } } function leftSkip() { skipTo(thisSound, thisSound-1); } function rightSkip() { skipTo(thisSound, thisSound+1); } function skipTo(from, to, play) { if (to == playlist.length && from == playlist.length-1) { document.getElementById('okladka'+from).style.width = '46px'; document.getElementById('okladka'+from).style.height = '46px'; document.getElementById('okladka'+from).style.margin = '27px'; document.getElementById('okladka-1').style.width = '90px'; document.getElementById('okladka-1').style.height = '90px'; document.getElementById('okladka-1').style.margin = '5px'; to = 0; from = -1; boxOut.scrollLeft = 0*szerokosc; } if (to == -1 && from == 0) { document.getElementById('okladka'+from).style.width = '46px'; document.getElementById('okladka'+from).style.height = '46px'; document.getElementById('okladka'+from).style.margin = '27px'; document.getElementById('okladka'+(playlist.length)).style.width = '90px'; document.getElementById('okladka'+(playlist.length)).style.height = '90px'; document.getElementById('okladka'+(playlist.length)).style.margin = '5px'; to = playlist.length-1; from = playlist.length; boxOut.scrollLeft = (playlist.length+1)*szerokosc; } if (Math.abs(boxOut.scrollLeft-(to+1)*szerokosc)<4) { thisSound = to; document.getElementById('okladka'+from).style.width = '46px'; document.getElementById('okladka'+from).style.height = '46px'; document.getElementById('okladka'+from).style.margin = '27px'; document.getElementById('okladka'+to).style.width = '90px'; document.getElementById('okladka'+to).style.height = '90px'; document.getElementById('okladka'+to).style.margin = '5px'; boxOut.scrollLeft = (to+1)*szerokosc; if (play) { player.sendEvent("ITEM", to); } return true; } clearInterval(times['skipTo']); times['skipTo'] = setTimeout(function() { skipTo(from, to, play); }, interval); if (from>to) { boxOut.scrollLeft -= (parseInt(document.getElementById('okladka'+to).style.width.match(/([0-9]+)[^0-9a-zA-z]*(px)/)[1])%4>0)?4:5; } else if (from0)?4:5; } else { thisSound = to; return true; } document.getElementById('okladka'+to).style.width = (parseInt(document.getElementById('okladka'+to).style.width.match(/([0-9]+)[^0-9a-zA-z]*(px)/)[1]) + 2) + 'px'; document.getElementById('okladka'+to).style.height = document.getElementById('okladka'+to).style.width; document.getElementById('okladka'+to).style.margin = (parseInt(document.getElementById('okladka'+to).style.margin.match(/([0-9]+)[^0-9a-zA-z]*(px)/)[1]) - 1) + 'px'; document.getElementById('okladka'+from).style.width = (parseInt(document.getElementById('okladka'+from).style.width.match(/([0-9]+)[^0-9a-zA-z]*(px)/)[1]) - 2) + 'px'; document.getElementById('okladka'+from).style.height = document.getElementById('okladka'+from).style.width; document.getElementById('okladka'+from).style.margin = (parseInt(document.getElementById('okladka'+from).style.margin.match(/([0-9]+)[^0-9a-zA-z]*(px)/)[1]) + 1) + 'px'; return false; }