var urlBase = "http://pricemaster.bazoo.gr/";

if (id) {
    var cur = window.location;
    var ref = document.referrer;
    var session = getCookie('PHPSESSID');
    var data = tracking_params;
    var data_type = '';
    if(typeof tracking_type != 'undefined') {
        data_type = tracking_type;
    }    
    var src = urlBase+"services/php/visit.php?id="+id+"&page="+escape(cur)+"&ref="+escape(ref)+"&session="+escape(session)+"&data="+escape(data)+"&data_type="+escape(data_type);
    document.write("<iframe frameborder='0' style='display:none !important;width:0 !important;height:0 !important;' src='"+src+"'></iframe>");
}

function getCookie(c_name)
{
    var i,x,y,ARRcookies=document.cookie.split(";");
    for (i=0;i<ARRcookies.length;i++)
    {
        x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
        y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
        x=x.replace(/^\s+|\s+$/g,"");
        if (x==c_name)
        {
            return unescape(y);
        }
    }
    return null;
}
