(function(){var a=function(c){a.superclass.constructor.call(this,c);this.timers={};this.init()};var b={init:function(){this.testimonialsInit();a.superclass.init.call(this);this.navigationInit();this.presentationInit();this.categoryMovieLinksInit();this.activateMovieLinksInit();this.htmlDialogsInit();this.demoCalloutsInit();this.moreLinksInit();this.rotatingBannerInit();if(typeof YAHOO.com.webucator.Popup!="undefined"){this.popup=new YAHOO.com.webucator.Popup()}if(typeof YAHOO.com.webucator.Accordion!="undefined"){this.rightAccordion=new YAHOO.com.webucator.Accordion("rightContainer","rightPodContainer","rightPodHeader","rightPodContent")}window.scrollTo(0,1)},setOptions:function(c){var d={testimonialsDelay:5000,navigationTopHideDelay:300,navigationSubShowDelay:300};YAHOO.lang.augmentObject(d,c||{},true);a.superclass.setOptions.call(this,d)},navigationAttachEvents:function(d){var e=YAHOO.util.Dom.generateId(d);var c=e+"-subNav";if(typeof this.navigationSubNavs=="undefined"){this.navigationSubNavs={}}if($(c)){YAHOO.util.Event.on(d,"mouseover",function(g){YAHOO.util.Event.stopPropagation(g);var f=YAHOO.util.Event.getTarget(g);var h=f.id;if(typeof this.navigationSubNavs[h]=="undefined"){this.navigationSubNavs[h]=new YAHOO.widget.Panel(c,{visible:false,draggable:false,constraintoviewport:false,close:false,context:[h,"tl","bl"]});$(c).style.display="block";this.navigationSubNavs[h].render()}this.navigationClearTimeouts();this.navigationClearHover();this.navigationSetTimer("SHOWTOP",{id:h})},this,true);YAHOO.util.Event.on(d,"mouseout",this.navigationHide,this,true);YAHOO.util.Event.on(c,"mouseover",this.navigationClearTimeouts,this,true);YAHOO.util.Event.on(c,"mouseout",this.navigationHide,this,true)}else{YAHOO.util.Event.on(d,"mouseover",function(f){YAHOO.util.Event.stopPropagation(f);this.navigationClearTimeouts();this.navigationClearHover();this.navigationSetTimer("SHOWTOP",{id:e})},this,true);YAHOO.util.Event.on(d,"mouseout",this.navigationClearHover,this,true)}},navigationClearHover:function(){var d=YAHOO.util.Selector.query("div#topNavBarContainer ol.level1 li div.level1heading");for(var c=0;c<d.length;c++){if(YAHOO.util.Dom.hasClass(d[c],"hover")){YAHOO.util.Dom.removeClass(d[c],"hover")}if(window.webucator.navigationSubNavs[d[c].id]){window.webucator.navigationSubNavs[d[c].id].hide()}}},navigationClearTimeouts:function(){if(this.timers[this.HIDETOP]!=null){window.clearTimeout(this.timers[this.HIDETOP])}if(this.timers[this.SHOWTOP]!=null){window.clearTimeout(this.timers[this.SHOWTOP])}},navigationHide:function(){this.navigationClearTimeouts();this.navigationSetTimer("HIDETOP")},navigationInit:function(){this.HIDETOP=1;this.SHOWTOP=2;var g=YAHOO.util.Dom.getElementsByClassName("level1heading");for(var e=0;e<g.length;e++){var d=g[e];while(d.childNodes.length>=1){var f=d.firstChild.innerHTML;var c=d.firstChild.href;if(typeof c!="undefined"&&c!=null){YAHOO.util.Event.on(d,"click",function(h,i){window.location.href=i.href},{href:c})}d.removeChild(d.firstChild)}d.innerHTML=f;this.navigationAttachEvents(d)}},navigationSetTimer:function(c,d){switch(c.toUpperCase()){case"HIDETOP":this.timers[this[c]]=window.setTimeout(this.navigationClearHover,this.options.navigationTopHideDelay);break;case"SHOWTOP":YAHOO.util.Dom.addClass(d.id,"hover");var e="if (window.webucator.navigationSubNavs['"+d.id+"']){window.webucator.navigationSubNavs['"+d.id+"'].show();}";this.timers[this[c]]=window.setTimeout(e,this.options.navigationSubShowDelay);break}},mobileSearchToggle:function(){this.toggle("searchcontainer");this.toggle("cse-search-box");if($("searchcontainer").style.display=="block"){$("cse-search-q").focus()}},mobileNavToggle:function(){var c=$("mobile-menu");if(c.style.display=="block"){new YAHOO.widget.Effects.BlindUp(c,{seconds:1,ease:YAHOO.util.Easing.easeOut})}else{new YAHOO.widget.Effects.BlindDown(c,{seconds:1,ease:YAHOO.util.Easing.easeOut})}},presentationInit:function(){var c=YAHOO.util.Dom.getElementsByClassName("presentationlink");YAHOO.util.Event.addListener(c,"click",this.presentationShow,this,true);var e=YAHOO.util.Dom.getElementsByClassName("presentationlink-degrade");for(var d=0;d<e.length;d++){e[d].href="javascript:void(0);"}},presentationShow:function(){if(YAHOO.util.Dom.getViewportWidth()<800){window.location.href="/ilo/movie.cfm";return}var c='<object width="853" height="510"><param name="movie" value="http://www.youtube.com/v/e3ZnfJe-W_I?fs=1&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/e3ZnfJe-W_I?fs=1&amp;hl=en_US" type="application/x-shockwave-flash" width="853" height="510" allowscriptaccess="always" allowfullscreen="true"></embed></object>';if(typeof this.presentationDialog=="undefined"){this.presentationDialog=new YAHOO.widget.SimpleDialog("presentationDialog",{visible:false,width:"880px",height:"562px",close:true,fixedcenter:true,modal:true,draggable:false});this.presentationDialog.setHeader("Benefits of Instructor-led Online Classes");this.presentationDialog.setBody('<div id="presentationContainer"></div');this.presentationDialog.render(document.body);this.presentationDialog.beforeHideEvent.subscribe(function(){this.purge($("presentationContainer"))},this,true);this.presentationDialog.hideEvent.subscribe(function(){if(typeof _gaq!="undefined"){var e=_gaq||[];e.push(["_trackEvent","Videos","Close","ILO Presentation"])}},this,true)}$("presentationContainer").innerHTML=c;this.presentationDialog.show();if(typeof _gaq!="undefined"){var d=_gaq||[];d.push(["_trackEvent","Videos","Open","ILO Presentation"])}},presentationFollowUpShow:function(){this.setOptions({dialogController:"/"});this.showSimpleDialog(null,"/ilo/dialog/movie-callback.cfm",null,"Demo Video",{width:"700px",hideaftersubmit:false});this.setOptions({dialogController:"dialog"})},categoryMovieLinksInit:function(){var c=YAHOO.util.Dom.getElementsByClassName("categorymovielink","a","yui-main");YAHOO.util.Event.addListener(c,"click",this.categoryMovieShow,this,true)},categoryMovieShow:function(g){YAHOO.util.Event.stopEvent(g);var f=YAHOO.util.Event.getTarget(g);var d=f.rel;var c=getFlashHTML(d,640,480,false);if(typeof this.categoryMovieDialog=="undefined"){this.categoryMovieDialog=new YAHOO.widget.SimpleDialog("categoryMovieDialog",{visible:false,width:"740px",close:true,fixedcenter:true,modal:true,draggable:false});this.categoryMovieDialog.setHeader("Category Overview");this.categoryMovieDialog.setBody('<div id="categoryMovieDialogContainer"></div');this.categoryMovieDialog.render(document.body);this.categoryMovieDialog.beforeHideEvent.subscribe(function(){this.purge($("categoryMovieDialogContainer"))},this,true)}$("categoryMovieDialogContainer").innerHTML=c;this.categoryMovieDialog.show();var h=_gaq||[];h.push(["_trackEvent","Videos","Open","Category Overview"]);this.presentationDialog.hideEvent.subscribe(function(){var e=_gaq||[];e.push(["_trackEvent","Videos","Close","Category Overview"])})},activateMovieLinksInit:function(){var c=YAHOO.util.Dom.getElementsByClassName("activatemovielink","a");YAHOO.util.Event.addListener(c,"mouseover",function(k){var j=YAHOO.util.Event.getTarget(k);if(j.tagName=="IMG"){var m=[j]}else{var m=j.getElementsByTagName("img")}var g=/\.[a-z]{3}$/i;var d=/-active\.[a-z]{3}/i;for(var f=0;f<m.length;f++){var l=m[f].src.toString();if(g.test(l)&&!d.test(l)){var h=l.search(g);m[f].src=l.substr(0,h)+"-active"+l.substr(h)}}},this,true);YAHOO.util.Event.addListener(c,"mouseout",function(h){var g=YAHOO.util.Event.getTarget(h);if(g.tagName=="IMG"){var k=[g]}else{var k=g.getElementsByTagName("img")}var d=/^(.*)-active(\.[a-z]{3})$/i;for(var f=0;f<k.length;f++){var j=k[f].src.toString();k[f].src=j.replace(d,"$1$2")}},this,true)},htmlDialogsInit:function(){var c=YAHOO.util.Dom.getElementsByClassName("htmldialog","a","bd");YAHOO.util.Event.addListener(c,"click",this.htmlDialogShow,this,true)},htmlDialogShow:function(f){YAHOO.util.Event.stopEvent(f);var d=YAHOO.util.Event.getTarget(f);
var h=d.rel;var g=d.innerHTML;if(h.toString().length>0){var c=$(h);if(c){this.showSimpleDialogHtml(null,c.innerHTML,g)}}},demoCalloutsInit:function(){var c=YAHOO.util.Dom.getElementsByClassName("callout-freedemo");YAHOO.util.Event.on(c,"click",function(){window.location.href="/ilo/freedemo/register.cfm"})},moreLinksInit:function(){var f=YAHOO.util.Dom.getElementsByClassName("moreclasses");for(var d=0;d<f.length;d++){var e=new YAHOO.util.Element(f[d]);var c=e.get("rel");if(typeof c!="undefined"){e.on("click",function(j,h){var k=YAHOO.util.Dom.getElementsByClassName(h.rel);for(var g=0;g<k.length;g++){k[g].style.display="block"}h.link.style.display="none"},{rel:c,link:f[d]})}}},rotatingBannerInit:function(){var o=$("marketingRotatingBanner");if(o){var g="/images/rotating-banners/";var e=["IGE.jpg","Adobe.jpg","Benefits.jpg","Certification.jpg","PMI.jpg"];var n=["http://www.webucator.com/instructor-guided-e-learning/index.cfm","http://www.webucator.com/adobe/index.cfm","http://www.webucator.com/ilo/index.cfm","http://www.webucator.com/certification/microsoft-certification-training/","http://www.webucator.com/project-management-training/index.cfm"];var f=["IGE","Adobe","Benefits","Certification","PMI"];var c="?utm_source=webucator&utm_medium=banner&utm_campaign=rotating-banner";var m=document.createElement("a");var y=document.createElement("img");m.href=n[v];y.src=g+e[v];m.appendChild(y);o.appendChild(m);var q=document.createElement("div");var h=[];for(var l=0;l<e.length;l++){var w=document.createElement("img");w.src="/images/icons/bullet_green.png";w.alt=l;w.style.cursor="pointer";YAHOO.util.Event.addListener(w,"click",function(z){var i=YAHOO.util.Event.getTarget(z);r();x();v=i.alt;d(i.alt);j()});q.appendChild(w);h.push(w)}q.style.textAlign="center";o.appendChild(q);var s=0;var u=e.length-1;var v=Math.floor(Math.random()*(u-s+1))+s;var p;var j=function(){p=setInterval(t,5000)};var r=function(){clearInterval(p)};var t=function(){k(h[v]);if(v==e.length-1){v=0}else{v++}d(v)};var x=function(){for(var z=0;z<e.length;z++){k(h[z])}};var k=function(i){i.src="/images/icons/bullet_green.png"};var d=function(z){y.src=g+e[z];m.href=n[z]+c+"&utm_content="+f[z];h[z].src="/images/icons/bullet_orange.png"};YAHOO.util.Event.addListener(m,"mouseover",r);YAHOO.util.Event.addListener(m,"mouseout",j);t();j()}},toggleOverview:function(h,c,e){var f=YAHOO.util.Dom.getElementsByClassName(c,null,h);var g=YAHOO.util.Dom.getElementsByClassName(e,null,h);for(var d=0;d<f.length;++d){f[d].style.display=""}for(var d=0;d<g.length;++d){g[d].style.display="none"}},testimonialsInit:function(){if($("testimonial")){YAHOO.util.Connect.asyncRequest("GET","/static/quotes.cfm",{success:function(e){var c=YAHOO.lang.JSON.parse(e.responseText);this.setTestimonials(c);if(this.testimonials.length>0){this.testimonialsCount=Math.floor(Math.random()*this.testimonials.length);var d=this;window.setTimeout(function(){d.testimonialsCallback();window.setInterval(function(){d.testimonialsCallback()},d.options.testimonialsDelay)},3000);YAHOO.util.Event.addListener("testimonial","click",function(){window.location.href="/contact/index.cfm?reference=1"},this,true)}},scope:this})}},testimonialsCallback:function(){if(this.testimonialsCount%2==0){var c="Over 1000 customers have volunteered to serve as references. Ask to speak to one by clicking here."}else{var c=this.testimonials[this.testimonialsCount]}if(YAHOO.env.ua.ie>0){$("testimonial").innerHTML=c}else{var d=new YAHOO.widget.Effects.Fade("testimonialsContainer",{delay:true,seconds:this.options.testimonialsDuration});d.onEffectComplete.subscribe(function(){var e=new YAHOO.widget.Effects.Appear("testimonialsContainer",{delay:true,seconds:this.options.testimonialsDuration});$("testimonial").innerHTML=c;if(this.testimonialsCount%2!=0){YAHOO.util.Dom.addClass("testimonial","calltoaction")}else{YAHOO.util.Dom.removeClass("testimonial","calltoaction")}e.onEffectComplete.subscribe(function(){$("testimonialsContainer").style.filter=""});e.animate()},this,true);d.animate()}if(this.testimonialsCount+1==this.testimonials.length){this.testimonialsCount=0}else{this.testimonialsCount++}},setTestimonials:function(c){this.testimonials=c},showBlendedDiscussionAttachmentUploader:function(f,d,e){if(!$("discussion-attachment-uploader-directory")){var c=document.createElement("input");c.name="directory";c.id="discussion-attachment-uploader-directory";c.value=d;c.type="hidden";f.appendChild(c);var g=new YAHOO.com.webucator.Uploader("attacherOverlay",{allowMultipleFiles:true,fileFilters:[],uploadPath:"/instructor-guided-e-learning/dialog/upload-discussion-attachment-files.cfm",postVars:{directory:d},resultsContainerId:"attachResults",buttonsContainerId:"attachButtons",selectId:"attachSelect",uploadId:"attachFiles",clearId:"attachClear",showResultsTable:true},{onComplete:function(l){for(var h=0;h<l.length;h++){var j=document.createElement("input");j.name="attachment";j.value=l[h]["name"];j.type="hidden";f.appendChild(j)}var m=YAHOO.util.Dom.getElementsByClassName("submitbutton","input",f);for(var k=0;k<m.length;k++){if(m[k].style.display!="none"&&m[k].value!="Please Wait"){m[k].title="Send message with attachments.";m[k].disabled=false}}if($("tmpMsg-"+f.id)){$("tmpMsg-"+f.id).innerHTML=""}}})}if($(e).innerHTML=="Cancel"){this.enableForm(f,false,'<div class="red">Please complete or cancel your attachment(s) before submitting your message.</div>')}else{this.enableForm(f,true)}},enableForm:function(g,d,h){var h=h||"";var f=YAHOO.util.Dom.getElementsByClassName("submitbutton","input",g);if(!$("tmpMsg-"+g.id)){var c=document.createElement("p");c.id="tmpMsg-"+g.id;g.appendChild(c)}else{var c=$("tmpMsg-"+g.id)}for(var e=0;e<f.length;e++){if(f[e].style.display!="none"&&f[e].value!="Please Wait"){if(d){f[e].disabled=false;c.innerHTML=""}else{f[e].disabled=true;c.innerHTML=h}}}},showMovieDialog:function(e,g,c,h,d){e=e||"http://www.youtube.com/v/U3gQetAHpGQ?version=3&amp;hl=en_US&amp;rel=0";g=g||853;c=c||510;h=h||"IGE Presentation";d=d||"Benefits of Instructor-Guided eLearning";var f='<object width="'+g+'" height="'+c+'"><param name="movie" value="'+e+'"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="'+e+'" type="application/x-shockwave-flash" width="'+g+'" height="'+c+'" allowscriptaccess="always" allowfullscreen="true"></embed></object>';if(typeof this.movieDialog=="undefined"){this.movieDialog=new YAHOO.widget.SimpleDialog("movieDialog",{visible:false,width:(g+30)+"px",height:(c+60)+"px",close:true,fixedcenter:true,modal:true,draggable:true});this.movieDialog.setHeader(d);this.movieDialog.setBody('<div id="movieContainer"></div>');this.movieDialog.render(document.body);this.movieDialog.beforeHideEvent.subscribe(function(){window.webucator.purge($("movieContainer"))},this,true);this.movieDialog.hideEvent.subscribe(function(){if(typeof _gaq!="undefined"){var j=_gaq||[];j.push(["_trackEvent","Videos","Close",h])}},this,true)}$("movieContainer").innerHTML=f;this.movieDialog.show();if(typeof _gaq!="undefined"){var i=_gaq||[];i.push(["_trackEvent","Videos","Open",h])}}};YAHOO.lang.extend(a,YAHOO.com.webucator.Base,b);YAHOO.com.webucator.Base=a})();
