//************************************************************************//
//   QShop E-Commerce Solutions                                           //
//   Copyright @ VISUAL TECHNOLOGIES INC  2002-2007                       //
//   http://qshop.com.pl qshop@qshop.com.pl                               //
//************************************************************************//
//   This software is copyrighted, do not attempt to copy                 //
//   without permission                                                   //
//************************************************************************//
var tempX = 0;
var tempY = 0;
function SCREEN_SIZE(wh) {
	if (navigator.appName=="Netscape"||navigator.appName=="Opera") {
			winW = window.innerWidth;
			winH = window.innerHeight;
	}
	if (navigator.appName.indexOf("Microsoft")!=-1) {
		winW = document.body.clientWidth;
		winH = document.body.clientHeight;
	}
	if(wh=='width') {
		return winW;	
	} else { 
		return winH;
	}
}
var IE = document.all?true:false
if (!IE) {
	document.captureEvents(Event.MOUSEMOVE)
}
document.onmousedown = getMouseXY;
function getMouseXY(e) {
	if (IE) {
		tempX = window.document.documentElement.scrollLeft + event.clientX;
		tempY = window.document.documentElement.scrollTop + event.clientY;
	} else {
		tempX = e.pageX+11;
		if(window.navigator.userAgent.indexOf('Opera')==0) {
			tempY = e.pageY+Math.ceil((e.pageY*0.0033));
		} else {
			tempY = e.pageY+Math.ceil((e.pageY*0.023));
		}
	}
	var URL=window.location.href;
	var url='_modules/_heat/_heat_reg.php?posx='+tempX+'&posy='+tempY+'&width='+SCREEN_SIZE('width')+'&url='+URL;
	guardar(url);
	return true;
}
function guardar(url){
	var xmlDoc = null ;
	if (typeof window.ActiveXObject != 'undefined' ) {
		xmlDoc = new ActiveXObject('Microsoft.XMLHTTP');
	}else {
		xmlDoc = new XMLHttpRequest();
	}
	xmlDoc.open('GET', url, true );
	xmlDoc.send( null );
}
