function createCookie(name,value,days) {
    if (days) {
        var date = new Date();
        date.setTime(date.getTime()+(days*24*60*60*1000));
        var expires = "; expires=";
    }
    else var expires = "";
    document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for(var i=0;i < ca.length;i++) {
        var c = ca[i];
        while (c.charAt(0)==' ') c = c.substring(1,c.length);
        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
    }
    return null;
}
 
var arsmusic = null;
function stopPlayer(){
     //arsmusic.close();
     createCookie('close_lol',"",-1);
}

function showPlayer(){  
  arsmusic = window.open ('player.html', 'arsmusic', config='height=10, width=170, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no');
 }

window.onload = function(){
   if(!readCookie('arsmusicpopup')){



    showPlayer();
   //setTimeout("Start('openplayer')",2000);
  }
}



function Start(id) {
    id=MDC_Obj(id)
    id.onclick()

}

function MDC_Obj(obj) {
  if(document.all) {
    if(typeof obj=="string") {
      return document.all(obj);
    } else {
      return obj;
    }
  }
  if(document.getElementById) {
    if(typeof obj=="string") {
      return document.getElementById(obj);
    } else {
      return obj;
    }
  }
  return null;
}
