function getElementLeft(element){if(element==null)return-1;if(browser.ns4)return element.left;if(browser.hasDOM||browser.isIE)return element.style.pixelLeft;return-1}function getElementTop(element){if(element==null)return-1;if(browser.ns4)return element.top;if(browser.hasDOM||browser.isIE)return element.style.pixelTop;return-1}function getElementPageLeft(element){if(element==null)return-1;var x;if(browser.ns4)return element.pageX;if(browser.hasDOM||browser.isIE){x=0;while(element.offsetParent!=null){x+=element.offsetLeft;element=element.offsetParent}x+=element.offsetLeft;return x}return-1}function getElementPageTop(element){if(element==null)return-1;var y;if(browser.ns4)return element.pageY;if(browser.hasDOM||browser.isIE){y=0;while(element.offsetParent!=null){y+=element.offsetTop;element=element.offsetParent}y+=element.offsetTop;return y}return-1}function getElementHeight(element){if(element==null)return-1;if(browser.ns4){if(element.document.height)return element.document.height;else return element.clip.bottom-element.clip.top}if(browser.hasDOM){if(element.scrollHeight)return element.scrollHeight;else return element.offsetHeight}else if(browser.isIE){if(element.style.pixelHeight)return element.style.pixelHeight;else return element.clientHeight}return-1}
function setElementZIndex(element,z){if(element==null)return;if(browser.ns4)element.zIndex=z;if(browser.hasDOM||browser.isIE)element.style.zIndex=z}function setElementLeft(element,left){if(element==null)return;if(browser.ns4)element.moveTo(left,getElementTop(element));if(browser.hasDOM||browser.isIE){element.style.left=left}}function setElementTop(element,top){if(element==null)return;if(browser.ns4)element.moveTo(getElementLeft(element),top);if(browser.hasDOM||browser.isIE){element.style.top=top}}function getElement(id){if(id=='')return null;if(browser.ns4)return findElement(id,document);else if(browser.hasDOM)return document.getElementById(id);else if(browser.isIE)return eval('document.all.'+id);return null}function hideElement(element){if(element==null)return;if(browser.ns4)element.visibility='hide';if(browser.hasDOM||browser.isIE)element.style.visibility='hidden'}function showElement(element){if(element==null)return;if(browser.ns4)element.visibility='show';if(browser.hasDOM||browser.isIE)element.style.visibility='visible'}
function BtnTblOver(direction){var tblObj=getElement('scrollBtnTbl');tblObj.className="p1"+direction}var globalTimers=[];var globalVisibles=[];var SectionHideTimer=[];var delayHide=400;function clearTimers(){for(var i=globalTimers.length-1;i>=0;i--){clearTimeout(globalTimers[i]);globalTimers.pop()}}function showSection(in_key){var subElem=document.getElementById("r_"+in_key);if(subElem!=null)if(SectionHideTimer["t_"+in_key])clearTimeout(SectionHideTimer["t_"+in_key])}function showSub(in_key,fromElement){var mainCont=fromElement.parentNode;var subElem=getElement("r_"+in_key);if(subElem!=null){if(browser.isIE){if(getElement('imgKlamber'))getElement('imgKlamber').style.position='';if(getElement('ikoonid'))getElement('ikoonid').style.position=''}var getLastVis=globalVisibles[globalVisibles.length-1];if(getLastVis&&getLastVis!='')hideSection(getLastVis);clearTimers();if(SectionHideTimer["t_"+in_key])clearTimeout(SectionHideTimer["t_"+in_key]);setElementLeft(subElem,(getElementPageLeft(mainCont)-getElement('topMenu').scrollLeft)+"px");setElementTop(subElem,(getElementPageTop(mainCont)+31)+"px");showElement(subElem);setElementZIndex(subElem,delayHide);globalVisibles.push(in_key)}}function hideSection(in_key){var subElem=getElement("r_"+in_key);if(subElem!=null){hideElement(subElem);setElementZIndex(subElem,-1);}if(browser.isIE){if(getElement('imgKlamber')){var timerId2=setTimeout(function(){return function(){getElement('imgKlamber').style.position='relative'}}(),delayHide);globalTimers.push(timerId2);}if(getElement('ikoonid')){var timerId3=setTimeout(function(){return function(){getElement('ikoonid').style.position='relative'}}(),delayHide);globalTimers.push(timerId3)}}}function hideSub(in_key){var subElem=getElement("r_"+in_key);if(subElem!=null){SectionHideTimer["t_"+in_key]=setTimeout("hideSection('"+in_key+"')",400);globalTimers.push(SectionHideTimer["t_"+in_key])}}var scTimer;function ScrollLeft(){scTimer=setInterval("getElement('topMenu').scrollLeft -= 2",15)}function ScrollRight(){scTimer=setInterval("getElement('topMenu').scrollLeft += 2",15)}function loadHash(){return ran_number=Math.floor(Math.random()*1000);}function getPullquote(){var container=getElement("sisubox");var quote=container.getElementsByTagName("SPAN");for(x=0;quote.length>x;x++){if(quote[x].className=="pullquote"){writePullquote(container,quote[x]);break;}}}function writePullquote(container,quote){var blockquote=document.createElement("blockquote");var pullquote=document.createElement("p");var hole=container.getElementsByTagName("P")[3];blockquote.className="pullquote";pullquote.className="pullquote";pullquote.appendChild(quote.cloneNode(true));blockquote.appendChild(pullquote);container.insertBefore(blockquote,hole)}function ShowVideo(video_url){if(WMP7){document.write('<OBJECT ID=MediaPlayer ');document.write(' CLASSID=CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6');document.write(' standby="Loading Microsoft Windows Media Player components..."');document.write(' TYPE="application/x-oleobject" width="312" height="305">');document.write('<PARAM NAME="url" VALUE="'+video_url+'">');document.write('<PARAM NAME="AutoStart" VALUE="true">');document.write('<PARAM NAME="ShowControls" VALUE="1">');document.write('<PARAM NAME="uiMode" VALUE="full">');document.write('<'+'/OBJECT>')}else{document.write('<OBJECT ID=MediaPlayer ');document.write('CLASSID=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95 ');document.write('CODEBASE=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715 ');document.write('standby="Loading Microsoft Windows Media Player components..." ');document.write('TYPE="application/x-oleobject" width="312" height="305">');document.write('<PARAM NAME="FileName" VALUE="'+video_url+'">');document.write('<PARAM NAME="AutoStart" VALUE="true">');document.write('<PARAM NAME="ShowControls" VALUE="1">');document.write('<PARAM NAME="ShowStatusBar" VALUE="1">');document.write('<PARAM name="ShowPositionControls" value="1">');document.write('<PARAM name="ShowAudioControls" value="1">');document.write('<PARAM name="ShowTracker" value="1">');document.write('<PARAM name="ShowDisplay" value="0">');document.write('<PARAM name="ShowGotoBar" value="0">');document.write('<PARAM name="ShowCaptioning" value="0">');document.write('<PARAM name="AnimationAtStart" value="0">');document.write('<PARAM name="enableContextMenu" value="1">');document.write('<PARAM name="TransparentAtStart" value="0">');document.write('<Embed type="application/x-mplayer2"');document.write(' pluginspage="http://www.microsoft.com/isapi/redir.dll?prd=windows&amp;sbp=mediaplayer&amp;ar=Media&amp;sba=Plugin"');document.write(' filename="'+video_url+'"');document.write(' src="'+video_url+'"');document.write(' Name=MediaPlayer');document.write(' AutoStart=1');document.write(' ShowPositionControls=1');document.write(' ShowAudioControls=1');document.write(' ShowTracker=1');document.write(' ShowDisplay=0');document.write(' ShowGotoBar=0');document.write(' ShowCaptioning=0');document.write(' AnimationAtStart=0');document.write(' enableContextMenu=1');document.write(' ShowControls=1');document.write(' ShowStatusBar=1');document.write(' TransparentAtStart=0');document.write(' width=312');document.write(' height=305>');document.write('<'+'/embed>');document.write('<'+'/OBJECT>')}}
