function initRotator()
{	
	var currentID = 0;
	
	if ($('rotator1')) {
		setTimeout("Rotate("+currentID+")",timeout);
	}
		
}

function Rotate(currentID) {
	
	var el = $('rotator1');
		
	el.fade(0);		
	
	currentID++;
	
	if (currentID >= arrImages.length) {
		currentID = 0;
	}
	
	setTimeout("fadeIn("+currentID+")",500);
	setTimeout("Rotate("+currentID+")",timeout);	
}

function fadeIn(currentID) {	
	
	var rotator = document.getElementById('rotator1');
	
	
	if (document.getElementById('rotatorLink')) {
		var rotatorLink = document.getElementById('rotatorLink');
		if (arrLinks[currentID] == "http:// ") {
			rotatorLink.removeAttribute("href");
		}
		else {
			rotatorLink.href = arrLinks[currentID];	
		}
		
		if (arrTargets[currentID] == "2") {
			rotatorLink.target = "_blank";
		}
		else {
			rotatorLink.target = "_self";
		}
		
		
		
	}
	
	rotator.src = arrImages[currentID].replace(/&amp;/g, "&");		
	rotator.alt = arrTitels[currentID];		
	
	var el = $('rotator1');
		
	el.fade(1);		
}


									 