function loadContent(contentToLoad){ 
divOut='navigationWrapper';
divIn='contentWrapper';
updateLayout() 

new Ajax.Updater( divIn  , '_includes/content.php?content=' + contentToLoad
,{ method: 'GET'
,evalScripts:true
,onLoading: function(){showLoading()} 
,onFinish:  function(){hideLoading()} 
})

document.getElementById(divIn).style.display = 'block';
document.getElementById(divOut).style.display = 'none';
var title = contentToLoad ;
var title = title.replace(/-/g, " "  ); 
document.title=title.toUpperCase();
}



function loadMenu(divOut,divIn) {  
divOut='contentWrapper';
divIn='navigationWrapper';
updateLayout(); 
document.getElementById('content').innerHTML = '';
document.getElementById('pageHeaders').innerHTML = 'loading...';
document.getElementById(divIn).style.display = 'block';
document.getElementById(divOut).style.display = 'none'; 
} 

   
var currentWidth ;
function updateLayout(){
if (window.innerWidth != currentWidth){
currentWidth = window.innerWidth;
if (currentWidth <=  380 ) var orient = "profile";
if (currentWidth  >  380 ) var orient = "landscape";
if (currentWidth  >  800 ) var orient = "fullSize";
document.body.setAttribute("orient", orient);  //alert(orient)       
}
window.setTimeout("scrollTo(0, 1)",1000);
}
 

//setInterval(updateLayout, 500);


function showLoading(){
document.getElementById('loadingIndicator').style.display='block';
}

function hideLoading(){
document.getElementById('loadingIndicator').style.display='none';
}

 

 

















