//browser detection data
var IE = navigator.appName.indexOf("Microsoft") != -1;
//record data
var IPT_unique_DAAD6;
var IPT_id_DAAD6;
var IPT_seconds_DAAD6;
var IPT_total_DAAD6;
var IPT_saved_DAAD6;
//cookie data
var IPT_today_DAAD6 = new Date();
var IPT_zero_date_DAAD6 = new Date(0,0,0);
IPT_today_DAAD6.setTime(IPT_today_DAAD6.getTime() - IPT_zero_date_DAAD6.getTime());
var IPT_cookie_expire_date_DAAD6 = new Date(IPT_today_DAAD6.getTime());
//cookie autoplay data
var IPT_autoplay_DAAD6 = 0
//alert(IPT_autoplay_DAAD6);
function ipt_DAAD6_DoFSCommand(command, args) {
if (command == 'IPT_SaveData_DAAD6')
{
var argsArray = args.split(",");
IPT_id_DAAD6 = argsArray[0];
IPT_seconds_DAAD6 = argsArray[1];
IPT_total_DAAD6 = argsArray[2];
IPT_SaveData_DAAD6();
IPT_saved_DAAD6 = 1;
IPT_isPlaying_DAAD6 = Get_Cookie("IPT_playing")
Set_Cookie("IPT_playing", 0, "", "", "", 0);
}
else if (command == 'IPT_setGlobals_DAAD6')
{
var argsArray = args.split(",");
IPT_id_DAAD6 = argsArray[0];
IPT_seconds_DAAD6 = argsArray[1];
IPT_total_DAAD6 = argsArray[2];
}
else if (command == 'IPT_play_DAAD6')
{
IPT_isPlaying_DAAD6 = Get_Cookie("IPT_playing")
Set_Cookie("IPT_playing", "ipt_DAAD6", "", "", "", 0);
IPT_saved_DAAD6 = 0;
}
else
{
IPT_id_DAAD6 = 0;
IPT_seconds_DAAD6 = 0;
IPT_total_DAAD6 = 0;
}
}
function explodeArray(item,delimiter)
{
tempArray = new Array(1);
var Count = 0;
var tempString = new String(item);
while (tempString.indexOf(delimiter)>0)
{
tempArray[Count] = tempString.substr(0,tempString.indexOf(delimiter));
tempString = tempString.substr(tempString.indexOf(delimiter)+1,tempString.length-tempString.indexOf(delimiter)+1);
Count = Count + 1;
}
tempArray[Count] = tempString;
return tempArray;
}
function Get_Cookie(name)
{
var start = document.cookie.indexOf(name+"=");
var len = start+name.length+1;
if (!start && name != document.cookie.substring(0,name.length))
{
return null;
}
if (start == -1) return null;
var end = document.cookie.indexOf(";",len);
if (end == -1) end = document.cookie.length;
return unescape(document.cookie.substring(len,end));
}
function Set_Cookie(name,value,expires,path,domain,secure)
{
document.cookie = name + "=" +escape(value) +
( (expires) ? ";expires=" + expires.toGMTString() : "") +
( (path) ? ";path=" + path : "") +
( (domain) ? ";domain=" + domain : "") +
( (secure) ? ";secure" : "");
}
function addCloseEvent(func)
{
var oldonclose = window.onunload;
if (typeof window.onunload != 'function')
{
window.onunload = func;
}
else
{
window.onunload = function()
{
oldonclose();
func();
}
}
}
function IPT_SaveData_DAAD6()
{
if(IPT_saved_DAAD6 != 1 && IPT_id_DAAD6)
{
(new Image(1,1)).src = 'http://www.iprotalk.com/save_stats?i=' + IPT_id_DAAD6 + '&s=' + IPT_seconds_DAAD6 + '&t=' + IPT_total_DAAD6;
}
}
function IPT_unsetPlaying_DAAD6()
{
Set_Cookie("IPT_playing", 0, "", "", "", 0);
}
// autoplay defining
var IPT_isPlaying_DAAD6 = Get_Cookie("IPT_playing")
if (IPT_autoplay_DAAD6 == 2)
{
var IPT_autoplay_set_DAAD6 = Get_Cookie("IPT_autoplay_2618")
if(IPT_autoplay_set_DAAD6 == 1)
{
IPT_autoplay_set_DAAD6 = 0;
}
else
{
IPT_autoplay_set_DAAD6 = 1;
Set_Cookie("IPT_autoplay_2618", 1, IPT_cookie_expire_date_DAAD6, "", "", 0);
}
}
else if (IPT_autoplay_DAAD6 == 1)
{
IPT_autoplay_set_DAAD6 = 1;
}
else
{
IPT_autoplay_set_DAAD6 = 0;
}
if (IPT_autoplay_set_DAAD6 == 1 && (!IPT_isPlaying_DAAD6 || IPT_isPlaying_DAAD6 == 0 || IPT_isPlaying_DAAD6 == '' || IPT_isPlaying_DAAD6 == 'null'))
{
Set_Cookie("IPT_playing", "ipt_DAAD6", "", "", "", 0);
}
else
{
IPT_autoplay_set_DAAD6 = 0;
}
addCloseEvent(IPT_unsetPlaying_DAAD6);
addCloseEvent(IPT_SaveData_DAAD6);
if(IE)
{
document.write('');
document.write('Sub ipt_DAAD6_FSCommand(ByVal command, ByVal args)');
document.write('call ipt_DAAD6_DoFSCommand(command, args)');
document.write('end sub');
document.write('');
}
document.write('');