function site_loadJS(){if(typeof loadJS=="function"){loadJS()}}function site_unloadJS(){closeDep();if(typeof unloadJS=="function"){unloadJS()}}function hov(B,A){if(typeof window.jQuery=="undefined"){if(B.className){B.className=A}return }if(A=="btn btnhov"){$(B).addClass("btnhov")}if(A=="btn"){$(B).removeClass("btnhov")}}function getObj(A){if(document.getElementById){this.obj=document.getElementById(A);if(this.obj){this.style=document.getElementById(A).style}}else{if(document.all){this.obj=document.all[A];if(this.obj){this.style=document.all[A].style}}else{if(document.layers){this.obj=document.layers[A];this.style=document.layers[A]}}}}function getkey(A){if(window.event){return window.event.keyCode}else{if(A){return A.which}else{return null}}}function countChars(B,F,D,E,A){var H=getkey(A);if(H==null){return true}var I=B[F].value.length;var G=new getObj(D);var C=E-I;if(H==8){if(I){C++}}else{if(H==null||H==0||H==9||H==27){C=C}else{C--;if(C<0){B[F].value=B[F].value.substr(0,E);return false}}}if(C==1){G.obj.innerHTML="1 char left"}else{G.obj.innerHTML=C+" chars left"}return true}function MenuHeaderInvert(A){var B=new getObj(A);if(!B||!B.style){return false}if(B.style.display=="block"){MenuHeaderHide(A)}else{MenuHeaderDisplay(A)}return false}function MenuHeaderDisplay(A){var B=new getObj(A);if(!B||!B.style){return false}B.style.display="block";if(A=="Advanced Functions"){var B=new getObj("Basic Functions");if(B&&B.style){MenuHeaderDisplay("Basic Functions")}else{MenuHeaderDisplay("Student Functions")}}return false}function MenuHeaderHide(A){var B=new getObj(A);if(!B||!B.style){return false}B.style.display="none";return false}var htmlOpener="<html><head><title>Preview</title></head><body><p>";var htmlCloser="</body></html>";var popupWin;var wholeWin;function popup_url(B,C,A){return(popup("<meta http-equiv=refresh content=0;url="+B+">",C,A))}function popup(C,B,A){popup_base(C,B,A,htmlOpener,htmlCloser)}function popup_base(D,B,A,C,E){if(!B){B=480}if(!A){A=200}popupWin=window.open("","puWin","width="+B+",height="+A+",scrollbars,dependent,resizable");popupWin.document.open("text/html","replace");popupWin.document.write(C);popupWin.document.write(D);popupWin.document.write(E);popupWin.document.close();popupWin.focus()}function popup_wholeWin(A){wholeWin=window.open("","puWin","width=800,height=600,scrollbars,dependent,resizable");wholeWin.document.open("text/html","replace");wholeWin.document.write(htmlOpener);wholeWin.document.write(A);wholeWin.document.write(htmlCloser);wholeWin.document.close();wholeWin.focus()}function closeDep(){if(popupWin&&popupWin.open&&!popupWin.closed){popupWin.close()}if(wholeWin&&wholeWin.open&&!wholeWin.closed){wholeWin.close()}}function invert_block_display(A){var B=new getObj(A);if(!B||!B.style){return false}if(B.style.display=="block"){B.style.display="none"}else{B.style.display="block"}return false}function showitem(A){$("#"+A+" div.hidden").each(function(B){$(this).show("fast")})}function hideitem(A){$("#"+A+" div.hidden").each(function(B){$(this).hide("slow")})}function xhideitem(A){$("#"+A+" div.item_content_hidden").each(function(B){$(this).css("visibility","hidden")})}function xshowitem(A){$("#"+A+" div.item_content_hidden").each(function(B){$(this).html($(this).html()+"BAM"+B)})}function show_image(B,A){document[B].src=A}function hide_selects(){if(ie6_broken_select_z_index){$("#filters select").each(function(A){$(this).css("visibility","hidden")})}}function show_selects(){if(ie6_broken_select_z_index){$("#filters select").each(function(A){$(this).css("visibility","visible")})}}function catFillSecondary(A,B){catFlushOptions(A.elements[B+"_1"]);catFlushOptions(A.elements[B+"_2"]);s=A.elements[B+"_0"].selectedIndex;if(s==0){return }A.elements[B+"_1"].options[0]=new Option("-- Please Select --","---",true,true);for(i=0;i<c1[s-1].length;i++){A.elements[B+"_1"].options[i+1]=new Option(c1[s-1][i],i)}catFlushOptions(A.elements[B+"_2"])}function catFillTertiary(A,B){catFlushOptions(A.elements[B+"_2"]);s=A.elements[B+"_0"].selectedIndex;ss=A.elements[B+"_1"].selectedIndex;if((s==0)||(ss==0)){return }if(c2[s-1]&&c2[s-1][ss-1]&&c2[s-1][ss-1].length>0){A.elements[B+"_2"].options[0]=new Option("-- Please Select --","---",true,true)}for(i=0;i<c2[s-1][ss-1].length;i++){A.elements[B+"_2"].options[i+1]=new Option(c2[s-1][ss-1][i],i)}}function catFlushOptions(A){while(A.options.length){A.options[A.options.length-1]=null}A.options[0]=new Option("-- Please Select --","---");A.selectedIndex="---"}function catEditItem(C,D,B){catEditItem_addButton(0);catEditItem_addButton(1);catEditItem_addButton(2);var A=C.elements[D+"_"+B].selectedIndex;if(A==0){return }var E=C.elements[D+"_"+B].options[A].text;$("#col"+B).html("<input type=hidden name='var_index_"+B+"' value='"+A+"'><input type=text name='var_edit_"+B+"' value='"+E+"'> <input type=submit name='action_2' value='Save'> <input type=submit name='action_2' value='Delete' onclick='return(confirm(\"Are you sure?  This will kill any children as well.\"));'> <input type=button value='Cancel' onclick='catEditItem_addButton("+B+");'>")}function catEditItem_addButton(A){$("#col"+A).html("<input type=button value='Add' onclick='catEditItem_addBox("+A+");'>")}function catEditItem_addBox(A){$("#col"+A).html("<input type=text name='var_new_"+A+"' value=''><br><input type=submit name='action_2' value='Add'><input type=button value='Cancel' onclick='catEditItem_addButton("+A+");'>")}function catEditItem_confirm_delete(){return(alert("Are you sure?  This will kill any children as well."))}function groupAllCheck(C,B){for(var A=0;A<C.elements.length;A++){var D=C.elements[A];if(D.type=="checkbox"&&D.name.substr(0,B.length)==B){D.checked=C._allbox.checked}}};
