/***********************************************
**         AJAX RELEASES FUNCTIONS            **
***********************************************/

function calendarChange(day,month)
{
    var xmlHttp;

    try
    {  
        // Firefox, Opera 8.0+, Safari  
        xmlHttp=new XMLHttpRequest();  
    } catch (e) {  
        // Internet Explorer  
        try
        {    
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");    
        } catch (e) {    
            try
            {      
                xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");      
            } catch (e) {      
                alert("Your browser does not support AJAX!");      
                return false;      
            }    
        }  
    }

    xmlHttp.onreadystatechange=function()
    {
        if(xmlHttp.readyState==4)
        {
            document.getElementById("calendarHolder").innerHTML=xmlHttp.responseText;
        }
    }

    var rand = Math.random();

    xmlHttp.open("GET","calendarDate.php?day="+day+"&month="+month+"&cache="+rand,true);
    xmlHttp.send(null);  
}

function calendarChangeForm()
{
    var day = document.calendarForm.day.value;
    var month = document.calendarForm.month.value;
    
    calendarChange(day,month);
}

/***********************************************
**         AJAX RELEASES FUNCTIONS            **
***********************************************/

function loadHomeRelease()
{
    var xmlHttp;

    try
    {  
        // Firefox, Opera 8.0+, Safari  
        xmlHttp=new XMLHttpRequest();  
    } catch (e) {  
        // Internet Explorer  
        try
        {    
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");    
        } catch (e) {    
            try
            {      
                xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");      
            } catch (e) {      
                alert("Your browser does not support AJAX!");      
                return false;      
            }    
        }  
    }

    xmlHttp.onreadystatechange=function()
    {
        if(xmlHttp.readyState==4)
        {
            document.getElementById("releasesContainer").innerHTML=xmlHttp.responseText;
        }
    }

    var rand = Math.random();

    xmlHttp.open("GET","releaseGenerator.php?type=home&cache="+rand,true);
    xmlHttp.send(null);  
}

function loadLeftRelease()
{
    var xmlHttp;

    try
    {  
        // Firefox, Opera 8.0+, Safari  
        xmlHttp=new XMLHttpRequest();  
    } catch (e) {  
        // Internet Explorer  
        try
        {    
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");    
        } catch (e) {    
            try
            {      
                xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");      
            } catch (e) {      
                alert("Your browser does not support AJAX!");      
                return false;      
            }    
        }  
    }

    xmlHttp.onreadystatechange=function()
    {
        if(xmlHttp.readyState==4)
        {
            document.getElementById("releasesContainer").innerHTML=xmlHttp.responseText;
        }
    }

    var rand = Math.random();

    xmlHttp.open("GET","releaseGenerator.php?type=left&cache="+rand,true);
    xmlHttp.send(null);  
}

/***********************************************
**             SIMPLE FUNCTIONS               **
***********************************************/

function changeArtistImage(img)
{
    
    if(document.getElementById("mainImg3"))
    {
        document.getElementById("mainImg3").style.visibility = "hidden";
        document.getElementById("mainImg3").style.display    = "none";
    }

    if(document.getElementById("mainImg2"))
    {
        document.getElementById("mainImg2").style.visibility = "hidden";
        document.getElementById("mainImg2").style.display    = "none";
    }

    if(document.getElementById("mainImg1"))
    {
        document.getElementById("mainImg1").style.visibility = "hidden";
        document.getElementById("mainImg1").style.display    = "none";
    }

    document.getElementById("mainImg"+img).style.visibility = "visible";
    document.getElementById("mainImg"+img).style.display = "inline";
}

function showBigText()
{
    document.getElementById("BigText").style.visibility  = "visible";
    document.getElementById("BigText").style.display     = "inline";
    document.getElementById("MiniText").style.visibility = "hidden";
    document.getElementById("MiniText").style.display    = "none";
}

function hideBigText()
{
    document.getElementById("BigText").style.visibility  = "hidden";
    document.getElementById("BigText").style.display     = "none";
    document.getElementById("MiniText").style.visibility = "visible";
    document.getElementById("MiniText").style.display    = "inline";
}

function showBigTour()
{
    document.getElementById("BigTour").style.visibility  = "visible";
    document.getElementById("BigTour").style.display     = "inline";
    document.getElementById("MiniTour").style.visibility = "hidden";
    document.getElementById("MiniTour").style.display    = "none";
}

function hideBigTour()
{
    document.getElementById("BigTour").style.visibility  = "hidden";
    document.getElementById("BigTour").style.display     = "none";
    document.getElementById("MiniTour").style.visibility = "visible";
    document.getElementById("MiniTour").style.display    = "inline";
}