function changeClass( targetId, newClass ) {
    if (document.getElementById){
        target = document.getElementById( targetId );
        target.className = newClass;
    }
}

function schedule(objectID, functionCall, iteration) {
   if (iteration == null){
   	iteration = 0;
   }
   
   if (objectID == "window") {
   	var oldonload = window.onload;
   	
   	if (typeof window.onload != "function") {
   		window.onload = functionCall;
   	} else {
   		window.onload = function() {
   			oldonload();
   			functionCall();
   		}
   	}
   } else if (document.getElementById(objectID)) {
   	functionCall();
   } else if (iteration < 300) {
   	setTimeout(function(){schedule(objectID, functionCall, iteration + 1)}, 10);
   }
   
   return true;
}      

function liquidChangeClass() {
    changeClass("iBody","liquid");
}

function elasticChangeClass() {
    changeClass("iBody","elastic");
}

function fixedChangeClass() {
    changeClass("iBody","fixed");
}
 
function init() {
    liquid = document.getElementById("iNavLiquid");
    elastic = document.getElementById("iNavElastic");
    fixed = document.getElementById("iNavFixed");
    
    liquid.onclick = liquidChangeClass;
    elastic.onclick = elasticChangeClass;
    fixed.onclick = fixedChangeClass;

}

schedule("window", init);