// minified with http://www.refresh-sf.com/yui/
var dummyNav=navigator.userAgent.toLowerCase();var IsGecko=(dummyNav.indexOf("gecko")!=-1);var IsOpera=(dummyNav.indexOf("opera")!=-1);IsIE6=(dummyNav.indexOf("msie 6.0")!=-1);var IsIE7=(dummyNav.indexOf("msie 7.0")!=-1);var SAFARI=(dummyNav.indexOf("safari")!=-1)?true:false;contextpath=null;pageunloaded=false;pageloaded=false;imagepath=null;jsessionid="";mec_OldOnUnload=null;setFrameSetTitle=false;window.messagesPopCloseEvent=null;function gwtCMD(d,e){if("IFrameDialog"==d){window.messagesPopCloseEvent=window.MEC_closeBookMarkEvent;var h=e.split("&");var b="";var g="";var c=200;var j=200;for(var f=0;f<h.length;f++){var k=h[f];if(k.indexOf("url")==0){b=k.split("=")[1]}if(k.indexOf("title")==0){g=k.split("=")[1]}if(k.indexOf("width")==0){c=k.split("=")[1]}if(k.indexOf("height")==0){j=k.split("=")[1]}}k=[];k.width=c;k.height=j;MEC_openMessagesPOP(b,g,k)}else{MEC_closeIFramePOP()}}var lastFlashX="";function hideFlash(){var b=document.getElementById("player");if(b){var a=b.style.left;if(a!="-5000px"){lastFlashX=a}b.style.left="-5000px"}}function showFlash(){var a=document.getElementById("player");if(a){a.style.left=lastFlashX}}function MEC_openMessagesPOP(a,c,b){hideFlash();if(!b){b=[];b.width=740;b.height=540}b.left="auto";b.top="auto";window.setTimeout(function(){document.getElementById("mpoptitle").innerHTML=c;Richfaces.showModalPanel("mP",b);document.getElementById("messagesframe").src=a},50)}function MEC_closeIFramePOP(){if(window.messagesPopCloseEvent){window.messagesPopCloseEvent()}window.messagesPopCloseEvent=null;showFlash();Richfaces.hideModalPanel("mP")}function globalMouseup(){document.body.onmouseup=function a(){var b=document.getElementById("iframeCover");if(b!=null){b.style.visibility="hidden"}}}function hidestatus(){window.status="";window.defaultStatus="";return true}if(document.layers){document.captureEvents(Event.MOUSEOVER|Event.MOUSEOUT)}document.onmouseover=hidestatus;document.onmouseout=hidestatus;function imageRollOver(e){var f=e.src;if(e.realSrc){f=e.realSrc}else{e.realSrc=f}var c=f.lastIndexOf(".");var b=f.substring(0,c-1);var a=f.substring(c);var d=b+"1"+a;e.src=d}function imageRollOut(b){var c=b.src;if(b.orgSrc){c=b.orgSrc}else{if(b.realSrc){c=b.realSrc}}var a=c;b.src=a}var ie4=document.all;var ns6=document.getElementById&&!document.all;function show(a){document.getElementById(a).style.display="block"}function hide(a){document.getElementById(a).style.display="none"}function dynamichide(b,a){dropmenuobj=document.getElementById(a);if(ie4&&!dropmenuobj.contains(b.toElement)){hide(a)}else{if(ns6&&b.currentTarget!=b.relatedTarget&&!contains_ns6(b.currentTarget,b.relatedTarget)){hide(a)}}}function contains_ns6(d,c){while(c.parentNode){if((c=c.parentNode)==d){return true}}return false}var arrow_expanded=false;function toggleAllArrows(){var j=true;var f=0;var d="none";var h="block";var e=imagepath+"grid_table/minus.png";var c=imagepath+"buttons/minimize_all_0.png";if(arrow_expanded){d="block";h="none";e=imagepath+"grid_table/plus.png";c=imagepath+"buttons/maximize_all_0.png"}while(j){var g=document.getElementById("arrow"+f);if(g!=null){var a=document.getElementById("div"+f);if(a.style.display==d){a.style.display=h;g.src=e}}else{j=false}f++}var b=document.getElementById("form1:maxbutton");b.src=c;arrow_expanded=!arrow_expanded}function setAllListTitle(){var c=true;var a=0;while(c){var f=document.getElementById("form1:list:"+a+":listTitle");if(f!=null){var e="listTitleSpan"+a;var d=document.getElementById(e);var b=dojo.html.getFittedFragment(dojo.byId(e),f.innerHTML);d.innerHTML=b}else{c=false}a++}}function toggleContent(a,d,c,b){var f=document.getElementById(d);var e=document.getElementById(a);if(f.style.display=="none"){f.style.display="block";e.src=imagepath+b}else{f.style.display="none";e.src=imagepath+c}}function MM_openBrWindow(c,a,b){window.open(c,a,b)}function MM_preloadImages(){var f=document;if(f.images){if(!f.MM_p){f.MM_p=new Array()}var e,c=f.MM_p.length,b=MM_preloadImages.arguments;for(e=0;e<b.length;e++){if(b[e].indexOf("#")!=0){f.MM_p[c]=new Image;f.MM_p[c++].src=b[e];alert(b[e])}}}}function getAbsoluteLeft(a){o=document.getElementById(a);oLeft=o.offsetLeft;while(o.offsetParent!=null){oParent=o.offsetParent;oLeft+=oParent.offsetLeft;o=oParent}return oLeft}function getAbsoluteTop(a){o=document.getElementById(a);oTop=o.offsetTop;while(o.offsetParent!=null){oParent=o.offsetParent;oTop+=oParent.offsetTop;o=oParent}return oTop}function getAbsoluteTopForElement(a){oTop=a.offsetTop;while(a.offsetParent!=null){oParent=a.offsetParent;oTop+=oParent.offsetTop;a=oParent}return oTop}time3min=1000*60*3;timeouttime=1000*60*30-time3min;function MEC_onload(){window.defaultStatus="";pageloaded=true;try{if(parent.mec_frame){if(setFrameSetTitle){parent.document.title=document.title}}}catch(a){}MEC_HookUnLoading();MEC_RemoveLinkOutline();MEC_resizeTable();startTimeout();window.setTimeout("MEC_ping()",1000*60);if(window.pageOnload){pageOnload()}if(window.initTopNav){initTopNav()}}function safariGridHeight(b){var a=document.getElementById("grid_table_wrap");a.style.height=""+b+"px"}function MEC_resizeTable(){var c=document.getElementById("grid_table_wrap");if(c){var d=windowHeight();var b=getAbsoluteTop("grid_table_pos");d=d-b-65;var a=getAbsoluteTop("grid_end")+20;if(d>(a-b)){d=(a-b)}if(d<287){d=287}if(IsIE7){document.getElementById("grid_table_pos").style.height=""+(d-12)+"px"}if(SAFARI){d=d+1;setTimeout("safariGridHeight("+(d-1)+")",10)}c.style.height=""+d+"px"}}function MEC_unload(){if(pageunloaded){return}if(mec_OldOnUnload){mec_OldOnUnload()}pageunloaded=true}function MEC_HookUnLoading(){mec_OldOnUnload=window.onunload;window.onunload=MEC_unload}function MEC_RemoveLinkOutline(){var b=document.getElementsByTagName("a");for(var c=0;c<b.length;c++){b[c].onmousedown=function(){this.onfocus=function(){this.blur()}};b[c].onmouseup=function(){this.onfocus=function(){}};b[c].onmouseout=b[c].onmouseup}}function windowHeight(){if(window.innerHeight){return window.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){return document.documentElement.clientHeight}else{return 0}}}function MEC_openBookmarkForm(b,a){if(window.Bookmark){window.Bookmark(b)}else{alert('insert <a4j:jsFunction name="Bookmark" into page')}}function closeBookMarkForm(){var a=document.getElementById("form1:bookmarkpin");if(a){a.style.visibility="visible";a.style.display="inline";a=document.getElementById("form1:bookmarkbutton");a.style.visibility="hidden";a.style.display="none"}if(document.getElementById("form1:list")){a=document.getElementById("form1:listReloadButton");if(a){a.onclick()}}window.setTimeout("gwtCMD('hideDialog','id=id1')",100)}function closeeTutorForm(){var a=document.getElementById("form1:bookmarkpin");if(a){a.style.visibility="visible";a.style.display="inline";a=document.getElementById("form1:bookmarkbutton");a.style.visibility="hidden";a.style.display="none"}window.setTimeout("gwtCMD('hideDialog','id=id1')",100)}function MEC_openWelcomePopup(){MM_openBrWindow(makeSessionURL("welcomepop.do"),"welcomepop","scrollbars=no,width=350,height=280")}function MEC_openHelp(){MM_openBrWindow(makeSessionURL("../help/help.do"),"mecHelpWindows","scrollbars=yes,width=568,height=400")}function MEC_viewResource(a,c,b){if((a.indexOf("MNI")==0)||(a.indexOf("MGU")==0)){MM_openBrWindow(makeSessionURL("viewresource.do?id="+c+"&ctype="+a+"&area="+b,"mecviewres"),"scrollbars=yes,width=595,height=500");return}if((a.indexOf("MGA")==0)){MM_openBrWindow(makeSessionURL("viewresource.do?id="+c+"&ctype="+a+"&area="+b,"mecviewres"),"scrollbars=no,width=790,height=540,LEFT=0,TOP=0");return}if((a.indexOf("MSE")==0)){MM_openBrWindow(makeSessionURL("viewresource.do?id="+c+"&ctype="+a+"&area="+b,"mecviewres"),"scrollbars=no,width=800,height=600");return}MEC_gotoLocation(makeSessionURL("viewresource.do?id="+c+"&area="+b+"&ctype="+a))}function MEC_exercise_result(a){now=new Date();var b=now.getTime();aimage=new Image();aimage.src=makeSessionURL(contextpath+"/global/exresult.do?scoreperc="+a+"&tmp="+b)}function MEC_exercise_retry(){now=new Date();var a=now.getTime();aimage=new Image();aimage.src=makeSessionURL(contextpath+"/global/exretry.do?tmp="+a)}function startTimeout(){}endsession=false;function endSession(){if(endsession){if(opener){opener.location.href=makeSessionURL(contextpath+"/logout.do")}}}function sessionQuestion(){endsession=true;window.setTimeout("endSession()",time3min);MM_openBrWindow(makeSessionURL(contextpath+"/global/endsession.do"),"endsession","scrollbars=no,width=490,height=240")}function makeSessionURL(a){a=a.replace(".do",".do;jsessionid="+jsessionid);return a}function MEC_ping(){window.setTimeout("MEC_ping()",1000*60*3);now=new Date();img=new Image();img.src=makeSessionURL(contextpath+"/ping.do?dummy="+now.getTime())}function MLEmbed(c,b){var a=document.getElementById(c);a.innerHTML=b}function getElementsByClassName(b,f,a){var e=(f=="*"&&b.all)?b.all:b.getElementsByTagName(f);var h=new Array();a=a.replace(/-/g,"-");var g=new RegExp("(^|s)"+a+"(s|$)");var d;for(var c=0;c<e.length;c++){d=e[c];if(g.test(d.className)){h.push(d)}}return(h)}function pageBuild(){if(SAFARI){var a='<link rel="stylesheet" href="'+imagepath+'safari.css" type="text/css">';document.write(a)}}function global_selectall(){scrollYPos=(window.pageYOffset)?window.pageYOffset:(document.documentElement&&document.documentElement.scrollTop)?document.documentElement.scrollTop:document.body.scrollTop;for(i=0;i<document.forms.form1.elements.length;i++){if(document.forms.form1.elements[i].type=="hidden"){if(document.forms.form1.elements[i].name.indexOf("hf_")>-1){var a=document.forms.form1.elements[i].name;setparentstatus(a,2)}}}if(scrollYPos>0){setTimeout(" window.scrollTo(0, scrollYPos);	",10)}}function global_deselectall(){scrollYPos=(window.pageYOffset)?window.pageYOffset:(document.documentElement&&document.documentElement.scrollTop)?document.documentElement.scrollTop:document.body.scrollTop;for(i=0;i<document.forms.form1.elements.length;i++){if(document.forms.form1.elements[i].type=="hidden"){if(document.forms.form1.elements[i].name.indexOf("hf_")>-1){var a=document.forms.form1.elements[i].name;setparentstatus(a,0)}}}if(scrollYPos>0){setTimeout(" window.scrollTo(0, scrollYPos);	",10)}}function check_children(h,a){var c=h.substr(3);var e=c+"_u_";var d=0;var g=document.getElementsByTagName("input");for(var b=0;b<g.length;b++){var f=g[b].name;if(f){if((f.indexOf(e)>-1)&&(g[b].type=="checkbox")){g[b].checked=a}}}}function setparentstatus(a,b){document.forms.form1[a].value=b;obj=document.getElementById("img_"+a);if(b==0){obj.src=imagepath+"buttons/unchecked_0.gif"}if(b==1){obj.src=imagepath+"buttons/greychecked_0.gif"}if(b==2){obj.src=imagepath+"buttons/checked_0.gif"}}function change_parent(d){var h=d.name.indexOf("_u_");var f=d.name.substr(0,h);var l="hf_"+f;var b=f+"_u_";var g=0;var a=0;var c=document.getElementsByTagName("input");for(var e=0;e<c.length;e++){var k=c[e].name;if(k){if((k.indexOf(b)>-1)&&(c[e].type=="checkbox")){g++;if(c[e].checked){a++}}}}if(g==a){setparentstatus(l,2)}else{if(a==0){setparentstatus(l,0)}else{setparentstatus(l,1)}}}function selectparent(a){setparentstatus(a,2);check_children(a,true)}function unselectparent(a){setparentstatus(a,0);check_children(a,false)}function checkbox_check(a){change_parent(a)}function checkbox_image_check(b){var a=parseInt(document.forms.form1[b].value);if(a!=2){selectparent(b)}else{unselectparent(b)}}function MEC_maxDiv(f){var d=document.getElementById(f);var c=window;var e=document;var b=0,a=0;if(typeof(c.innerWidth)=="number"){b=c.innerWidth;a=c.innerHeight}else{if(e.documentElement&&(e.documentElement.clientWidth||e.documentElement.clientHeight)){b=e.documentElement.clientWidth;a=e.documentElement.clientHeight}else{if(e.body&&(e.body.clientWidth||e.body.clientHeight)){b=e.body.clientWidth;a=e.body.clientHeight}}}if(d){d.style.height=a+"px";d.style.width=b+"px";d.style.display="block"}}function MEC_hideDIV(b){var a=document.getElementById(b);if(a){a.style.display="none"}}function keyPressEnterHandler(b){var d;var c;var a;if(window.event){d=b.keyCode}else{if(b.which){d=b.which}}if(d==13){return true}else{return false}}function initTopNav(){img1=new Image();img2=new Image();img3=new Image();img4=new Image();img5=new Image();img6=new Image();img7=new Image();img1.src=imagepath+"tabbar/tabbar_01_1.png";img2.src=imagepath+"tabbar/tabbar_02_1.png";img3.src=imagepath+"tabbar/tabbar_05_1.png";img4.src=imagepath+"tabbar/menu_gfx_1_0.png";img5.src=imagepath+"tabbar/menu_gfx_2_0.png";img6.src=imagepath+"tabbar/menu_gfx_3_0.png";img7.src=imagepath+"tabbar/menu_gfx_4_0.png";if(window.YAHOO==null){return}YAHOO.example.onMenuBarReady=function(){var f;function a(k){if(!k.animationSetup){var g=k.getItemGroups();if(g&&g[0]){var j=g[0].length-1;var h;do{h=k.getItem(j).cfg.getProperty("submenu");if(h){h.beforeShowEvent.subscribe(c,h,true);h.showEvent.subscribe(d,h,true)}}while(j--)}k.animationSetup=true}}function c(h,g,j){if(f&&f.isAnimated()){f.stop();f=null}YAHOO.util.Dom.setStyle(this.element,"overflow","hidden");YAHOO.util.Dom.setStyle(this.body,"marginTop",("-"+this.body.offsetHeight+"px"))}function d(j,g,k){f=new YAHOO.util.Anim(this.body,{marginTop:{to:0}},0.5,YAHOO.util.Easing.easeOut);f.animate();var l=this;function m(){l.cfg.refireEvent("iframe")}function h(){YAHOO.util.Dom.setStyle(l.body,"marginTop",("0px"));YAHOO.util.Dom.setStyle(l.element,"overflow","visible");a(l)}if(this.cfg.getProperty("iframe")==true){f.onTween.subscribe(m)}f.onComplete.subscribe(h)}function e(h,g,j){a(j)}var b=new YAHOO.widget.MenuBar("meccampusmenu",{autosubmenudisplay:true,hidedelay:750,lazyload:false});b.renderEvent.subscribe(e,b,true);b.render()};YAHOO.util.Event.onContentReady("meccampusmenu",YAHOO.example.onMenuBarReady)}function removeClass(d,c){var a=c.split(" ");var e=d.className;for(var b=0;b<a.length;b++){e=e.split(a[b]).join("")}d.className=e}function addClass(d,c){var a=c.split(" ");var e=d.className;for(var b=0;b<a.length;b++){e=e.split(a[b]).join("")}d.className=e+" "+c};
