// Rotating word Funktion

// set number of id's to loop thru in the functioncall
// set num to id's + 1 to run out of luck and end on the last one
var OnRightNow = 0;
var OnNext = 1;

function verbaldieresis(num) {
//var lineNumber = num;
oldWord = 'bw' + OnRightNow;
nextWord = 'bw' + OnNext;

//document.getElementById(nextWord).style.background = '#f00';
//document.getElementById(oldWord).style.background = '#0f0';

document.getElementById(nextWord).style.display = 'inline';
document.getElementById(oldWord).style.display = 'none';

OnRightNow++;
OnNext++;


// loop to beginning, or comment to run out
if (OnRightNow == num) OnRightNow = 0; 
if (OnNext == num) OnNext = 0; 

// set loop time in Milliseconds
setTimeout("verbaldieresis("+num+")", 150);

}



//rotate thru a number of work images
// pass thru number of images
// bugger, only works for single figures


function nextImage(noOfImages) {

//init current image to 1 if new here (it will never be 0)

currentImagePath = document.getElementById('bigImage').src;

//alert(currentImagePath);

currentImageNo = currentImagePath.charAt(currentImagePath.length - 5);

//alert(theNumberWeWant);

if (currentImageNo >= noOfImages) { nextimage = 1; }
else { nextimage = parseFloat(currentImageNo) + 1; }

//alert(nextimage);

nextImagePath = currentImagePath.replace(currentImageNo,nextimage);
//alert(nextImagePath);

document.getElementById('bigImage').setAttribute('src',nextImagePath)
}

function prevImage(noOfImages) {


currentImagePath = document.getElementById('bigImage').src;
currentImageNo = currentImagePath.charAt(currentImagePath.length - 5);
if (currentImageNo <= 1) { nextimage = noOfImages; }
else { nextimage = parseFloat(currentImageNo) - 1; }
nextImagePath = currentImagePath.replace(currentImageNo,nextimage);
document.getElementById('bigImage').setAttribute('src',nextImagePath)
}


function scaleText(thingId) {

word = document.getElementById(thingId);
word.style.display = 'block';
//alert(word.style.fontSize);
}