if (iens6){
document.write('</div></div>')
var crossobj=document.getElementById? document.getElementById("content") : document.all.content
var contentheight=crossobj.offsetHeight
}
else if (ns4){
var crossobj=document.nscontainer.document.nscontent
var contentheight=crossobj.clip.height
}

function movedown(){
yon = "down"
if (window.moveupvar) clearTimeout(moveupvar)
if (iens6&&parseInt(crossobj.style.top)<(contentheight*(-1)+4)){
	//alert(crossobj.style.top+);
	crossobj.style.top=134+"px"
	movecontinue()
	/*clearTimeout(movedownvar)
	yon = "up"
	moveup()
	alert("top")*/
}
else if (iens6&&parseInt(crossobj.style.top)>=(contentheight*(-1)+4)) {
crossobj.style.top=parseInt(crossobj.style.top)-speed+"px"
suan = parseInt(crossobj.style.top)+speed;
movedownvar=setTimeout("movedown()",48)
}
else if (ns4&&crossobj.top>=(contentheight*(-1)+14)) {
crossobj.top-=speed
suan = crossobj.top-speed
movedownvar=setTimeout("movedown()",48)
}

}

function movecontinue() {
if(yon == "up") {
moveup()
} else if(yon == "down") {
movedown()
}

}

function moveup(){
yon = "up";
if (window.movedownvar) clearTimeout(movedownvar)
//alert(crossobj.style.top);
if (iens6&&parseInt(crossobj.style.top)>134){
	
	crossobj.style.top=(contentheight*(-1))+"px"
	movecontinue()
	/*alert(crossobj.offsetHeight)
	clearTimeout(moveupvar)
	yon = "down"
	movedown()*/
}
else if (iens6&&parseInt(crossobj.style.top)<=contentheight+2) {
crossobj.style.top=parseInt(crossobj.style.top)+speed+"px"
suan = parseInt(crossobj.style.top)+speed;
moveupvar=setTimeout("moveup()",48)
}
else if (ns4&&crossobj.top<=0) {
crossobj.top+=speed
suan = crossobj.top+speed
moveupvar=setTimeout("moveup()",48)
}

}

function stopscroll(){
if (window.moveupvar) clearTimeout(moveupvar)
if (window.movedownvar) clearTimeout(movedownvar)

}

function movetop(){
alert("aaa")
stopscroll()
if (iens6)
crossobj.style.top=0+"px"
else if (ns4)
crossobj.top=0
}

function getcontent_height(){
if (iens6) {
contentheight=crossobj.offsetHeight
}
else if (ns4) {
document.nscontainer.document.nscontent.visibility="show"
}
//alert(contentheight);
}

function initscroll() {
//if (document.getElementById('advLayer')) mesajPanosu();
getcontent_height();
movedown();
}

//function mesajPanosu()
//{
//  if (document.getElementById
//      && document.createTextNode
//     )
//  { 
//	document.getElementById("advLayer").style.zIndex = 99;
//	document.getElementById("advLayer").style.left = (screen.width-216)/2;
//	document.getElementById("advLayer").style.top = (screen.height+108)/2;
//  }
//  else {
//    alert('Your browser is old. Get Opera or Firefox!');
//  }
//}

window.onload=initscroll
