/* * Contains Main class and supporting functions for topic ajax course layout * * $Id$ */ //hide content body until done loading (manipulation looks ugly elsewise) document.getElementById('content').style.display='none'; //onload object for handling scripts on page load, this insurses they run in my order function onload_class() { this.scripts = new Array(); this.debug = false; } onload_class.prototype.add = function(script) { if(this.debug)YAHOO.log("onload.add - adding "+script,"junk"); this.scripts[this.scripts.length] = script; } onload_class.prototype.load = function(){ var scriptcount = this.scripts.length; if(this.debug)YAHOO.log("onload.load - loading "+scriptcount+" scripts","info"); for (i=0;i= main.connectQueue.length) { return; } var callback = { success: function(){ main.connectQueue_fireNext(); } } main.connectQueueConnection = main.connect(main.connectQueue[head]['method'],main.connectQueue[head]['urlStub'],callback,main.connectQueue[head]['body']) main.connectQueueHead++; } main_class.prototype.update_marker = function(newMarker){ if (this.marker != null) { this.marker.toggle_highlight(); } this.marker = newMarker; this.marker.toggle_highlight(); this.connect('post','class=course&field=marker',null,'value='+this.marker.sectionId); } main_class.prototype.getString = function(title,variable){ if(this.portal.strings[title]) return this.portal.strings[title].replace(/_var_/,variable); } var main = new main_class(); function php_portal_class(){ //portal to php data this.id = null; //array of id's of blocks set at end of page load by php this.blocks = new Array(); this.imagePath = null; //flag for week fomat this.isWeek = false; //strings this.strings = []; YAHOO.log("instantiated php_portal_class","info"); }