function changeIframe(iframeID){
    if (iframeID == 'contact')
    new Ajax.Updater('content','contact.php');
    else
    new Ajax.Updater('content','plogger/',{method: 'get', parameters: {level: 'album', id: iframeID }});
}

function showAboutUs(){
    if($('references').visible()) closeReferences();
    $('aboutUs').appear();
    new Ajax.Updater('aboutUs','aboutUs.php',{method:'post'});
}

function closeAboutUs(){
    $('aboutUs').hide();
}

function showReferences(){
   if($('aboutUs').visible()) closeAboutUs();
   $('references').appear();
   new Ajax.Updater('references','references.php',{method:'post'});
}

function closeReferences(){
    $('references').hide();
}

function changeCountry(countryID){
    if($('aboutUs').visible()) var aboutUsVisible = true;
    if($('references').visible()) var referencesVisible = true;
    new Ajax.Updater('mainBody','iframeChanger.php',{
            onComplete: function(req){
                            if(aboutUsVisible) {
                                $('aboutUs').show();
                                new Ajax.Updater('aboutUs','aboutUs.php',{method:'post'});
                            }
                            if(referencesVisible) {
                                $('references').show();
                                new Ajax.Updater('references','references.php',{method:'post'});
                            }

                        },
            method:'post', parameters: {countryID: countryID}});

}
