var req = false;
function loadXMLDoc(url, funcProcess) {
   req = false;
   if(window.XMLHttpRequest) {
      try {
         req = new XMLHttpRequest();
      } catch(e) {
         req = false;
      }
   } else if(window.ActiveXObject) {
      try {
         req = new ActiveXObject("Msxml2.XMLHTTP");
      } catch(e) {
         try {
            req = new ActiveXObject("Microsoft.XMLHTTP");
         } catch(e) {
            req = false;
         }
      }
   }
   if(req) {
      req.onreadystatechange = funcProcess;
      req.open("GET", url, true);
      req.send(null);
   }
}

function ajaxCallback()
 {
   if (req.readyState == 4)
   {
      if (req.status == 200)
      {
         if (req.responseText.length)
         {
            if (req.responseText != '1')
            {
               //alert('countClick Failed');
            }
         }
      }
      else
      {
         //alert("There was a problem retrieving the XML data:\n" + req.statusText);
      }
   }
}

function cnt(sngid){
	var t = (new Date()).getTime();
	loadXMLDoc('download.php?opt=get&songid=' + sngid + '&t=' + t, ajaxCallback);
	return true;
}

function fbs_click() {
	u=location.href;
	t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');
	return false;
}