//minifield http://www.refresh-sf.com/yui/#output
var dummyNav=navigator.userAgent.toLowerCase();var IsGecko=(dummyNav.indexOf("gecko")!=-1);var IsOpera=(dummyNav.indexOf("opera")!=-1);IsIE6=(dummyNav.indexOf("mozilla/4.0 (compatible; msie 6.0")==0);var IsIE7=(dummyNav.indexOf("msie 7.0")!=-1);var SAFARI=(dummyNav.indexOf("safari")!=-1)?true:false;contextpath=null;pageunloaded=false;pageloaded=false;imagepath=null;stylepath=null;jsessionid="";isredesign=false;mec_OldOnUnload=null;setFrameSetTitle=false;window.messagesPopCloseEvent=null;function gwtCMD(d,f){if("IFrameDialog"==d){window.messagesPopCloseEvent=window.MEC_closeBookMarkEvent;var j=f.split("&");var b="";var h="";var c=200;var k=200;for(var g=0;g<j.length;g++){var l=j[g];if(l.indexOf("url")==0){b=l.split("=")[1]}if(l.indexOf("title")==0){h=l.split("=")[1]}if(l.indexOf("width")==0){c=l.split("=")[1]}if(l.indexOf("height")==0){k=l.split("=")[1]}}l=[];l.width=c;l.height=k;MEC_openMessagesPOP(b,h,l)}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,d,c,b){hideFlash();if(!c){c=[];c.width=740;c.height=540}if(!b){b="auto"}c.left="auto";if(!c.top){c.top="20px"}window.setTimeout(function(){document.getElementById("mpoptitle").innerHTML=d;Richfaces.showModalPanel("mP",c);document.getElementById("messagesframe").src=a;document.getElementById("messagesframe").scrolling=b},200)}function MEC_closeIFramePOP(){if(window.messagesPopCloseEvent){window.messagesPopCloseEvent()}showFlash();Richfaces.hideModalPanel("mP")}function globalMouseup(){document.body.onmouseup=function a(){var b=document.getElementById("iframeCover");if(b!=null){b.style.visibility="hidden"}}}function imageRollOver(f){var g=f.src;if(f.realSrc){g=f.realSrc}else{f.realSrc=g}var c=g.lastIndexOf(".");var b=g.substring(0,c-1);var a=g.substring(c);var d=b+"1"+a;f.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 k=true;var g=0;var d="none";var j="block";var f=imagepath+"grid_table/minus.png";var c=imagepath+"buttons/minimize_all_0.png";if(arrow_expanded){d="block";j="none";f=imagepath+"grid_table/plus.png";c=imagepath+"buttons/maximize_all_0.png"}while(k){var h=document.getElementById("arrow"+g);if(h!=null){var a=document.getElementById("div"+g);if(a.style.display==d){a.style.display=j;h.src=f}}else{k=false}g++}var b=document.getElementById("form1:maxbutton");b.src=c;arrow_expanded=!arrow_expanded}function setAllListTitle(){var c=true;var a=0;while(c){var g=document.getElementById("form1:list:"+a+":listTitle");if(g!=null){var f="listTitleSpan"+a;var d=document.getElementById(f);var b=dojo.html.getFittedFragment(dojo.byId(f),g.innerHTML);d.innerHTML=b}else{c=false}a++}}function toggleContent(a,d,c,b){var g=document.getElementById(d);var f=document.getElementById(a);if(g.style.display=="none"){g.style.display="block";f.src=stylepath+b}else{g.style.display="none";f.src=stylepath+c}}function MM_openBrWindow(c,a,b){window.open(c,a,b)}function MM_preloadImages(){var g=document;if(g.images){if(!g.MM_p){g.MM_p=new Array()}var f,c=g.MM_p.length,b=MM_preloadImages.arguments;for(f=0;f<b.length;f++){if(b[f].indexOf("#")!=0){g.MM_p[c]=new Image;g.MM_p[c++].src=b[f];alert(b[f])}}}}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){}redesign();MEC_HookUnLoading();MEC_RemoveLinkOutline();MEC_resizeTable();startTimeout();window.setTimeout("MEC_ping()",1000*60);if(window.pageOnload){pageOnload()}if(!isredesign){if(window.initTopNav){initTopNav()}}if(window.needListReload){listReload()}}function safariGridHeight(b){var a=document.getElementById("grid_table_wrap");a.style.height=""+b+"px"}function MEC_resizeTable(){if(isredesign){return}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 closeCWOWindow(){MEC_closeIFramePOP()}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){if(a.indexOf(".do")>-1){a=a.replace(".do",".do;jsessionid="+jsessionid)}else{if(a.indexOf(".jsf")>-1){a=a.replace(".jsf",".jsf;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,g,a){var f=(g=="*"&&b.all)?b.all:b.getElementsByTagName(g);var j=new Array();a=a.replace(/-/g,"-");var h=new RegExp("(^|s)"+a+"(s|$)");var d;for(var c=0;c<f.length;c++){d=f[c];if(h.test(d.className)){j.push(d)}}return(j)}function pageBuild(){if(SAFARI){var a='<link rel="stylesheet" href="'+stylepath+'css/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(k,a){var c=k.substr(3);var f=c+"_u_";var d=0;var h=document.getElementsByTagName("input");for(var b=0;b<h.length;b++){var g=h[b].name;if(g){if((g.indexOf(f)>-1)&&(h[b].type=="checkbox")){h[b].checked=a}}}}function setparentstatus(a,b){document.forms.form1[a].value=b;obj=document.getElementById("img_"+a);if(isredesign){if(b==0){obj.src=stylepath+"images/unchecked.gif"}if(b==1){obj.src=stylepath+"images/greychecked.gif"}if(b==2){obj.src=stylepath+"images/checked.gif"}}else{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 k=d.name.indexOf("_u_");var g=d.name.substr(0,k);var m="hf_"+g;var b=g+"_u_";var h=0;var a=0;var c=document.getElementsByTagName("input");for(var f=0;f<c.length;f++){var l=c[f].name;if(l){if((l.indexOf(b)>-1)&&(c[f].type=="checkbox")){h++;if(c[f].checked){a++}}}}if(h==a){setparentstatus(m,2)}else{if(a==0){setparentstatus(m,0)}else{setparentstatus(m,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(g){var d=document.getElementById(g);var c=window;var f=document;var b=0,a=0;if(typeof(c.innerWidth)=="number"){b=c.innerWidth;a=c.innerHeight}else{if(f.documentElement&&(f.documentElement.clientWidth||f.documentElement.clientHeight)){b=f.documentElement.clientWidth;a=f.documentElement.clientHeight}else{if(f.body&&(f.body.clientWidth||f.body.clientHeight)){b=f.body.clientWidth;a=f.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 g;function a(l){if(!l.animationSetup){var h=l.getItemGroups();if(h&&h[0]){var k=h[0].length-1;var j;do{j=l.getItem(k).cfg.getProperty("submenu");if(j){j.beforeShowEvent.subscribe(c,j,true);j.showEvent.subscribe(d,j,true)}}while(k--)}l.animationSetup=true}}function c(j,h,k){if(g&&g.isAnimated()){g.stop();g=null}YAHOO.util.Dom.setStyle(this.element,"overflow","hidden");YAHOO.util.Dom.setStyle(this.body,"marginTop",("-"+this.body.offsetHeight+"px"))}function d(k,h,l){g=new YAHOO.util.Anim(this.body,{marginTop:{to:0}},0.5,YAHOO.util.Easing.easeOut);g.animate();var m=this;function n(){m.cfg.refireEvent("iframe")}function j(){YAHOO.util.Dom.setStyle(m.body,"marginTop",("0px"));YAHOO.util.Dom.setStyle(m.element,"overflow","visible");a(m)}if(this.cfg.getProperty("iframe")==true){g.onTween.subscribe(n)}g.onComplete.subscribe(j)}function f(j,h,k){a(k)}var b=new YAHOO.widget.MenuBar("meccampusmenu",{autosubmenudisplay:true,hidedelay:750,lazyload:false});b.renderEvent.subscribe(f,b,true);b.render()};YAHOO.util.Event.onContentReady("meccampusmenu",YAHOO.example.onMenuBarReady)}function removeClass(d,c){var a=c.split(" ");var f=d.className;for(var b=0;b<a.length;b++){f=f.split(a[b]).join("")}d.className=f}function addClass(d,c){var a=c.split(" ");var f=d.className;for(var b=0;b<a.length;b++){f=f.split(a[b]).join("")}d.className=f+" "+c}function setPlayerHeight(a){document.alms_player.setAttribute("height",a);document.getElementById("alms_player_div").style.height=(a+26)+"px"}String.prototype.endsWidth=function(a){return this.length>=a.length&&this.substr(this.length-a.length)==a};function redesign(){if(!window.jQuery){return}jQuery.ajaxSetup({xhr:!window.ActiveXObject?function(){return new window.XMLHttpRequest()}:function(){try{return new window.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}}});if(!isredesign){return}jQuery("li.headlink").hover(function(){jQuery("ul",this).css("display","block")},function(){jQuery("ul",this).css("display","none")});jQuery("#screeninfolink").click(function(){jQuery("#screeninfotool").slideToggle("200")});jQuery("#screeninfotool").click(function(){jQuery("#screeninfotool").slideToggle("200")});jQuery("#filters h3").click(function(){jQuery("#mainfilters").slideToggle("200")});jQuery("img.mainoption").click(function(a){if(this.src.indexOf("plus")>0){this.src=this.src.replace("plus.","minus.")}else{this.src=this.src.replace("minus.","plus.")}jQuery(this).siblings(".options").slideToggle("200")});jQuery(".options:last").css("border-bottom","none");jQuery(function(b){function a(){var d=b(window);var f=d.height();var c=d.width();f-=0;b("#Wrap").css({"min-height":f});if(IsIE6){f=f+d.scrollTop();aheight=f-5;b("#Wrap").height(aheight);var g=document.getElementById("footer");if(!g){g=document.getElementById("footer_login")}if(g){g.style.top=(f-36)+"px"}}}b(window).resize(a);if(IsIE6){b(window).scroll(a)}a()})}function toggleList(a,b){document.getElementById(a).style.display="none";document.getElementById(b).style.display="block"}function listReload(){window.needListReload=false;if(!document.getElementById("form1:listReloadButton")){return}document.getElementById("form1:listReloadButton").onclick()}function toggleExpanded(a){var f=!a.src.endsWith("plus.gif");var d=f?"block":"none";var b=!f?"block":"none";if(!f){a.src=a.src.replace("plus","minus")}else{a.src=a.src.replace("minus","plus")}var c=0;while(e=document.getElementById("lr"+c+"_0")){e.style.display=d;e=document.getElementById("lr"+c+"_1");e.style.display=b;c++}}function toggleSelect(a){if(a.checked){global_selectall()}else{global_deselectall()}}function handleKeySubmit(c,d){if(c.keyCode==13){var a=document.getElementById(d);if(!a.disabled){a.onclick()}a.disabled=true}}function listRowMOver(a){if(a.rowclass){return}a.style.backgroundColor="transparent";a.rowclass=true}function listRowMOut(a){if(a.rowclass==false){return}a.style.backgroundColor="";a.rowclass=false}function openMyfiles(a){params=[];params.width="850px";params.height="580px";params.width=jQuery(window).width()/100*80+"px";params.height=jQuery(window).height()/100*80+"px";MEC_openMessagesPOP(contextpath+"/student/myFiles/myFiles.jsf",a,params,200)}function openCorrection(a){document.location.href=contextpath+"/student/resource/viewexercise.jsf;jsessionid="+jsessionid+"?correctionID="+a}function preview(c){var d=750;var b=1010;var a="no";if(screen.availHeight<750){if(screen.availWidth>1280){popup(c,1010,screen.availHeight,"yes")}else{popup(c,screen.width,screen.height,"yes")}}else{popup(c,1010,750,"no")}return false}function popup(c,a,d,b){params="width="+a;params+=", height="+d;params+=", top=0, left=0";params+=", fullscreen="+b;params+=", toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,directories=no";newwin=window.open(c,"CultureWorld",params,false);if(window.focus){newwin.focus()}return false}function openCWO(){var a=contextpath+"/student/resource/viewCWO.jsf";preview(a);return false}var docBodyCol;function toggleFullscreenInternal(d,r,q,u,j){var s=u;var g=j;var t=u;var l=s/g;var a=9999;var k=0;if(d=="true"){s=window.innerWidth-20;g=window.innerHeight-20;document.getElementById("campus_main").style.left="-"+a+"px";document.getElementById("campus_main").style.top="-"+a+"px";window.scrollTo(0,0);if(document.all){document.body.scroll="no";var f=document;var c=0,b=0;c=f.documentElement.clientWidth;b=f.documentElement.clientHeight;g=b;s=c}var m=s/g;if((t<s)&&(m>l)){k=(s-g*l)/2;s=Math.round(g*l)}var p=getAbsoluteLeft("player")+a;p=a-p+r+k;var n=getAbsoluteTop("player")+a;n=a-n+q;document.getElementById("player").style.left=""+p+"px";document.getElementById("player").style.top=""+n+"px";docBodyCol=document.body.style.backgroundColor;document.body.style.backgroundColor="#ffffff"}else{document.getElementById("player").style.left=r+"px";document.getElementById("player").style.top=q+"px";document.getElementById("campus_main").style.left="0px";document.getElementById("campus_main").style.top="0px";document.body.scroll="yes";document.body.style.backgroundColor=docBodyCol}window.document.alms_player.width=s;window.document.alms_player.height=g}function readCookie(b){var f=b+"=";var a=document.cookie.split(";");for(var d=0;d<a.length;d++){var g=a[d];while(g.charAt(0)==" "){g=g.substring(1,g.length)}if(g.indexOf(f)==0){return g.substring(f.length,g.length)}}return null}if(window.jQuery){(function(b,c){var a={init:function(g,j,f){var d=this,h;this.warning=h=b(g);this.resume=b(j);this.options=f;this.countdownOpen=false;this.failedRequests=f.failedRequests;this._startTimer();b.data(h[0],"idletimeout",this);b.idleTimer(f.idleAfter*1000);b(document).bind("idle.idleTimer",function(){if(b.data(document,"idleTimer")==="idle"&&!d.countdownOpen){d._stopTimer();d.countdownOpen=true;d._idle()}});this.resume.bind("click",function(k){k.preventDefault();c.clearInterval(d.countdown);d.countdownOpen=false;d._startTimer();d._keepAlive(false);f.onResume.call(d.warning)})},_idle:function(){var f=this,g=this.options,h=this.warning[0],d=g.warningLength;g.onIdle.call(h);g.onCountdown.call(h,d);this.countdown=c.setInterval(function(){if(--d===0){window.clearInterval(f.countdown);g.onTimeout.call(h)}else{g.onCountdown.call(h,d)}},1000)},_startTimer:function(){var d=this;this.timer=c.setTimeout(function(){d._keepAlive()},this.options.pollingInterval*1000)},_stopTimer:function(){this.failedRequests=this.options.failedRequests;c.clearTimeout(this.timer)},_keepAlive:function(g){var d=this,f=this.options;if(typeof g==="undefined"){g=true}if(!this.failedRequests){this._stopTimer();f.onAbort.call(this.warning[0]);return}b.ajax({timeout:f.AJAXTimeout,url:f.keepAliveURL,error:function(){d.failedRequests--},success:function(h){if(b.trim(h)!==f.serverResponseEquals){d.failedRequests--}},complete:function(){if(g){d._startTimer()}}})}};b.idleTimeout=function(f,g,d){a.init(f,g,b.extend(b.idleTimeout.options,d));return this};b.idleTimeout.options={warningLength:30,keepAliveURL:"",serverResponseEquals:"OK",idleAfter:600,pollingInterval:60,failedRequests:5,AJAXTimeout:250,onTimeout:b.noop,onIdle:b.noop,onCountdown:b.noop,onResume:b.noop,onAbort:b.noop}})(jQuery,window)}if(window.jQuery){(function(b){b.idleTimer=function a(k){var d=false,g=true,h=30000,l="mousemove keydown DOMMouseScroll mousewheel mousedown",f=function(){d=!d;a.olddate=+new Date;b(document).trigger(b.data(document,"idleTimer",d?"idle":"active")+".idleTimer")},j=function(){g=false;clearTimeout(b.idleTimer.tId);b(document).unbind(".idleTimer")},c=function(){clearTimeout(b.idleTimer.tId);if(g){if(d){f()}b.idleTimer.tId=setTimeout(f,h)}};a.olddate=a.olddate||+new Date;if(typeof k=="number"){h=k}else{if(k==="destroy"){j();return this}else{if(k==="getElapsedTime"){return(+new Date)-a.olddate}}}var m=b.trim((l+" ").split(" ").join(".idleTimer "));b(document).bind(m,c);window.IThandleUserEvent=c;b.idleTimer.tId=setTimeout(f,h);b.data(document,"idleTimer","active")}})(jQuery)}function startIdle(a){jQuery.idleTimeout("#ITdialog","#ITcontinue",{idleAfter:a,pollingInterval:120000,warningLength:120,keepAliveURL:contextpath+"/ping.do",_serverResponseEquals:"OK",onTimeout:function(){var b=jQuery("#b_head_logout").attr("href");if(b){parent.window.location=b+"&expired=true"}},onIdle:function(){var c=new Date();if(c.getTime()<warnEarlyDate.getTime()){var b=jQuery(document);b.trigger("mousemove.idleTimer");var b=jQuery("#ITdialog").data("idletimeout");window.setTimeout(function(){b.resume.trigger("click")},10)}else{jQuery(this).dialog("open")}},onCountdown:function(b){$countdown.html(b)}})}function ITContinueMouseDown(){var a=document.getElementById("ITselcont").selectedIndex;warnEarlyDate=new Date();if(a==0){warnEarlyDate.setTime(warnEarlyDate.getTime()+20*60*1000)}if(a==1){warnEarlyDate.setTime(warnEarlyDate.getTime()+60*60*1000)}if(a==2){warnEarlyDate.setTime(warnEarlyDate.getTime()+2*60*60*1000)}parent.warnEarlyDate=warnEarlyDate};
