var lastID = 1;
var firstCall = false;
var setNewTimeOut = false;

function SwapImage(ImageName,ImageFile){
         Image1=new Image(119,39);
         Image1.src = ImageFile;
         document[ImageName].src = Image1.src;
         return true;
}

function anzeigen(id) {
        document.getElementById("untermenue"+id).style.visibility = "visible";
}
function nichtanzeigen (id) {
        document.getElementById("untermenue"+id).style.visibility = "hidden";
}

function underlineMenuePoint(id) {
        if(id != 0) {
        	document.getElementById("picMenuePoint"+id).style.borderBottomWidth = "3px";
        	if (window.opera) {
    			document.body.style.backgroundColor ='#FFFFFF';
    		}
        }
}
function notUnderlineMenuePoint(id) {
        if((lastID != id) && (id != 0)) {
        	document.getElementById("picMenuePoint"+id).style.borderBottomWidth = "0px";
        	if (window.opera) {
            	document.body.style.backgroundColor ='#FFFFFF';
    		}
        }
}
function showMajorPoints(id, calledFromUser) {
    if(!setNewTimeOut) {
    	document.getElementById("majorPoint"+lastID).style.visibility = "hidden";
   		document.getElementById("majorPoint"+id).style.visibility = "visible";
    	var helpID = lastID;
    	lastID = id;
    	notUnderlineMenuePoint(helpID);
    	underlineMenuePoint(lastID);
        setNewTimeOut = false;
    }
    if(calledFromUser == 'true') {
    	setNewTimeOut = true;
    }
    else {
    	setNewTimeOut = false;
    }
}

function majorPointflipper() {
    setTimeout("majorPointflipper()", 9000);
    newID = lastID + 1;
    if(newID > numberOfPoints) {
    	newID = 1;
    }
    if(!firstCall) {
    	firstCall = true;
    	newID = 1;
    }
    showMajorPoints(newID, 'false');
}