var nextCmdId = 0; function showCardDetails() { document.getElementById('carddetails').style.display = 'block'; document.getElementById('cardpreview').style.display = 'none'; outSwitch('previewButtonImg', 'previewButton'); overSwitch('detailsButtonImg', 'detailsButton'); return false; } function showCardPreview() { document.getElementById('carddetails').style.display = 'none'; document.getElementById('cardpreview').style.display = 'block'; overSwitch('previewButtonImg', 'previewButton'); outSwitch('detailsButtonImg', 'detailsButton'); return false; } function showPremiumDescription(abilityId, e) { var inner = document.getElementById('abilityDesc' + abilityId).innerHTML; if (document.all) { // if IE // grab the x-y pos.s if browser is IE tempX = event.clientX+ document.documentElement.scrollLeft; tempY = event.clientY + document.documentElement.scrollTop; } else { // grab the x-y pos.s if browser is NS tempX = e.pageX; tempY = e.pageY; } // catch possible negative values in NS4 if (tempX < 0){tempX = 0;} if (tempY < 0){tempY = 0;} document.getElementById('abilityTooltipContent').innerHTML = inner;// + "(" + tempX + ", " + tempY + ")" + (isNaN(tempX)); var obj = document.getElementById('abilityTooltip'); obj.style.left = (tempX+15) + 'px'; obj.style.top = (tempY+15) + 'px'; obj.style.display = 'block'; } function showDescription(abilityId, e) { var inner = document.getElementById('abilityDesc' + abilityId).innerHTML; if (document.all) { // if IE // grab the x-y pos.s if browser is IE var windowWidth = 0; if( typeof( window.innerWidth ) == 'number' ) { //Non-IE windowWidth = window.innerWidth; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode' windowWidth = document.documentElement.clientWidth; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible windowWidth = document.body.clientWidth; } tempX = (event.clientX - windowWidth/2)+ document.documentElement.scrollLeft; tempY = event.clientY + document.documentElement.scrollTop; } else { // grab the x-y pos.s if browser is NS tempX = (e.pageX - windowWidth/2); tempY = e.pageY; } // catch possible negative values in NS4 if (tempX < 0){tempX = 0;} if (tempY < 0){tempY = 0;} document.getElementById('abilityTooltipContent').innerHTML = inner// + "(" + tempX + ", " + tempY + ")"; var obj = document.getElementById('abilityTooltip'); obj.style.left = (tempX+15) + 'px'; obj.style.top = (tempY+15) + 'px'; obj.style.display = 'block'; } function hideDescription(abilityId) { var objName = 'abilityDesc' + abilityId; var obj = document.getElementById('abilityTooltip'); obj.style.display = 'none'; } addImageEntry('previewButton', 'http://content.poxnora.com/images/preview_tab.gif', 'http://content.poxnora.com/images/preview_tab_s.gif'); addImageEntry('detailsButton', 'http://content.poxnora.com/images/detail_tab.gif', 'http://content.poxnora.com/images/detail_tab_s.gif');