if (!document.title) document.title = 'Dobez.com';
function showLoad () {
$('status').style.display = 'none';
$('load').style.display = 'block'; 

}
function showResponse (originalRequest) {
	var newData = originalRequest.responseText;
	$('load').style.display = 'none';
	$('status').style.display = 'block';
	$('status').innerHTML = newData;
}

var browser=navigator.appName + " " + navigator.appVersion;
function ShowHide(id) 
{
	
divs = document.getElementsByTagName('div');
	if (divs[id].style.visibility == 'hidden')
		{
		divs[id].style.visibility = 'visible';
		divs[id].style.display = 'block';
		}
	else
		{
		divs[id].style.visibility = 'hidden';
		divs[id].style.display = 'none';
		}
}



var popunder=new Array()





popunder[0]="kamp_sonuc.htm"





var width = '423';

var height = '427';







var p = 'scrollbars=no,resizable=no,toolbar=no,' +

'menubar=no,status=no,location=no,left=85,top=20,height=' + 

height + ',width=' + width;



var one_time=1







function get_cookie(Name) {

var search = Name + "="

var returnvalue = "";

if (document.cookie.length > 0) {

offset = document.cookie.indexOf(search)

if (offset != -1) {

offset += search.length

end = document.cookie.indexOf(";", offset); 

if (end == -1) 

end = document.cookie.length;

returnvalue=unescape(document.cookie.substring(offset, end))

}

}

return returnvalue;

}

function loadornot(){

if (get_cookie('popunder')==''){

load_pop_power()

document.cookie="popunder=yes"

}

}

function load_pop_power(){

win2=window.open(popunder[Math.floor(Math.random()*(popunder.length))],"bw",p)

win2.focus();

//win2.blur()

//window.focus()

}



function loadMe() {

if (one_time==0)

load_pop_power()

else

loadornot()

}

//onLoad='loadMe();'<-- onLoad="javascript:window.open('popup_index.htm','popupp','scrollbars=0,width=500,height=500')"-->
function lib_bwcheck(){ //Browsercheck (needed)
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.opera5=this.agent.indexOf("Opera 5")>-1
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
	this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6
	this.mac=this.agent.indexOf("Mac")>-1
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
	return this
}
var bw=new lib_bwcheck()

var speed = 30
var loop, timer

function makeObj(obj,nest){
    nest=(!nest) ? "":'document.'+nest+'.'
	this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0;
  	this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0;
	this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight
	this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight
	this.up=goUp;this.down=goDown;
	this.moveIt=moveIt; this.x=0; this.y=0;
    this.obj = obj + "Object"
    eval(this.obj + "=this")
    this.myTag = 1;
    return this
}

var px = bw.ns4||window.opera?"":"px";

function moveIt(x,y){
	this.x = x
	this.y = y
	this.css.left = this.x+px
	this.css.top = this.y+px
}

function goDown(move){
  var xheight2,height;
  xheight2 = this.scrollHeight;
//  alert(xheight2);
  if (this.myTag == 1) xheight = oCont.clipHeight;
  else xheight = oCont2.clipHeight;

// @ers Eger dongu istenmiyorsa bu satirlar comment out edilecek 
	if (this.y==-this.scrollHeight+xheight && this.myTag!=1)  this.moveIt(0,0);
  
	if (this.y>-this.scrollHeight+xheight && move>0){
	  if (myPageScroll) {
	    move = +myPageScroll*0.2
	    if (move < 0.1) {
        move = myPageScroll;
    		loop = false;
	    }
	    myPageScroll = myPageScroll-move;
	  } 
		this.moveIt(0,this.y-move)
//    window.status = 'Move-down: ' + move + '   My Page Scroll: '+ myPageScroll + '   this.y'+this.y;
  	if (loop) setTimeout(this.obj+".down("+move+")",speed)
  	else this.moveIt(0,Math.round(this.y))
	} else if (myPageScroll) 
	  noScroll();
}
function goUp(move){

  var xheight2,height;
  xheight2 = this.scrollHeight;
  if (this.myTag == 1) xheight = oCont.clipHeight;
  else xheight = oCont2.clipHeight;

// @ers Eger dongu istenmiyorsa bu satirlar comment out edilecek 
	if (this.y==0 && this.myTag!=1)  this.moveIt(0,-this.scrollHeight+xheight);

	if (this.y<0){
	  if (myPageScroll) {
	    move = -myPageScroll*0.2
	    if (move > -0.1) {
        move = -myPageScroll;
    		loop = false;
	    }
	    myPageScroll = myPageScroll+move;
	  }
		this.moveIt(0,this.y-move)
//    window.status = 'Move-up: ' + move + '   My Page Scroll: '+ myPageScroll + '   this.y'+this.y;
		if (loop) setTimeout(this.obj+".up("+move+")",speed)
  	else this.moveIt(0,Math.round(this.y))
	} else if (myPageScroll) 
	  noScroll();
}


function scroll(speed){
	if (scrolltextLoaded){
		loop = true;
  	myPageScroll = 0;
		if (speed>0) oScroll.down(speed)
		else oScroll.up(speed)
	}
}

function noScroll(){
//  window.status = 'no scroll called';
	loop = false
	myPageScroll = 0;
	if (timer) clearTimeout(timer)
}
var scrolltextLoaded = false
function scrolltextInit(){
//	alert('x');
	oCont = new makeObj('divScrollTextCont')
	oScroll = new makeObj('divText','divScrollTextCont')
	oScroll.moveIt(0,0)
	oCont.css.visibility = "visible"
	scrolltextLoaded = true
}
function bodyLoad()
{
	if (bw.bw) 
		scrolltextInit();
}
