function getCookie (name) {
    var prefix = name + '=';
    var c = document.cookie;
    var nullstring = '';
    var cookieStartIndex = c.indexOf(prefix);
    if (cookieStartIndex == -1)
        return nullstring;
    var cookieEndIndex = c.indexOf(";", cookieStartIndex + prefix.length);
    if (cookieEndIndex == -1)
        cookieEndIndex = c.length;
    return unescape(c.substring(cookieStartIndex + prefix.length, cookieEndIndex));
}
function setCookie (name, value, expires, path, domain, secure) {
	var today = new Date();
	today.setTime( today.getTime() );
	if ( expires ) {
		expires = expires * 1000 * 60 * 60 * 24;
	}
	var expires_date = new Date( today.getTime() + (expires) );
	document.cookie = name+"="+( value ) +
		( ( expires ) ? ";expires="+expires_date.toGMTString() : "" ) + //expires.toGMTString()
		( ( path ) ? ";path=" + path : "" ) +
		( ( domain ) ? ";domain=" + domain : "" ) +
		( ( secure ) ? ";secure" : "" );
}

function quova () {
		try{
			var message = document.getElementById("divPlayerImage");
			var STRINGA_QUOVA = "<br><br><br><br><br><br>Spiacente, la visione di questi filmato &egrave; consentita solo agli utenti nel territorio italiano"
								+"<br><br>Sorry this content is reserved to the users in the Italian country";
			message.innerHTML = STRINGA_QUOVA;
		} catch(e)	{
		//E' stato messo un try-catch perchè se la pagina caricata non ha
		// document.getElementById("divPlayerImage");
		//non va in errore il js
	}
}

function naviga (url) {
	window.close();
	window.opener.location.href=url;
}

function changeClassRaitv(id, className)
{
	var object = document.getElementById(id);
	if(object !== null)
	{
		object.className = className;
		object.style.className = className;
	}
}
