var hcheights = [], dhcheights = [], specificscrolla, specificscrollb, specificscrollc, specificscrolld;var mooscrolls = [];window.addEvent('load',function(eventer){if($$('.mgfx_content').length > 0){var mytabs = new MGFX.Tabs('.mgfx','.mgfx_content',{autoplay: false,transitionDuration:0,onShowSlide: function(slideIndex){this.tabs.removeClass('active');this.tabs[slideIndex].addClass('active');mooscrolls.each(function(item){item.update();});}});}if($$('.elselect').length > 0){$$('.elselect').each(function(el){var myselect = new elSelect({container:el.getProperty('id')});});}$$('.mooscroll').each(function(el){mooscrolls[(mooscrolls.length)] = new UvumiScrollbar(el);});$$('.specificscrolla').each(function(el){specificscrolla = new UvumiScrollbar(el,{'baseClass':'scrollBar_b'});});$$('.specificscrollb').each(function(el){specificscrollb = new UvumiScrollbar(el,{'baseClass':'scrollBar_b'});});$$('.mooscrollb').each(function(el){mooscrolls[(mooscrolls.length)] = new UvumiScrollbar(el,{'baseClass':'scrollBar_b'});});if($('rotate_holder')){var myscroll = new limitedScrollControls({'scrollholder':$('rotate_holder'),'scrolls_selector':'.rotator','size':'757','controlsholder':$('controls_holder'),'activeclassname':'activecontrol','inactiveclassname':'inactivecontrol','fade':false});}if($$('.blogactions').length > 0){$$('.blogactions').setStyles({opacity:0,'visibility':'hidden','display':'block'}).fade('in');$$('.commentform').setStyles({'display':'none',opacity:0,visibility:'hidden',height:0});$$('.showcomment').each(function(el){el.addEvent('click',function(ev){ev.stop();$('commentform'+el.getProperty('id').substring(11)).setStyle('display','block').morph({opacity:1,visibility:'visible',height:280});});});}if($$('#videoholder img').length > 0){$$('#videoholder img').each(function(el){el.setStyle('cursor','pointer');el.addEvent('click',function(ev){var tmprel = el.getParent().getParent().getPrevious().getElement('a').getProperty('rel');if(tmprel != ''){el.getParent().innerHTML = "<object width='571' height='350'><param name='movie' value='http://www.youtube.com/v/"+tmprel+"&fs=1&autoplay=1'></param><param name='allowFullScreen' value='true'></param><param name='allowscriptaccess' value='always'></param><param name='wmode' value='transparent'></param><embed src='http://www.youtube.com/v/"+tmprel+"&fs=1&autoplay=1' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='571' height='350' wmode='transparent' autoplay='true'></embed></object>";}else{alert("An error occurred while loading the video");}});});}if($$('.loadwebinar').length > 0){$$('.loadwebinar').each(function(el){el.addEvent('click',function(ev){ev.stop();var tmprel = el.getProperty('rel');if(tmprel != ''){$('videoholder').innerHTML = "<object width='571' height='350'><param name='movie' value='http://www.youtube.com/v/"+tmprel+"&fs=1&autoplay=1'></param><param name='allowFullScreen' value='true'></param><param name='allowscriptaccess' value='always'></param><param name='wmode' value='transparent'></param><embed src='http://www.youtube.com/v/"+tmprel+"&fs=1&autoplay=1' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='571' height='350' wmode='transparent' autoplay='true'></embed></object>";}else{window.location = el.getProperty('href');}});});}if($('archiveform')){$('archiveform').addEvent('submit',function(ev){ev.stop();new Request.HTML({'url': 'http://www.liencounsel.com/ajax/searcharchives.php','data': { 'q': $('qinput').getProperty('value')},'update': $('webvids')}).send();});}if($$('#helptopics li:not(.dhaschildren,.haschildren)').length > 0){$$('#helptopics li:not(.dhaschildren,.haschildren)>a').each(function(el){el.addEvent('click',function(ev){ev.stop();var tmphash = el.getProperty('href').split('#');if($(tmphash[1])){var hashanchor = el.get('href').substring(el.get('href').indexOf('#'));specificscrollb.scrollToElement($(tmphash[1]));}else{pieces = tmphash[1].split('_');var req = new Request({'url':'learning_topics.php','data':{'topic':pieces[1],'subtopic':pieces[2]},'onRequest':function(){},'onComplete':function(resp){$('dyncontentholder').innerHTML = "<div style='height:26px;'>&nbsp;</div>"+resp;specificscrollb.update();(function(){var hashanchor = el.get('href').substring(el.get('href').indexOf('#'));if($(hashanchor.replace(/\#/,''))){specificscrollb.scrollToElement($(hashanchor.replace(/\#/,'')));}}).delay(20);}}).send();}});});}if($$('#helptopics .dhaschildren').length > 0){$$('#helptopics .dhaschildren').each(function(el,idx){dhcheights[idx] = el.getFirst('ul').measure(function(){return this.getSize().y;});el.removeClass('activeacc');el.getFirst('ul').setStyles({'opacity':0,'height':0});if(Browser.ie6 == true){el.getFirst('ul').setStyle('display','none');}});$$('#helptopics .dhaschildren>a').each(function(el,idx){var parent = el.getParent();el.addEvent('click',function(ev){ev.stop();if(parent.hasClass('activeacc')){parent.removeClass('activeacc');dhcheights[idx] = parent.getFirst('ul').getSize().y;parent.getFirst('ul').fade('out').morph({height:0});(function(){parent.getFirst('ul').setStyle('display','none');}).delay(580);if(Browser.ie6 == true){parent.getFirst('ul').setStyle('display','none');}}else{parent.getFirst('ul').setStyle('display','block');parent.addClass('activeacc');parent.getFirst('ul').fade('in').morph({height:dhcheights[idx]});var tmphash = el.getProperty('href').split('#');var pieces = tmphash[1].split('_');if(!$('c_'+pieces[1]+'_'+pieces[2]+'_1')){var req = new Request({'url':'learning_topics.php','data':{'topic':pieces[1],'subtopic':pieces[2]},'onRequest':function(){},'onComplete':function(resp){$('dyncontentholder').innerHTML = "<div style='height:26px;'>&nbsp;</div>"+resp;specificscrollb.update();}}).send();}}});});}if($$('#helptopics .haschildren').length > 0){$$('#helptopics .haschildren').each(function(el,idx){hcheights[idx] = el.getFirst('ul').measure(function(){return this.getSize().y;});el.removeClass('activeacc');el.getFirst('ul').setStyles({'opacity':0,'height':0});if(Browser.ie6 == true){el.getFirst('ul').setStyle('display','none');}});$$('#helptopics .haschildren>a').each(function(el,idx){var parent = el.getParent();el.addEvent('click',function(ev){ev.stop();if(parent.hasClass('activeacc')){parent.removeClass('activeacc');hcheights[idx] = parent.getFirst('ul').getSize().y;parent.getFirst('ul').setStyle('height',hcheights[idx]);if(Browser.ie6 == true){parent.getFirst('ul').setStyle('display','none');}parent.getFirst('ul').fade('out').morph({height:0});(function(){parent.getFirst('ul').setStyle('display','none');}).delay(580);}else{parent.getFirst('ul').setStyle('display','block');parent.addClass('activeacc');parent.getFirst('ul').fade('in').morph({height:hcheights[idx]});(function(){parent.getFirst('ul').setStyle('height','auto');}).delay(580);}});});}if($$('#htvidholder img').length > 0){$$('#htvidholder img').each(function(el){el.setStyle('cursor','pointer');el.addEvent('click',function(ev){var tmprel = $('howtoholder').getElement('a').getProperty('rel');if(tmprel != ''){el.getParent().innerHTML = "<object width='571' height='350'><param name='movie' value='http://www.youtube.com/v/"+tmprel+"&fs=1&autoplay=1'></param><param name='allowFullScreen' value='true'></param><param name='allowscriptaccess' value='always'></param><param name='wmode' value='transparent'></param><embed src='http://www.youtube.com/v/"+tmprel+"&fs=1&autoplay=1' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='571' height='350' wmode='transparent' autoplay='true'></embed></object>";}else{alert("An error occurred while loading the video");}});});}if($$('.loadhowto').length > 0){$$('.loadhowto').each(function(el){el.addEvent('click',function(ev){ev.stop();var tmprel = el.getProperty('rel');if(tmprel != ''){$('htvidholder').innerHTML = "<object width='571' height='350'><param name='movie' value='http://www.youtube.com/v/"+tmprel+"&fs=1&autoplay=1'></param><param name='allowFullScreen' value='true'></param><param name='allowscriptaccess' value='always'></param><param name='wmode' value='transparent'></param><embed src='http://www.youtube.com/v/"+tmprel+"&fs=1&autoplay=1' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='571' height='350' wmode='transparent' autoplay='true'></embed></object>";}else{alert("An error occurred while loading the video");}});});}if($$('#invidholder img').length > 0){$$('#invidholder img').each(function(el){el.setStyle('cursor','pointer');el.addEvent('click',function(ev){var tmprel = $('instvids').getElement('a').getProperty('rel');if(tmprel != ''){el.getParent().innerHTML = "<object width='571' height='350'><param name='movie' value='http://www.youtube.com/v/"+tmprel+"&fs=1&autoplay=1'></param><param name='allowFullScreen' value='true'></param><param name='allowscriptaccess' value='always'></param><param name='wmode' value='transparent'></param><embed src='http://www.youtube.com/v/"+tmprel+"&fs=1&autoplay=1' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='571' height='350' wmode='transparent' autoplay='true'></embed></object>";}else{alert("An error occurred while loading the video");}});});}if($$('.loadinst').length > 0){$$('.loadinst').each(function(el){el.addEvent('click',function(ev){ev.stop();var tmprel = el.getProperty('rel');if(tmprel != ''){$('invidholder').innerHTML = "<object width='571' height='350'><param name='movie' value='http://www.youtube.com/v/"+tmprel+"&fs=1&autoplay=1'></param><param name='allowFullScreen' value='true'></param><param name='allowscriptaccess' value='always'></param><param name='wmode' value='transparent'></param><embed src='http://www.youtube.com/v/"+tmprel+"&fs=1&autoplay=1' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='571' height='350' wmode='transparent' autoplay='true'></embed></object>";}else{alert("An error occurred while loading the video");}});});}});
