function getBrowserWidth(){var a;if(typeof window.innerWidth!='undefined'){a=window.innerWidth}else if(typeof document.documentElement!='undefined'&&typeof document.documentElement.clientWidth!='undefined'&&document.documentElement.clientWidth!=0){a=document.documentElement.clientWidth}else{a=document.getElementsByTagName('body')[0].clientWidth}return a}function getY(a){var b=document.getElementById('dhm-button-'+a);var c=b.offsetLeft;while(b.offsetParent){c=c+b.offsetParent.offsetLeft;if(b==document.getElementsByTagName('body')[0]){break}else{b=b.offsetParent}}return c}function getWidth(a){var b=document.getElementById(a);var w=b.offsetWidth;return w}function showDHMPopup(a){var b='dhm-button-'+a;var c='dhmbox-content'+a;for(i=1;i<=4;i++){var d='dhmbox-content'+i;var e='dhm-button-'+i;if(e==b){var f=document.getElementById(d).className;if(f!=='dhmbox-content-show'){document.getElementById(d).className='dhmbox-content-show';document.getElementById(e).className='dhm-button-active'}else{document.getElementById(d).className='dhmbox-content';document.getElementById(e).className='dhm-button'}}else{document.getElementById(d).className='dhmbox-content';document.getElementById(e).className='dhm-button'}}var g=getBrowserWidth();var h=getY(a);var j=getWidth('dhmbox-content'+a);var k=getWidth('dhm-button-'+a);var l=g-j-20;var m=(document.all)?1:0;if(m>0){var n=g-j}else{var n=g-j-20}if(n>h){var o=h+k;if(m>0){var p=g-o}else{var p=g-o-17}document.getElementById('dhmbox'+a).style.right=p+'px'}else{document.getElementById('dhmbox'+a).style.right='10px'}}
