function tempStart() {
	$('#searchKey').autocomplete('include/ajaxLib.php?act=arama',{
			minChars: 2,
			width: 300,
			multiple: false,
			matchContains: true,
			formatItem: formatItem,
			formatResult: formatResult
	});
	$('#web20DepDropDown').toggle(
		function() {$('#'+$(this).attr('openid')).fadeIn('slow');},
		function() {$('#'+$(this).attr('openid')).fadeOut('slow');}
	);
}

$(document).ready(function() {
	//$("#sepetGoster").css({'left':(($('.top').position().left) + $('.top').width() - 400) + 'px','top':$('#imgSepetGoster').height() + 155 + 'px'});
});


function wtChange(id) {		
	for (var i=1;i<=totalTopMenuItems;i++) {
		document.getElementById('wtleft_'+i).className = 'wtleft';
		document.getElementById('wtcontent_'+i).className = 'wtcontent';
		document.getElementById('wtright_'+i).className = 'wtright';
	}
		document.getElementById('wtleft_'+id).className = 'wtleftAltif';
		document.getElementById('wtcontent_'+id).className = 'wtcontentAktif';
		document.getElementById('wtright_'+id).className = 'wtrightAktif';
		$('.wtbody').hide();
		$('#wtbody_'+id).show();
		return false;
}


function change(id) {
	clearTimeout(timer);
	if (lastSelectedImage) document.getElementById('button'+lastSelectedImage).className = 'button';
	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 = 'buttonAktif';
	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;
	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);
	}
}

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';
	}
}
