var AppLib=new function(){this.PTIMER=null;this.PANEL_POPUP="vfMLF:fML:pMLP";this.GRID_POPUP="vfMLF:fML:gMLP";this.PANEL_POPUP_IFRAME="vfMLF:fML:iFr";this.PANEL_MODAL_IFRAME="vfMF:fM:iFr";this.POPUP_PRESTR="<div id="+this.GRID_POPUP+' style="padding:0px;width:100%;">';this.POPUP_POSTSTR="</div>";this.swapImageIndex=1;this.getImageDir=function(){return"App_Themes/default/images/"};this.getPlayerDir=function(){return"App_Themes/default/p/"};this.renderModalIFrame=function(){if(isIE6){if(document.getElementById(this.PANEL_MODAL_IFRAME)==null){var a='<iframe id="'+this.PANEL_MODAL_IFRAME+'" frameborder="0" style="position:absolute; width:10px; height:10px; overflow:hidden; z-index:998; visibility: hidden;"></iframe>';document.write(a)}}};this.renderModelessIFrame=function(){if(isIE6){if(document.getElementById(this.PANEL_POPUP_IFRAME)==null){var a='<iframe id="'+this.PANEL_POPUP_IFRAME+'" frameborder="0" style="position:absolute; width:10px; height:10px; overflow:hidden; z-index:998; visibility: hidden;"></iframe>';document.write(a)}}};this.renderFModeless=function(){this.renderModelessIFrame();document.write('<div id="'+this.PANEL_POPUP+'" class="panel" style="position:absolute; width:10px; height:10px; overflow:hidden; z-index:999; visibility: hidden;"><table id="'+this.GRID_POPUP+'" width="100%" cellspacing="0" cellpadding="0"></table></div>')};this.showModeless=function(a){this.showElement(a);if(isIE6){var b=document.getElementById(this.PANEL_POPUP_IFRAME);this.showIFrame(b,a)}};this.hideModeless=function(){if(isIE6){this.hideElementId(this.PANEL_POPUP_IFRAME)}this.hideElementId(this.PANEL_POPUP)};this.showIFrame=function(b,a){this.showElement(b);b.style.width=a.offsetWidth;b.style.left=a.offsetLeft;b.style.top=a.offsetTop};this.setMLIFrameHeight=function(b){if(isIE6){var a=document.getElementById(this.PANEL_POPUP_IFRAME);a.style.height=b+"px"}};this.showElement=function(b){if(b){b.style.display="block";b.style.visibility="visible"}};this.hideElement=function(b){if(b){b.style.display="none";b.style.visibility="visible"}};this.showElementId=function(b){this.showElement(document.getElementById(b))};this.hideElementId=function(b){this.hideElement(document.getElementById(b))};this.mouseX=function(a){if(!a){a=window.event}if(a.pageX){return a.pageX}else{if(a.clientX){return a.clientX+(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft)}else{return 0}}};this.mouseY=function(a){if(!a){a=window.event}if(a.pageY){return a.pageY}else{if(a.clientY){return a.clientY+(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop)}else{return 0}}};this.getTopPos=function(a){var b=a.offsetTop;while((a=a.offsetParent)!=null){if(a.tagName!="HTML"){b+=a.offsetTop;if(document.all){b+=a.clientTop}}}return b};this.getLeftPos=function(a){var b=a.offsetLeft;while((a=a.offsetParent)!=null){if(a.tagName!="HTML"){b+=a.offsetLeft;if(document.all){b+=a.clientLeft}}}return b};this.showContactFormPanel=function(f,a,b,d){this.showPanel(f,a,b,d,600,360)};this.showPanel=function(h,l,n,g,b,k){var m=document.getElementById(h).innerHTML;if(m&&m.length>0){var d=document.getElementById(l);var j=this.getLeftPos(d);var i=this.getTopPos(d);var f=document.getElementById(this.GRID_POPUP);var a=document.getElementById(this.PANEL_POPUP);if(f){a.style.left=j+150+"px";a.style.top=170+"px";a.style.width=b+"px";a.style.height=k+"px";a.innerHTML=this.POPUP_PRESTR+'<div class="cpanel" ><table width="100%" cellpadding="0" cellspacing="0"><tr  onclick="javascript:AppLib.hideInfoPanel()"><td class="cpaneltitle" align="left">'+n.title+'</td><td align="right" style="padding-right:10px"><img  src="'+this.getImageDir()+'c.gif" onclick="javascript:AppLib.hideInfoPanel()"/></td></tr></table><div style="text-align:center" width="100%">'+m+"</div></div>"+this.POPUP_POSTSTR;this.showModeless(a);this.setMLIFrameHeight(k)}}};this.showInfoPanel=function(g,j,l,f){var k=document.getElementById(g).innerHTML;if(k&&k.length>0){var b=document.getElementById(j);var i=this.getLeftPos(b);var h=this.getTopPos(b);var d=document.getElementById(this.GRID_POPUP);var a=document.getElementById(this.PANEL_POPUP);if(d){a.style.left=i+(b.width)/5+"px";a.style.top=h+(b.height)/20+"px";a.style.width=(b.width)/1.5+"px";a.style.height=(b.height)/1+"px";a.innerHTML=this.POPUP_PRESTR+'<div class="infopanel"><table class="infopanel" width="100%" cellpadding="0" cellspacing="0"><tr  onclick="javascript:AppLib.hideInfoPanel()"><td class="infopaneltitle" align="left">'+l.title+'</td><td align="right" style="padding-right:10px"><img  src="'+this.getImageDir()+'c.gif" onclick="javascript:AppLib.hideInfoPanel()"/></td></tr></table><div style="text-align:center" width="100%">'+k+"</div></div>"+this.POPUP_POSTSTR;this.showModeless(a);a.style.height=d.style.height;this.setMLIFrameHeight(50)}}};this.showInfoPanel1=function(f,a,b,d){if(this.PTIMER){clearTimeout(this.PTIMER);this.PTIMER=null}this.PTIMER=setTimeout("javascript:AppLib.showInfoPanelInt1('"+f+"','"+a+"','"+b.title+"')",500)};this.showInfoPanelInt1=function(e,h,j){if(this.PTIMER){clearTimeout(this.PTIMER);this.PTIMER=null}var i=document.getElementById(e).innerHTML;if(i&&i.length>0){var b=document.getElementById(h);var g=this.getLeftPos(b);var f=this.getTopPos(b);var d=document.getElementById(this.GRID_POPUP);var a=document.getElementById(this.PANEL_POPUP);if(d){a.style.left=g+(b.width)/5+"px";a.style.top=f+(b.height)/20+"px";a.style.width=(b.width)/1+"px";a.style.height=(b.height)/1+"px";a.innerHTML=this.POPUP_PRESTR+'<div class="infopanel"><table class="infopanel" width="100%" cellpadding="0" cellspacing="0"><tr  onclick="javascript:AppLib.hideInfoPanel()"><td class="infopaneltitle" align="left">'+j+'</td><td align="right" style="padding-right:10px"><img  src="'+this.getImageDir()+'c.gif" onclick="javascript:AppLib.hideInfoPanel()"/></td></tr></table><div style="text-align:center" width="100%">'+i+"</div></div>"+this.POPUP_POSTSTR;this.showModeless(a);a.style.height=d.style.height;this.setMLIFrameHeight(50)}}};this.showInfoPanel4=function(f,j,m,d){var l=this.mouseX(d);var i=this.mouseY(d);var k=screen.width;var a=386;var h=261;l=l-a+6;if(l<100){l=100}var b=l+10;var g=i-h-30;if(this.PTIMER){clearTimeout(this.PTIMER);this.PTIMER=null}this.PTIMER=setTimeout("javascript:AppLib.showInfoPanelInt4('"+f+"','"+j+"',"+l+","+i+",'"+m.title+"',"+a+","+h+","+b+","+g+")",500)};this.showInfoPanelInt4=function(g,m,n,l,p,b,k,d,j){if(this.PTIMER){clearTimeout(this.PTIMER);this.PTIMER=null}var o=document.getElementById(g).innerHTML;if(o&&o.length>0){var e=document.getElementById(m);var i=this.getLeftPos(e);var h=this.getTopPos(e);var f=document.getElementById(this.GRID_POPUP);var a=document.getElementById(this.PANEL_POPUP);if(f){a.style.left=d+"px";a.style.top=j+"px";a.style.width=b+"px";a.style.height=k+"px";a.innerHTML=this.POPUP_PRESTR+o+this.POPUP_POSTSTR;this.showModeless(a);a.style.height=f.style.height;this.setMLIFrameHeight(k)}}};this.showMainClickInfo=function(f,j,l,d,a,h,k,i,b,g){if(this.PTIMER){clearTimeout(this.PTIMER);this.PTIMER=null}this.PTIMER=setTimeout("javascript:AppLib.showMainClickInfoInt('"+f+"','"+j+"',"+k+","+i+",'"+l.title+"',"+a+","+h+","+b+","+g+")",400)};this.showMainClickInfoInt=function(g,m,n,l,p,b,k,d,j){if(this.PTIMER){clearTimeout(this.PTIMER);this.PTIMER=null}var o=document.getElementById(g).innerHTML;if(o&&o.length>0){var e=document.getElementById(m);var i=this.getLeftPos(e);var h=this.getTopPos(e);var f=document.getElementById(this.GRID_POPUP);var a=document.getElementById(this.PANEL_POPUP);if(f){a.style.left=d+"px";a.style.top=j+"px";a.style.width=b+"px";a.style.height=k+"px";a.innerHTML=this.POPUP_PRESTR+'<div class="infopanel"><table width="100%" cellpadding="0" cellspacing="0"><tr  onclick="javascript:AppLib.hideInfoPanel()"><td class="infopaneltitle" align="left">'+p+'</td><td align="right" style="padding-right:10px"><img  src="../'+this.getImageDir()+'c.gif" onclick="javascript:AppLib.hideInfoPanel()"/></td></tr></table><div style="text-align:center" width="100%"  onclick="javascript:AppLib.hideInfoPanel()">'+o+"</div></div>"+this.POPUP_POSTSTR;this.showModeless(a);this.setMLIFrameHeight(k)}}};this.hideInfoPanel=function(){if(this.PTIMER){clearTimeout(this.PTIMER);this.PTIMER=null}this.clearSong();this.hideModeless()};this.playsoundbite=function(i,a,b,c,g){var e=new SWFObject(g+this.getPlayerDir()+"playerLoopMini.swf","soundbite",a,b,"7","#FFFFFF");e.addVariable("autoPlay","yes");e.addVariable("loop","no");e.addVariable("soundPath",g+"data/audio/"+c);e.write(i);return 0};this.playjukebox2=function(b,a){this.playjukebox2a(b,a,1)};this.playjukebox=function(b,a){this.playjukebox2a(b,a,1)};this.playjukebox2a=function(j,i,e){var c=parent.topF.document.getElementById("jukediv1");if(c){return}var h=i+"jukebox.swf";var g='<div id="jukediv1"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';g+='codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" ';g+=' width="167" height="18">';g+='<param name="movie" value="'+h+'" />';g+='<param name="quality" value="high" />';g+='<embed src="'+h+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" ';g+='type="application/x-shockwave-flash" width="167" height="18"></embed></object></div>';var b=parent.topF.document.getElementById(j);if(b){b.innerHTML=g}};this.stopjukebox=function(b){var a=parent.topF.document.getElementById(b);if(a){a.innerHTML=""}};this.stopjukeboxS=function(b){if(opener&&opener.parent){var a=opener.parent.topF.document.getElementById(b);if(a){a.innerHTML=""}}};this.createcontactform=function(){document.write(this.getSWFMarkup("contactForm.swf",600,350))};this.clearSong=function(){var a=document.getElementById("SongPlayer");if(a){a.innerHTML=""}};this.playsong=function(d,a){var c=document.getElementById("SongPlayer");if(c){var b='<table width="100%"><tr style="background-color=white"><td>Now Playing '+d;b+='</td><td align="right"><span class="linklabel" onclick="javascript:AppLib.clearSong()">';b+="Stop Playing</span></td></tr></table>";b+=this.getSWFMarkup(a,0,0);c.innerHTML=b}};this.getSWFMarkup=function(d,a,c){var b="";b+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"';b+=' width="'+a+'" height="'+c+'" id="SongPlayerId" align="middle">';b+='<param name="allowScriptAccess" value="sameDomain" />';b+='<param name="movie" value="'+d+'">';b+='<param name="loop" value="true" /><param name="quality" value="high" /><param name="bgcolor" value="#333333" />';b+='<embed src="'+d+'" loop="true" quality="high" bgcolor="#333333" width="'+a+'" height="'+c+'"';b+=' name="TopCenterBanner" align="middle" allowScriptAccess="sameDomain"';b+=' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';return b};this.playmovie2=function(d,a,c){var e=document.getElementById("MoviePlayer");if(e){var b="";b+='<table cellpadding="0" cellspacing="0" border="0px" style="background-color: #000000;" border-color="gray"><tr><td style="padding:0px" valign="middle"><center>';b+=this.getMoviePlayerMarkup("",d,a,c);b+="</center></td></tr></table>";e.innerHTML=b}};this.playmovie3=function(i,e,a,c){var g=document.getElementById("MoviePlayer");if(g){var b="";b+=this.getMoviePlayerMarkup(i,e,a,c);g.innerHTML=b}};this.getFlowPlayerMarkup=function(d,a,c){var b="";b+='<a href="'+d+'.flv" style="display:block;width:'+a+"px;height:"+c+'px;" id="trailerplayer"> </a>';return b};this.getMoviePlayerMarkup=function(g,e,a,c){var b="";b+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';b+='codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"';b+='width="'+a+'" height="'+c+'" id="FLVPlayer">';b+='<param name="movie" value="'+g+'App_Themes/default/p/flvplayer.swf" />';b+='<param name="salign" value="lt" />';b+='<param name="quality" value="high" />';b+='<param name="scale" value="noscale" />';b+='<param name="wmode" value="opaque" />';b+='<param name="FlashVars"';b+='value="&MM_ComponentVersion=1&skinName='+g+"App_Themes/default/p/Corona_Skin_3";b+="&streamName="+e+'&autoPlay=true&autoRewind=true" />';b+='<embed src="'+g+'App_Themes/default/p/flvplayer.swf" ';b+='flashvars="&MM_ComponentVersion=1&skinName='+g+"App_Themes/default/p/Corona_Skin_3";b+="&streamName="+e+'&autoPlay=true&autoRewind=true" ';b+='quality="high" scale="noscale" width="'+a+'" height="'+c+'" name="FLVPlayer" ';b+=' wmode="opaque" ';b+='salign="LT" type="application/x-shockwave-flash" ';b+='pluginspage="http://www.macromedia.com/go/getflashplayer" />';b+="</object>";return b};this.openPreOrder=function(b){var a=window.open(b,"Second","toolbar=no, location=no, directories=no, status=no,menubar=no, scrollbars=yes, resizable=yes, copyhistory=yes,width=700, height=640");a.focus()};this.openMyRefAcct=function(){var a=window.open("MyMoney.aspx","Second","toolbar=no, location=no, directories=no, status=no,menubar=no, scrollbars=yes, resizable=yes, copyhistory=yes,width=700, height=640");a.focus()};this.openRestricted=function(){var a=window.open("ChkRestricted.aspx","Second","toolbar=no, location=no, directories=no, status=no,menubar=no, scrollbars=yes, resizable=yes, copyhistory=yes,width=700, height=640");a.focus()};this.openTC=function(){var a=window.open("toc.html","Third","toolbar=no, location=no, directories=no, status=no,menubar=no, scrollbars=yes, resizable=yes, copyhistory=yes,width=700, height=640");a.focus()};this.openCCRegister=function(){var a=window.open("CCRegister.aspx","Third","toolbar=no, location=no, directories=no, status=no,menubar=no, scrollbars=yes, resizable=yes, copyhistory=yes,width=700, height=640");a.focus()};this.swapImageNext=function(b,a){var c=document.getElementById(b);if(c){var d=a;this.swapImageIndex=this.swapImageIndex+1;d=d.replace(/#/i,this.swapImageIndex);c.src=d}};this.sleep=function(a){var b=new Date();b.setTime(b.getTime()+a);while(new Date().getTime()<b.getTime()){}}};var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;var isIE6=(navigator.appVersion.indexOf("MSIE 6.0")!=-1)?true:false;var isWin=(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false;var isOpera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;