///////////////////// Cookie //////////////////////
function set_cookie(name, value)
{
var date = new Date();
date.setTime(date.getTime() + 31536000000);
document.cookie = name + "=" + escape(value) + "; expires=" + date.toGMTString();
}
function get_cookie(name)
{
var _cookie = document.cookie.split("; ");
for (var i=0; i < _cookie.length; i++)
{
var _crumb = _cookie[i].split("=");
if (name == _crumb[0])
return unescape(_crumb[1]);
}
return null;
}
///////////////////// VeryStat //////////////////////
function get_referrer()
{
return window.top.document.referrer;
}
function get_location()
{
return window.top.location;
}
function get_color()
{
return navigator.appName=="Netscape" ? screen.pixelDepth : screen.colorDepth;
}
function get_resolution()
{
return screen.width + 'x' + screen.height;
}
function get_alexa()
{
if(navigator.userAgent.toLowerCase().indexOf("alexa")!=-1)
{
return 1;
}
else
{
return -1;
}
}
function get_return()
{
var date = new Date();
var vs_return_count = Number(get_cookie('vs_return_count'));
var vs_last_return = Number(get_cookie('vs_last_return'));
if(date.getTime() > (vs_last_return + 86400 * 1000))
{
set_cookie('vs_return_count',vs_return_count + 1);
set_cookie('vs_last_return',date.getTime());
}
return vs_return_count ? vs_return_count : 0 ;
}
function get_stat_data()
{
return 'referrer='+escape(get_referrer())+'&location='+escape(get_location())+'&color='+get_color()+'&resolution='+get_resolution()+'&alexa='+get_alexa()+'&returning='+get_return();
}
document.write('');
document.write('
');
document.write('');