heaturl = 'http://www.kataklick.de/ap/slx/heatsave.php'; heat_userid = '1'; heat_pageid = '1'; function dopopup1() { if (top.location == self.location) { dopopup(); window.onunload = ''; } } function dopopup2() { if (top.location == self.location) { dopopup(); } } function dopopup() { getScrollXY(); iw = pageWidth(); ih = pageHeight(); pagedimensions(); if(ih == ph) { ih = screen.height; } thisurl = escape(document.location); fakeimage = new Image(); fakeimage.src = heaturl+'?scrolly='+scrOfY+'&windowy='+ih+'&pagey='+ph+'&userid='+heat_userid+'&pageid='+heat_pageid+'&url='+thisurl; //alert(fakeimage.src); } function pagedimensions() { if( window.innerHeight && window.scrollMaxY ) { // Firefox pageWidth = window.innerWidth + window.scrollMaxX; pageHeight = window.innerHeight + window.scrollMaxY; } else if( document.body.scrollHeight > document.body.offsetHeight ) { // all but Explorer Mac pageWidth = document.body.scrollWidth; pageHeight = document.body.scrollHeight; } else { // works in Explorer 6 Strict, Mozilla (not FF) and Safari pageWidth = document.body.offsetWidth + document.body.offsetLeft; pageHeight = document.body.offsetHeight + document.body.offsetTop; } ph = pageHeight; pw = pageWidth; return [ pw, ph ]; } function pageWidth() { return window.innerWidth != null? window.innerWidth: document.body != null? document.body.clientWidth:null; } function pageHeight() { return window.innerHeight != null? window.innerHeight: document.body != null? document.body.clientHeight:null; } function getScrollXY() { scrOfX = 0; scrOfY = 0; if( typeof( window.pageYOffset ) == 'number' ) { //Netscape compliant scrOfY = window.pageYOffset; scrOfX = window.pageXOffset; } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) { //DOM compliant scrOfY = document.body.scrollTop; scrOfX = document.body.scrollLeft; } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) { //IE6 standards compliant mode scrOfY = document.documentElement.scrollTop; scrOfX = document.documentElement.scrollLeft; } return [ scrOfX, scrOfY ]; } window.onbeforeunload=dopopup1; window.onunload=dopopup2;