﻿
function classSite(objConfig){this.current=0;this.url='';this.didYouKnowData=new Array();this.partnerData=new Array();this.flashVersion=0;if(navigator.plugins&&navigator.plugins.length){for(var intCounter=0;intCounter<navigator.plugins.length;intCounter++){if(navigator.plugins[intCounter].name.indexOf('Shockwave Flash')!=-1){var strFlashPlugin=navigator.plugins[intCounter].description.split('Shockwave Flash ')[1];this.flashVersion=strFlashPlugin;};};}else if(window.ActiveXObject){for(var intCounter=2;intCounter<20;intCounter++){try{objFlash=eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash."+intCounter+"');");if(objFlash){var arrFlashPlugin=new ActiveXObject('ShockwaveFlash.ShockwaveFlash.'+intCounter).GetVariable("$version").split(',');this.flashVersion=arrFlashPlugin[0].slice(arrFlashPlugin[0].indexOf(' '))+'.'+arrFlashPlugin[1]+'r'+arrFlashPlugin[2];};}catch(objError){};};};var obj=this;document.write('<style tyype="text/css">#didYouKnow{visibility:hidden;}</style>');this.init=function(){document.getElementById('didYouKnowMenu').getElementsByTagName('a')[0].onclick=obj.back;document.getElementById('didYouKnowMenu').getElementsByTagName('a')[1].onclick=obj.next;obj.position();document.getElementById('didYouKnow').style.visibility='visible';obj.partnerPopups();};this.injectFlash=function(objConfig){elThis=objConfig&&objConfig.parent?objConfig.parent:document.getElementById('banner');strXml=objConfig&&objConfig.xml?objConfig.xml:'flash/xml/data.xml';strMovie=objConfig&&objConfig.movie?objConfig.movie:'flash/main.swf';intWidth=objConfig&&objConfig.width?objConfig.width:200;intHeight=objConfig&&objConfig.height?objConfig.height:100;intVersion=objConfig&&objConfig.version?objConfig.version:9;if(parseInt(obj.flashVersion)>=intVersion){var strHtml='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="' + intWidth + '" height="' + intHeight + '" id="" align="middle">';strHtml+='<param name="allowScriptAccess" value="sameDomain"/>';strHtml+='<param name="allowFullScreen" value="false"/>';strHtml+='<param name="movie" value="' + strMovie + '?dataPath=' + strXml + '"/>';strHtml+='<param name="loop" value="false"/>';strHtml+='<param name="menu" value="false"/>';strHtml+='<param name="quality" value="best"/>';strHtml+='<param name="scale" value="noscale"/>';strHtml+='<param name="bgcolor" value="#000000"/>';strHtml+='<param name="wmode" value="transparent"/>';strHtml+='<embed src="' + strMovie + '?dataPath=' + strXml + '" loop="false" menu="false" wmode="transparent" quality="best" scale="noscale" bgcolor="#000000" width="' + intWidth + '" height="' + intHeight + '" name="main" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"/>';strHtml+='</object>';elThis.innerHTML=strHtml;};};this.getPosition=function(elThis){var objPos=new Object();objPos.top=0;objPos.left=0;while(elThis.tagName.toLowerCase()!='body'&&elThis.tagName.toLowerCase()!='html'){elThis.style.position='relative';objPos.top+=elThis.offsetTop;objPos.left+=elThis.offsetLeft;elThis=elThis.offsetParent;};return objPos;};this.partnerPopups=function(){var elPartners=document.getElementById('partners');if(elPartners){var aelLogos=elPartners.getElementsByTagName('img');var intCount=0;for(intCount=0;intCount<obj.partnerData.length;intCount++){elParent=document.getElementById(obj.partnerData[intCount].id);if(elParent){elParent.onmouseover=(function(elParent,intCount){return function(){var elPage=document.getElementById('page');intMax=obj.getPosition(elPage).left+elPage.offsetWidth;var objPos=obj.getPosition(elParent);var elDiv=document.createElement('div');elDiv.style.zIndex='30000';elDiv.className='partnerZoom';var elImage=document.createElement('img');elImage.src=obj.partnerData[intCount].image;elImage.altText=obj.partnerData[intCount].id;elImage.width=obj.partnerData[intCount].width;elImage.height=obj.partnerData[intCount].height;elDiv.appendChild(elImage);document.body.appendChild(elDiv);elDiv.style.position='absolute';elDiv.style.top=(objPos.top+elParent.offsetHeight/2-elDiv.offsetHeight/2)+'px';if(intMax<objPos.left+elImage.offsetWidth){elDiv.style.left=(intMax-elImage.offsetWidth)+'px';}else{elDiv.style.left=(objPos.left)+'px';};elDiv.onmouseout=(function(elDiv){return function(){document.body.removeChild(elDiv);return false;};})(elDiv);};})(elParent,intCount);};};};};this.next=function(){obj.current++;if(obj.current>=obj.didYouKnowData.length){obj.current=0;};obj.update();return false;};this.back=function(){obj.current--;if(obj.current<0){obj.current=obj.didYouKnowData.length-1;};obj.update();return false;};this.update=function(){var elDidYouKnow=document.getElementById('didYouKnow');var elMessage=document.createElement('p');elMessage.appendChild(document.createTextNode(obj.didYouKnowData[obj.current]));elDidYouKnow.removeChild(elDidYouKnow.getElementsByTagName('p')[0]);elDidYouKnow.insertBefore(elMessage,elDidYouKnow.getElementsByTagName('h2')[0].nextSibling);obj.position();};this.position=function(){setTimeout(function(){var intTop=obj.getPosition(document.getElementById('footer')).top;var elDidYouKnow=document.getElementById('didYouKnow');elDidYouKnow.style.position='absolute';elDidYouKnow.style.top=(intTop-elDidYouKnow.offsetHeight)+'px';document.getElementById('column1').style.paddingBottom=elDidYouKnow.offsetHeight+'px';},200);};};var objSite=new classSite();
