if (window.location.hash != '' && window.location.hash != '#') { var url = window.location.hash; url = url.replace(/.*#(.*)/, "$1"); window.location.href = 'main.php?'+url; } function getPos(inputElement) { var coords = new Object(); coords.x = 0; coords.y = 0; try { targetElement = inputElement; if(targetElement.x && targetElement.y) { coords.x = targetElement.x; coords.y = targetElement.y; } else { if(targetElement.offsetParent) { coords.x += targetElement.offsetLeft; coords.y += targetElement.offsetTop; while(targetElement = targetElement.offsetParent) { coords.x += targetElement.offsetLeft; coords.y += targetElement.offsetTop; } } else { //alert("Could not find any reference for coordinate positioning."); } } return coords; } catch(error) { //alert(error.msg); return coords; } } function yukseklik() { mutlakyukseklik = (getPos(document.getElementById('pokemon2')).y - getPos(document.getElementById('pokemon1')).y) + 3; document.getElementById('bizimlayer1').style.height = mutlakyukseklik+'px'; document.getElementById('bizimlayer2').style.height = mutlakyukseklik+'px'; }