(function(){	
	var SetCookie = function(name,value){
		if(!name || !value){
		}
		var argv = arguments;
		var argc = arguments.length;
	
		var expire_date = new Date();
		expire_date.setUTCHours(23, 59, 59);
		var c = name + "=" + value +";" +"expires=" + expire_date.toGMTString();
			
		document.cookie = c;
	 };
	var GetCookie = function(name){
		var arg = name + "=";
		var alen = arg.length;
		var clen = document.cookie.length;
		var i = 0;
		while (i < clen) {
			var j = i + alen;
			if (document.cookie.substring(i, j) == arg){
				return getCookieVal (j); 
			}
			i = document.cookie.indexOf("", i) + 1;
			if (i == 0){
				break;
			} 
		}
		return '';
	};
	function getCookieVal (offset){
		var endstr = document.cookie.indexOf (";", offset);
		if (endstr == -1){
			endstr = document.cookie.length;
		}
		return unescape(document.cookie.substring(offset, endstr));
	}
	var addCSS = function(sCssText){
	    if (!sCssText) {
	        return '';
	    }
	    var nStyle = document.createElement("style");
	    nStyle.setAttribute("type", "text/css");
	    if (nStyle.styleSheet) {
	        nStyle.styleSheet.cssText = sCssText;
	    } else {
	        var nCssText = document.createTextNode(sCssText);
	        nStyle.appendChild(nCssText);
	    }
	    var nHead = document.getElementsByTagName('head')[0];
	    nHead.appendChild(nStyle);
		return sCssText;
	};
	function addTime(cookiename){
		var cookievalue = GetCookie(cookiename);
		cookievalue = parseInt(cookievalue,10);
		if(!cookievalue){
			cookievalue = 0;
		}
		cookievalue ++;
		cookievalue += '';
		SetCookie(cookiename,cookievalue);	
		
	}
	(function(){
		var cookiename = 's_g_x_d_j_s_2';
		var csstext = '#mmisina{display:none;visibility:hidden;left:-9999px;}';
		var cookievalue = GetCookie(cookiename);
		var cvs = null;
		var maxtime = 2;
		if(cookievalue >= maxtime){
			//disable music
			addCSS(csstext);
		}else{
			//add time		
			addTime(cookiename);
		}
	})();
})();