function flip (event, head) {
    var room = document.getElementById(event);
    var me = document.getElementById(head);

    /* Toggle the setting of the classname attribute */
    room.className = (room.className == '') ? 'flipped' : '';
    me.className = (me.className == 'face') ? 'face flipped' : 'face';
    window.document.title = (window.document.title == 'd DOT b : the A side') ? 'd DOT b : the B side' : 'd DOT b : the A side';
    pageTracker._trackPageview("/"+window.document.title);
}

function openScreen(myValue){
myURL = 'includes/work.php/'+myValue;
var pScreen = document.getElementById('pScreen');
pScreen.className = 'pScreen open';
window.location.hash = "/"+myValue;
callAjax("GET", myURL, showScreen);
}

function closeScreen() {
var pScreen = document.getElementById('pScreen');
var myScreen = document.getElementById('screen');
myScreen.innerHTML = '';
pScreen.className = 'pScreen';
window.location.hash = "";
}

showScreen = function() {
if(request.readyState == 4){
if(request.status == 200){
var xmlContainer = request.responseText; /* or = request.responseXML */
var myScreen = document.getElementById('screen');
myScreen.innerHTML = xmlContainer;
pageTracker._trackPageview("/"+window.location.hash);
} else {
alert("A problem occurred with communicating between the XMLHttpRequest object and the server program.");
}
}
}
