function Usertracking(){
	this.detectRightClick=function(e){
		rightClick=false;
		if (e.which){
			rightClick = (e.which == 3);
		} else if (e.button) {
			rightClick = (e.button == 2);
		}
		if (!rightClick){
			return true;
		}
		return false;
	}
	this.listingClick=function(e, productId, pageId, position, page){
		if (typeof page=='undefined'){
			page=1;
		}
		if (this.detectRightClick(e)){
			clickData=productId+','+pageId+','+position+','+page;
			try{
				Cookie.set('tracking_last_clicked', clickData, 0);
			}catch(ex){}
		}
	}
	this.outerLinkClick=function(caller, e, outerLinkTypeId, positionOnPage, positionInList){
		if (this.detectRightClick){
			params=new Array();
			params.push('action=outerlink');
			params.push('typeid='+outerLinkTypeId);
			params.push('pagepos='+positionOnPage);
			params.push('listpos='+positionInList);
			outerLinkAjax=new Utils.Ajax(caller, '/ajax.php', '?'+params.join('&'));
			outerLinkAjax.withOverlay=0;
			outerLinkAjax.timeOutDelay=2000;
			outerLinkAjax.call();
		}
	}
}
function error(type, msg, filename, line){
	throw new window[type](msg, filename, line);
}
function showhide_details(field){
	if (document.getElementById(field)){
		st_table=document.getElementById(field);
	} else {
		error('Error', 'Object not found!');
	}
	if (st_table.style.display!='block'){
		st_table.style.display='block';
	} else {
		st_table.style.display='none';
	}
}
