// JavaScript Document
var topKamp=$("[reklam=1]").length;
function fixIE6Corners() {
	var bName = navigator.appName;
	var bVer = (navigator.appVersion + 0);
	if (bName == "Microsoft Internet Explorer" && bVer.indexOf('MSIE 6.0') > 1) {
		document.getElementById('c2').style.bottom = document.getElementById('c3').style.right = document.getElementById('c4').style.right = document.getElementById('c4').style.bottom = '-1px';
	}
}
function change(id) {
	clearTimeout(timer);
	if (lastSelectedImage) document.getElementById('button'+lastSelectedImage).className = 'buttonKamp';
	document.getElementById('picture').src = web20Images[id].src;
	if (web20ImageLink[id]) {
		document.getElementById('picture').onclick = function() { window.location=web20ImageLink[id]; }
		document.getElementById('picture').style.cursor = 'pointer';
	}
	else {
		document.getElementById('picture').onclick = function() { }
		document.getElementById('picture').style.cursor = 'default';
	}
	
	document.getElementById('button'+id).className = 'buttonKampAktif';
	document.getElementById('infoLine1').innerHTML = web20ImageLine1[id];
	document.getElementById('infoLine2').innerHTML = web20ImageLine2[id];
	document.getElementById('infoLine').style.bottom = document.getElementById('infoMain').style.bottom = '-70px';
	setTimeout(function() { jump(-70) },10);
	var newID = ((id + 1) % 6);
	if (!newID ) newID=1;
	//buton sayısı kontrolü
	if(topKamp<(id+1)) newID=1;
	timer = setTimeout(function() { change(newID) },5000);
	lastSelectedImage = id;
}
function jump(p) {
	if (p < 0) {
		p = p+5;
		if (p>1) p=0;
		document.getElementById('infoLine').style.bottom = document.getElementById('infoMain').style.bottom = p + 'px';
		setTimeout(function() { jump(p) },20);
	}
}
