/************************** * Script Copyright to TheWayToSay * www.TheWayToSay.com ***************************/ function open_player(url) { var pop = window.open(url,'','scrollbars=no,menubar=no,height=321,width=377,resizable=no,toolbar=no,location=no,status=no'); } function open_playerfull() { var pop = window.open('http://www.thewaytosay.com/player.html','','scrollbars=no,menubar=no,height=252,width=629,resizable=no,toolbar=no,location=no,status=no'); } function open_playerfullall() { var pop = window.open('http://www.thewaytosay.com/player/all','','scrollbars=no,menubar=no,height=252,width=629,resizable=no,toolbar=no,location=no,status=no'); } function playlist_add(id) { var playlist = get_cookie('playlist'); var reg = new RegExp("-"+id+"-"); if(reg.test(playlist) && playlist != null) { alert("Song is already on your playlist."); return; } var add = "" if(playlist == null) add = "-"+id+"-"; else add = playlist+id+"-"; set_cookie("playlist", add); alert("Added Song To Play List"); } function playlist_remove(id) { var playlist = get_cookie('playlist'); str = new String(playlist); var change = str.replace(new RegExp("-"+id+"-"), "-"); set_cookie("playlist", change); window.location.reload(); } function playlist_clear() { set_cookie("playlist", "-"); window.location.reload(); } function get_cookie(cookie_name ) { var results = document.cookie.match ( cookie_name + '=(.*?)(;|$)' ); if ( results ) return ( unescape ( results[1] ) ); else return null; } function set_cookie(name, value) { var cookie_string = name + "=" + escape ( value ); document.cookie = cookie_string; } function newimagegen() { var datetime = new Date(); document.getElementById('imgver').src ='http://www.thewaytosay.com/verifyimage/?a='+datetime.getTime(); document.getElementById('code').value = ''; } var isBusy = false; var request = false; var voteid = 0; function start_request() { try {request = new XMLHttpRequest();} catch (trymicrosoft) { try {request = new ActiveXObject("Msxml2.XMLHTTP");} catch (othermicrosoft) { try {request = new ActiveXObject("Microsoft.XMLHTTP");} catch (failed) {request = false;} } } if (!request) alert("Error initializing XMLHttpRequest!"); } function errorcheck() { if (request.readyState == 4){ isBusy = false; if (request.status == 200) return false; else { alert("Error status is: "+request.status); return true; } } else { return true; } } function vote(id, vote) { start_request() var datetime = new Date(); var url = "/downloads/vote/"+id+"/"+vote+"\.html?randomnumber="+datetime.getTime(); if (isBusy){ request.onreadystatechange = function () {} request.abort(); } voteid = id; request.open("POST", url, true); isBusy = true; var str="tehidz="+"38.107.191.102"; request.onreadystatechange = returnvote; request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8"); request.send(str); } function returnvote() { if(errorcheck()) return; document.getElementById("votebox-"+voteid).innerHTML = request.responseText; } var BrowserDetect={init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";this.OS=this.searchString(this.dataOS)||"an unknown OS";},searchString:function(data){for(var i=0;i