// JavaScript Document
var lastSSSID=0;
var selectedPayType=0;
var lastFocusedId = '';
// Web20 Template Fonksiyonları
var totalTopMenuItems = 0;
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 getHash(clientId , oid , amount , okUrl , failUrl ,islemtipi, taksit  ,rnd , storekey) {
	var hash='';
	var pars = 'act=getHash&clientId='+clientId+'&oid='+oid+'&amount='+amount+'&okUrl='+okUrl+'&failUrl='+failUrl+'&islemtipi='+islemtipi+'&taksit='+taksit+'&rnd='+rnd+'&storekey='+storekey;
	new Ajax.Request('include/ajaxLib.php', { method:'get',parameters: pars,   onSuccess:function(transport){  document.getElementById('hash').value = transport.responseText; }   });
return hash;
}
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';
		document.getElementById('Web20VitrinContent').innerHTML = document.getElementById('wtbody_'+id).innerHTML;
}

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) },10000);
	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);
	}
}

