function highlight(item)
{
	item.bgColor='#ff0000';
}

function dehighlight(item)
{
	item.bgColor='#F5F5F5';
}

function unselect(box,start,ende)
 {
   for (var i=start; i<=ende; i++) 
   {
     document.fo1.elements[box][i].checked = false;
   }
 }
 
fadeinObjects = new Object();
fadeinTimers = new Object();

function fadein(object, destOp, rate, delta)
{
	if (!document.all) return
	if (object != "[object]")
	{
		setTimeout("fadein("+object+","+destOp+","+rate+","+delta+")",0);
		return;
	}

	clearTimeout(fadeinTimers[object.sourceIndex]);

	diff = destOp-object.filters.alpha.opacity;
	direction = 1;
	if (object.filters.alpha.opacity > destOp) { direction = -1; }
	delta=Math.min(direction*diff,delta);
	object.filters.alpha.opacity+=direction*delta;

	if (object.filters.alpha.opacity != destOp)
	{
		fadeinObjects[object.sourceIndex]=object;
		fadeinTimers[object.sourceIndex]= setTimeout("fadein(fadeinObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
	}
}

function mark(u,r,status)
{
	
	var ind; var ic=0; var msglist = document.fo1.elements['mid']; var rmsglist = document.fo1.elements['rmid'];
	if (u==true) { if (msglist) { ind=msglist.length; if (ic < ind) { while (ic < ind) { if(msglist[ic]!="") msglist[ic].checked=status; else continue; ic++; } } else { msglist.checked=status; }}}
	if (r==true) { ic=0; if (rmsglist) { ind=rmsglist.length; if (ic < ind) { while (ic < ind) { if(rmsglist[ic]!="") rmsglist[ic].checked=status; else continue; ic++; } } else { rmsglist.checked=status; }}}
}

function folderaction(s) { var st = document.fo1.elements['s']; if (st) st.value=s;  }

function bildwechsel()
{
	document.all.fototext.innerHTML = "";
	
	bild = new Image();
	bild.src=document.fo1.file.value;
	
	hoehe=bild.height;
	breite=bild.width;
	
	if ( (hoehe > 120) || (breite > 120))
	{
	  	if (hoehe > breite)
		{
	    	factor=hoehe/120;
	    	new_hoehe=120;
			new_breite=Math.round(breite/factor);
	  	}
		else
		{
			factor=breite/120;
			new_breite=120;
			new_hoehe=Math.round(hoehe/factor);		
	  	}
		
		bild.height=new_hoehe;
		bild.width=new_breite;
		
	 }
	 else
	 {
	  	if (breite == 0) breite=120;
	  	if (hoehe == 0) hoehe=120;
	  	bild.height=hoehe;
		bild.width=breite;
	 }
		
	document.fo1.bild.src=bild.src;
	document.fo1.bild.width=bild.width;
	document.fo1.bild.height=bild.height;
}

function bilderror(file)
{
	var ftext = "<br>Keine Vorschau verfügbar";
	document.all.fototext.innerHTML = ftext;
	
	bild = new Image(); bild.src=file;
	hoehe=bild.height; breite=bild.width;
	
	if ( (hoehe > 120) || (breite > 120))
	{
	  	if (hoehe > breite)
		{
	    	factor=hoehe/120;
	    	new_hoehe=120;
			new_breite=Math.round(breite/factor);
	  	}
		else
		{
			factor=breite/120;
			new_breite=120;
			new_hoehe=Math.round(hoehe/factor);		
	  	}
		
		bild.height=new_hoehe;
		bild.width=new_breite;
		
	 }
	 else
	 {
	  	if (breite == 0) breite=120;
	  	if (hoehe == 0) hoehe=120;
	  	bild.height=hoehe;
		bild.width=breite;
	 }
		
	document.fo1.bild.src=bild.src;
	document.fo1.bild.width=bild.width;
	document.fo1.bild.height=bild.height;
	
}