function imswap(objekt) {
	document.images[objekt].src = 'images/'+objekt+'h.gif';
}
function imswapback(objekt) {
	document.images[objekt].src = 'images/'+objekt+'c.gif';
}

var aktitem;

function aktswitch(id) {
	aktitem = id;
	document.getElementById("hk"+id).style.backgroundColor = '#FF3C00';
	document.getElementById("hk"+id).style.color = '#FFFFFF';
	document.getElementById("hk"+id).style.borderBottomColor = '#F4F5F5';
}

function markhk(id, gesamt){
	alleszu(gesamt);
	aktitem = id;
	document.getElementById("hk"+id).style.backgroundColor = '#FF3C00';
	document.getElementById("hk"+id).style.color = '#FFFFFF';
	if (document.getElementById("sk"+id) != null) {
		document.getElementById("sk"+id).style.display = '';
	}
	document.getElementById("hk"+id).style.borderBottomColor = '#F4F5F5';
}

function swaphkon(id, farbe){
	document.getElementById("hk"+id).style.backgroundColor = farbe;
}
function swaphkoff(id, farbe){
	if (id != aktitem) {
		document.getElementById("hk"+id).style.backgroundColor = farbe;
	}
}

function alleszu(gesamt) {
	var y;
	y = 0;
	while (y < gesamt) {		
		document.getElementById("hk"+y).style.backgroundColor = '#FFD4C7';
		document.getElementById("hk"+y).style.color = '#000000';
		if (document.getElementById("sk"+y) != null) {
			document.getElementById("sk"+y).style.display = 'none';
		}		
		document.getElementById("hk"+y).style.borderBottomColor = '#000000';
		y++;
	}
}

function swapskon(id){
	document.getElementById("ski"+id).style.backgroundColor = '#FF6B3E';
}

function swapskoff(id){		
	document.getElementById("ski"+id).style.backgroundColor = '#FF9B7C';
}


function swapleit(id, farbe){
	document.getElementById("hk"+id).style.backgroundColor = farbe;
}
function swapleitoff(id, farbe){
	document.getElementById("hk"+id).style.backgroundColor = farbe;
}

function preloadImages() {
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
