ArkadasimaGonderWidth = 450;
ArkadasimaGonderHeight = 470;

function tempStart()
{
	//slides the element with class "menu_body" when paragraph with class "menu_head" is clicked 
	$('.menu_body a').each(function() { $(this).css('paddingLeft',(($(this).attr('level') * 10) + 20) + 'px'); })
	$('.wtbody').each(function() {
		var i = 0;
		$(this).find('.product').each(function() { i++; if (!(i%4)) $(this).addClass('rightone'); });
	});
	$('.content').each(function() { var i = 0; $(this).find('.product').each(function() { i++; if (!(i%4)) $(this).addClass('rightone'); }); } );
	$('.product:last').addClass('rightone');
	$('#footer li:last').addClass('last');
	$('#detailButtons div:last').css('margin','0');
	if ($('.urunSecimTable tr').length == 0) $('#options').hide();
}

function wtChange(id) {	
	
	for (var i=1;i<=totalTopMenuItems;i++) {
		$('#wtleft_'+i)[0].className = 'wtleft';
		$('#wtcontent_'+i)[0].className = 'wtcontent';
		$('#wtright_'+i)[0].className = 'wtright';
	}
		$('#wtleft_'+id)[0].className = 'wtleftAltif';
		$('#wtcontent_'+id)[0].className = 'wtcontentAktif';
		$('#wtright_'+id)[0].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) },10);
	}
}

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