/**
 * @author b-XquiSite
 */

function openMP3Player(b)
{
	//alert(getCookieVal(4));
	if ( (get_cookie("mp3") == null) || (getCookieVal(4)=="0") || (b=="1"))
	{
		var opt = "titlebar=no, toolbar=no, status=no, menubar=no, resizable=no, location=no, width=387, height=418";
		window.open("../paginas/100surfMusic.php", "100surfMP3", opt);
		document.cookie = "mp3=1";
	}
}

function get_cookie(cookie_name)
{
  var results = document.cookie.match ( '(^|;) ?' + cookie_name + '=([^;]*)(;|$)' );

  if ( results )
    return ( unescape ( results[2] ) );
  else
    return null;
}

 
function cleanCookie()
{ document.cookie = "mp3=0"; }


function getCookieVal(offset)
{
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1) { endstr = document.cookie.length; }
	return unescape(document.cookie.substring(offset, endstr));
}