Her er deres kode, men jeg orker ikke at gå igennem den for at se hvad der gør hvad.
var DatingForum = 'DatingForum';
var addsrc = '
http://www.im-online.dk/adverticing/datingforum/df_adverticing.gif';var feq = 1 ;
var TimeBeforeShow = 700 ;
var TimeDown = 3000 ;
var add_link_front = '<a href=http://www.datingforum.dk/>'
var add_link_end = '</a>'
function GetCookie(name)
{
var dc = document.cookie,start = dc.indexOf(name+"="),len = start+name.length+1;if (!start&&name!=dc.substring(0,name.length)) return null;if (start==-1)return null;var end=dc.indexOf(";",len);if (end==-1)end=dc.length;return unescape(dc.substring(len,end))
}
function SC(name,value,expires)
{
document.cookie = name+"="+escape(value) + ";expires=" + expires.toGMTString()
}
function DF_Start()
{
var xy = getDim(Adverticing);xy.x++;xy.y++
var kX = xy.x + 318, aY = xy.y - DF_ADD.height, exp=new Date()
onresize = DF_Resize
DF_Clip = DF_ADD.height
var h = '<img src="' + DF_KNAP.src + '" style="position:absolute;cursor:hand;'
h += 'width:' + DF_KNAP.width + 'px;height:' + DF_KNAP.height + 'px;'
h += 'left:' + kX + 'px;top:' + xy.y + 'px" id="DF_A" onclick="DF_Click()">'
h += '' + add_link_front + '<img src="' + DF_ADD.src + '" border=0 style="position:absolute;'
h += 'width:' + DF_ADD.width + 'px;height:' + DF_Clip + 'px;'
h += 'clip:rect(' + DF_Clip + ' auto auto auto);'
h += 'left:' + xy.x + 'px;top:' + aY + 'px" id="DF_B">' + add_link_end +''
document.body.insertAdjacentHTML("beforeEnd",h)
DF_AS = DF_A.style; DF_BS = DF_B.style
// start ny cookie timer
if ( (GetCookie(DatingForum) < feq) || (GetCookie(DatingForum)== null) )
{
setTimeout("if(DF_Dir<0)DF_Click();",TimeBeforeShow)
exp.setDate(exp.getDate()+7)
SC(DatingForum,1,exp)
}
else
{
var addcookie = GetCookie(DatingForum)
var addcookie = parseInt(addcookie,10) +1
exp.setDate(exp.getDate()+10)
SC(DatingForum,addcookie,exp)
}
}
function DF_Click()
{
if (DF_Moving) return;
DF_Dir *= -1
DF_Steps = 0
if (window.DF_Int) clearInterval(DF_Int)
DF_Moving = true
DF_Int = setInterval("DF_Next()",30)
}
function DF_Next()
{
var add = DF_Dir * (++DF_Steps<16 ? 16 : 8)
DF_Clip -= add
DF_BS.clip = 'rect(' + DF_Clip + ' auto auto auto)'
DF_BS.posTop += add
if (DF_Dir<0) DF_Adjust();
if (DF_Clip<=0 || DF_Clip>=DF_ADD.height)
{
clearInterval(DF_Int);
setTimeout("DF_Adjust()",30)
if (DF_Dir>0) setTimeout("DF_Moving = false;DF_Click()",TimeDown); else DF_Moving=false;
}
}
function DF_Adjust()
{
DF_AS.posTop = DF_B.offsetTop + DF_B.offsetHeight
}
function DF_Resize()
{
var xy = getDim(Adverticing);xy.x++;xy.y++
DF_BS.posLeft = xy.x
DF_AS.posLeft = xy.x + 318
}
function getDim(el)
{
var rd = {x:el.offsetLeft,y:el.offsetTop}, tEl=el.offsetParent
while (tEl)
{
rd.x += tEl.offsetLeft
rd.y += tEl.offsetTop
tEl = tEl.offsetParent
}
return rd
}
if (document.all)
{
DF_ADD = new Image; DF_ADD.src = addsrc
DF_KNAP = new Image; DF_KNAP.src = "
http://www.wocs.dk/adverticing/sponsor.gif" DF_Steps = 0
DF_Moving = false
DF_Dir = -1
//onload = DF_Start; preloadimages(); slideit();
}