  var advertiser = 'mobilix_day4';
  var adsrc = 'Web%20Files/images/stor.gif';
  var feq = 1;
  var TimeBeforeShow = 300 ;
  var TimeDown = 3000 ;
  
  function GC(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() + ";path=/;domain=jubiui.dk" }
  
  function BB_Start(){
	  var xy = getDim(KATEGORIER);xy.x++;xy.y++
	  var kX = xy.x + 55, aY = xy.y - BB_ADD.height, exp=new Date()
	  onresize=BB_Resize
	  BB_Clip = BB_ADD.height
	  var h = '<img src="' + BB_KNAP.src + '" style="position:absolute;cursor:hand;'
	  h += 'width:' + BB_KNAP.width + 'px;height:' + BB_KNAP.height + 'px;'
	  h += 'left:' + kX + 'px;top:' + xy.y + 'px" id="BB_A" onclick="BB_Click()">'
	  h += '<img src="' + BB_ADD.src + '" style="position:absolute;'
	  h += 'width:' + BB_ADD.width + 'px;height:' + BB_Clip + 'px;'
	  h += 'clip:rect(' + BB_Clip + ' auto auto auto);'
	  h += 'left:' + xy.x + 'px;top:' + aY + 'px" id="BB_B">'
	  document.body.insertAdjacentHTML("beforeEnd",h)
	  BB_AS = BB_A.style; BB_BS = BB_B.style
		if ( (GC(advertiser) < feq) || (GC(advertiser)== null) ) {
		  setTimeout("if(BB_Dir<0)BB_Click();",TimeBeforeShow)
		  exp.setDate(exp.getDate()+7)
		  SC(advertiser,1,exp)
	  } else {
      var hmm = GC(advertiser)
      var hmm = parseInt(hmm,10) +1
	 	  exp.setDate(exp.getDate()+10)
		  SC(advertiser,hmm,exp)
	  }

	skiftAboutEvent()
} 

function BB_Click(){
	if (BB_Moving) return;
	BB_Dir *= -1
	BB_Steps = 0
	if (window.BB_Int) clearInterval(BB_Int)
	BB_Moving = true
	BB_Int = setInterval("BB_Next()",50)
}

function BB_Next(){
	var add = BB_Dir * (++BB_Steps<16 ? 16 : 8)
	BB_Clip -= add
	BB_BS.clip = 'rect(' + BB_Clip + ' auto auto auto)'
	BB_BS.posTop += add
	if (BB_Dir<0) BB_Adjust();
	if (BB_Clip<=0 || BB_Clip>=BB_ADD.height){
		clearInterval(BB_Int);
		setTimeout("BB_Adjust()",50)
		if (BB_Dir>0) setTimeout("BB_Moving = false;BB_Click()",TimeDown); else BB_Moving=false;
	}
}
function BB_Adjust(){
	BB_AS.posTop = BB_B.offsetTop + BB_B.offsetHeight
}
function BB_Resize(){
	var xy = getDim(KATEGORIER);xy.x++;xy.y++
	BB_BS.posLeft = xy.x
	BB_AS.posLeft = xy.x + 55
}

function getDim(el){
  //if (typeof(el) != 'undefined') {
	  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
	//}
}


function skiftAboutEvent(){
	document.all.item('Peter').innerHTML = '<a href="javascript:void(0);" onmouseover="return overlib(\'Klik her for at se hvem, hvad og hvornår\',CAPTION,\'ABOUT THE SITE\',HEIGHT,10,ABOVE, OFFSETX, 20);" onMouseOut="nd();" onclick="return BB_Click();">About</a>';
}

if (document.all){
	BB_ADD = new Image; BB_ADD.src = adsrc
	BB_KNAP = new Image; BB_KNAP.src = "Web%20Files/images/usynlig.gif"
	BB_Steps = 0
	BB_Moving = false
	BB_Dir = -1
	//onload = BB_Start;

}
  