function Mesaj(sir)
{
	alert(sir);	
}

function IncaNu()
{
	Mesaj('Aceasta sectiune nu este inca disponibila.');
}

function NotYet()
{
	Mesaj('This section is not yet available.');
}

function Print()
{
	window.print();	
}

function disableCSS()
{
	if (document.getElementsByTagName)
		x = document.getElementsByTagName('link');
    else if (document.all)
	    x = document.all.tags('link');
    else
    {
		alert('Acest script nu functioneaza cu browserul dumneavoastra!\nThis script does not work with your browser.');
	    return;
	}
        
    for (var i=0; i<x.length; i++)
    	x[i].disabled = true;
}

function enableCSS(nr)
{
	if (document.getElementsByTagName)
		x = document.getElementsByTagName('link');
    else if (document.all)
	   	x = document.all.tags('link');
    else
    {
		alert('Acest script nu functioneaza cu browserul dumneavoastra!\nThis script does not work with your browser.');
	    return;
	}
        
    if (nr == -1)
    	disableCSS();
    else
    {
    	// activam tema respectiva
        for (var i=0; i<x.length; i++)
        {
        	if (i == nr) 
            {
              	x[i].disabled = false;
            }
            else
            {
              	x[i].disabled = true;
            }
        }
    }
    
	setTheme(nr);
}   

// functii pentru cookie-uri
function setTheme(nr)
{
	var days = 177;
    var d = new Date();
    d.setTime(d.getTime() + days * 24 * 3600 * 1000);
    document.cookie = "cnivTheme=" + nr + ";expires=" + d.toGMTString() + ";path=/";
}
      
function getTheme()
{
	var c;
    var name = "cnivTheme=";
    var s = document.cookie.split(";");
        
    for (var i=0; i<s.length; i++)
   	{
    	c = s[i];
        while (c.charAt(0) == ' ')
        	c = c.substring(1, c.length);
        if (c.indexOf(name) == 0)
            return parseInt(c.substring(name.length, c.length));
    }
    
	return 0;
}
      
function initSite()
{
	var s = getTheme();
    enableCSS(s);
}
