/**************************************** | | Catholic Central High School | Created by: Kevin Biskaborn | Copyright 2007 ScriptReaction | http://www.scriptreaction.com | ****************************************/ var global = { level: "", //include folder level launch: function (){ //flashFilter: params: brd=borderWidth, brdclr=borderColour(default=fff), var=varInName, value=varInValue, name=flashMovieId, src, wmode(default=opaque) var divArray = document.getElementsByTagName("div"); for(var divCount=0; divCount 0){ var _colour = whichDiv.getAttribute("brdclr"); _colour = (_colour == null) ? "fff" : _colour; whichDiv.style.border = _border + "px solid #" + _colour; }else{ whichDiv.style.border = "0px"; } var _var = whichDiv.getAttribute("var"); if(_var != null){ _value = whichDiv.getAttribute("value"); } else { _var = _value = ""; } var _name = whichDiv.getAttribute("name"); var _id = (_name != null) ? _name : ""; var _src = whichDiv.getAttribute("src"); var _wmode = whichDiv.getAttribute("wmode"); _wmode = (_wmode != null) ? _wmode : "opaque"; var x = ''; x+= ''; if(_var != "") x+= ''; x+= ''; x+= ''; //no flash player if(!global.hasFlash){ var checkA = "navBnr.swf"; if(_src.slice(-(checkA.length)) == checkA){ //replace flash header with static image x = ''; x+= ''; x+= ''; x+= ''; x+= ''; x+= ''; x+= ''; x+= ''; x+= ''; x+= ''; x+= ''; x+= ''; x+= ''; x+= ''; x+= ''; }else{ x = '
Your Flash Player needs to be upgraded to view this content. Visit Adobe.com...
'; } } global.setDivContent(divId,x); } } //control document images for(var a=0; a0){window.setTimeout("global.goTop()",25);}; }, setDivContent: function (divId,content){ if(document.all){ document.all[divId].innerHTML = content; }else{ document.getElementById(divId).innerHTML = content; } }, addEvent: function (object,eventType,functionName){ if(object.addEventListener){ object.addEventListener(eventType, functionName, false); return true; }else if(object.attachEvent){ var x = object.attachEvent("on"+eventType, functionName); return x; }else{ return false; } }, setAlpha: function (object,opacity){ opacity = (opacity == 100) ? 99.999 : opacity; object.style.filter = "alpha(opacity:" + opacity + ")"; //ie/win object.style.KHTMLOpacity = opacity/100; //safari<1.2,konqueror object.style.MozOpacity = opacity/100; //older mozilla/firefox object.style.opacity = opacity/100; //safari 1.2,newer firefox/mozilla,css3 } } var flashFilter = { //a ScriptReaction extension of: Unobtrusive Flash Objects (flashFilter) v3.20 major) ? true : false; }, detectVersion: function (){ if (navigator.plugins && typeof navigator.plugins["Shockwave Flash"] == "object") { flashFilter.pluginType = "npapi"; var _d = navigator.plugins["Shockwave Flash"].description; if (typeof _d != "undefined") { _d = _d.replace(/^.*\s+(\S+\s+\S+$)/, "$1"); var _m = parseInt(_d.replace(/^(.*)\..*$/, "$1"), 10); var _r = /r/.test(_d) ? parseInt(_d.replace(/^.*r(.*)$/, "$1"), 10) : 0; flashFilter.fv = [_m, _r]; } } else if (window.ActiveXObject) { flashFilter.pluginType = "ax"; try { // avoid fp 6 crashes var _a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); } catch(e) { try { var _a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); flashFilter.fv = [6, 0]; _a.AllowScriptAccess = "always"; // throws if fp < 6.47 } catch(e) { if (flashFilter.fv[0] == 6) return; } try { var _a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); } catch(e) {} } if (typeof _a == "object") { var _d = _a.GetVariable("$version"); // bugs in fp 6.21/6.23 if (typeof _d != "undefined") { _d = _d.replace(/^\S+\s+(.*)$/, "$1").split(","); flashFilter.fv = [parseInt(_d[0], 10), parseInt(_d[2], 10)]; } } } }, get: function (id, vars){ var output = ""; switch(id){ case "global_navBanner": output += '
'; break; } document.writeln(output); }, create: function (src, width, height){ var output = '
'; document.writeln(output); } } /********** global init **********/ flashFilter.launch(); global.addEvent(window, "load", global.launch); /**************************************** | | Catholic Central High School | Created by: Kevin Biskaborn | Copyright 2007 ScriptReaction | http://www.scriptreaction.com | ****************************************/ var shell = { init: function (){ global.level = top.global_base; if(window.XMLHttpRequest){ if(window.ActiveXObject){ // IE 7 shell.browser = "ie"; shell.browserId = "ie7"; document.write(''); }else{ // Opera, Safari, Firefox shell.browser = "gecko"; shell.browserId = "gecko"; } }else{ //IE 6 and below shell.browser = "ie"; shell.browserVersion = 6; shell.browserId = "ie6"; document.write(''); } }, swap: { gallery: function (toId){ top.location.href = global.level + "?level=gallery&page=" + toId; } } } /********** shell init **********/ shell.init(); /**************************************** | | Catholic Central High School | Created by: Kevin Biskaborn | Copyright 2007 ScriptReaction | http://www.scriptreaction.com | ****************************************/ var contentManager = { toggle: function ( areaId ){ var toggleArea = document.getElementById("toggle_" + areaId).style; if(toggleArea){ toggleArea.display = (!toggleArea.display || toggleArea.display == "none") ? "block" : "none"; var switchState = (toggleArea.display == "none") ? 1 : 0; global.setDivContent("switch_" + areaId, this.getSwitchContents(areaId, switchState)); } }, getSwitchContents: function ( areaId, switchState ){ var toggleSwitch = document.getElementById("switch_" + areaId); var switchContents = "[ "; switchMessage = (switchState) ? "show more" : "show less"; switchContents += switchMessage + "... ]"; return switchContents; }, getSwitch: function ( areaId ){ global.setDivContent("switch_" + areaId, this.getSwitchContents(areaId, 1)); }, getCloser: function ( areaId ){ global.setDivContent("switch_" + areaId + "_closer", this.getSwitchContents(areaId, 0)); } } /**************************************** | | Catholic Central High School | Created by: Kevin Biskaborn | Copyright 2009 ScriptReaction | http://www.scriptreaction.com | | Last Modified by: | K. Biskaborn, Apr-10-2009 @ 9:20 AM | ****************************************/ var manager_tabPanelGroup = { settings: { optionDivClassRef: "options", contentDivClassRef: "content", activeTabClassName: "active", tabOptionItemPrefix: "tab_", tabContentItemPrefix: "item_" }, groupsCreated: Array(), launch: function ( inputObject ){ var groupId = inputObject["panelGroupId"]; if(groupId != null){ this.groupsCreated.unshift( new instance_tabPanelGroup( inputObject ) ); } return this.groupsCreated[ 0 ]; } } var instance_tabPanelGroup = function ( inputObject ){ this.groupId = inputObject[ "panelGroupId" ]; this.startId = inputObject[ "selectedTabId" ]; this.action = inputObject[ "onPressAction" ]; this.launch = function (){ this.setup(); this.activateTab( this.startTab ); } this.formatTabIdToContentItemId = function ( tabId ){ var idPrefixLength = manager_tabPanelGroup.settings.tabOptionItemPrefix.length; return manager_tabPanelGroup.settings.tabContentItemPrefix + tabId.slice(idPrefixLength, tabId.length); } this.setup = function (){ var groupInstance = this; var groupHolderDiv = document.getElementById(this.groupId); var divsInGroup = groupHolderDiv.getElementsByTagName("div"); var optionHolderClassRef = manager_tabPanelGroup.settings.optionDivClassRef; var contentHolderClassRef = manager_tabPanelGroup.settings.contentDivClassRef; var optionHolderDiv, contentHolderDiv, whichDiv = null; //extract the option holder from the group div for(var i = 0; i < divsInGroup.length; i++){ whichDiv = divsInGroup[i]; if(optionHolderDiv == null && whichDiv.className == optionHolderClassRef) optionHolderDiv = whichDiv; if(contentHolderDiv == null && whichDiv.className == contentHolderClassRef) contentHolderDiv = whichDiv; } //extract the content items from the content holder this.contentItems = contentHolderDiv.getElementsByTagName("div"); //extract the options from the option holder var tabOptions_items = optionHolderDiv.getElementsByTagName("li"); this.tabOptions = new Array(); this.startTab = null; var itemId, whichItem, whichHref; for(var i = 0; i < tabOptions_items.length; i++){ whichItem = tabOptions_items[i]; itemId = whichItem.id; //check if item name is defined if( itemId ){ whichHref = whichItem.getElementsByTagName("a")[0]; whichItem.onclick = function (){ groupInstance.handleClick( this ); } whichHref.onclick = function (){ this.blur(); return false; } //save the tab item this.tabOptions.push( whichItem ); //set starting tab if( this.startTab == null && itemId == this.startId ) this.startTab = whichItem; } } //default to first tab if starting tab not specified if(this.startTab == null) this.startTab = this.tabOptions[0]; } this.activateTabById = function ( tabId ){ for( var i = 0; i < this.tabOptions.length; i++ ){ if( this.tabOptions[ i ].id == tabId ){ this.handleClick( this.tabOptions[ i ] ); break; } } } this.handleClick = function ( tabItem ){ this.deactivateAll(); this.activateTab( tabItem ); } this.activateTab = function ( tabItem ){ tabItem.className = manager_tabPanelGroup.settings.activeTabClassName; this.activate_action( tabItem ); } this.deactivateTab = function ( tabItem ){ tabItem.className = ""; this.deactivate_action( tabItem ); } this.deactivateAll = function (){ for(var i = 0; i < this.tabOptions.length; i++) this.deactivateTab(this.tabOptions[i]); } this.getTabContentItem = function ( tabItem ){ var contentItem; for(var i = 0; i < this.contentItems.length; i++){ var contentItem = this.contentItems[i]; if(contentItem.id == this.formatTabIdToContentItemId(tabItem.id)) break; } return contentItem; } this.activate_action = function ( tabItem ){ var itemId = tabItem.value; if(this.action == "default"){ this.getTabContentItem( tabItem ).style.display = "block"; } } this.deactivate_action = function ( tabItem ){ var itemId = tabItem.value; if(this.action == "default"){ this.getTabContentItem( tabItem ).style.display = "none"; } } //initilize the object this.launch(); }