function dani(nr,kd) {   		
    var xmlHttpReq = false;
    var self = this;
		var strURL = "/inc/dani.php";						   
    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    else if (window.ActiveXObject) {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    self.xmlHttpReq.open('POST', strURL, true);		
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');		
    self.xmlHttpReq.onreadystatechange = function() {}				
		var qstr = 'url=' + escape(nr) + '&kd=' + escape(kd);
    self.xmlHttpReq.send(qstr);		
}
function prepareLinks(kd) { 
  var a = document.getElementsByTagName('a'); 
  for(i=0; i<a.length; i++) {
	  if (a[i].target == '_blank' || a[i].target == '_new' || a[i].target == 'new' || a[i].target == 'blank') {
		  if (a[i].rel == '') {  	
        a[i].setAttribute('onclick', 'javascript:dani(this.href,'+kd+');');
			}
		}
  }
}
