

/********************************************* MouseOver-Funktion ************************************************/

function wechsel(quelle,bild) {
   document.images[bild].src=quelle;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



/************************************************** Dia-Show *****************************************************/
function diashow(){
	
	var a = Math.round(5*Math.random());
	dia = "pix/banner/Banner"+a+".jpg";
	window.document.images[1].src=dia;//[a]
	//alert (dia);
	window.setTimeout ('diashow ()' , 6000)
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


/************************************************** Text-Switch Login-Felder *****************************************************/
function focusform()
{ 
  if (document.login.usrname.value == "username")  document.login.usrname.value = ""; 
}

function blurform()
{ 
  if (document.login.usrname.value == "")  document.login.usrname.value = "username"; 
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


/************************************************** Doku in neuem Fenster öffnen *****************************************************/
function openHelp($url)
	{
	help = window.open($url,"Dokumentation", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=420,height=500");
	help.focus();
	return false;
	}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


/************************************************** Layer Bildupload auf- und zuklappen *****************************************************/
function switchlayer(Layer_Name, Layer_Name2, Button_Name, Verst)
	{
	var expz = eval("document.forms.FormName." + Verst);
	expz.value=(expz.value=='1') ? '0' : '1';
	document.getElementById(Layer_Name).style.display=(document.getElementById(Layer_Name).style.display=='none') ? 'block' : 'none';
	document.getElementById(Layer_Name2).style.display=(document.getElementById(Layer_Name2).style.display=='block') ? 'none' : 'block';	
	document.getElementById(Button_Name).alt=(document.getElementById(Button_Name).alt=='Maximieren') ? 'Minimieren' : 'Maximieren';

	if (document.getElementById(Button_Name).alt=="Maximieren") { document.getElementById(Button_Name).src='pix/layout/max.gif'; }
	if (document.getElementById(Button_Name).alt=="Minimieren") { document.getElementById(Button_Name).src='pix/layout/min.gif'; } 
	}
	
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


/************************************************** Zeichencounter für Textfelder *****************************************************/
function counter() 
	{ 
	var wert,max; 
	max = 256; 
	wert = max-document.FormName.keywords.value.length; 
	if (wert < 0)
		{ 
		alert("Es dürfen nicht mehr als " + max + " Zeichen eingegeben werden!"); 
		document.FormName.keywords.value = document.FormName.keywords.value.substring(0,max); 
		wert = max-document.FormName.keywords.value.length; 
		document.FormName.chrcount.value = wert; 
		} 
	else
		{ 
		document.FormName.chrcount.value = max - document.FormName.keywords.value.length; 
		} 
	} 
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function reloadmaxq()
	{
	document.getElementById('maxq').src = 'maxq.php?PHPSESSID=<?=session_id(); ?>&time=' + new Date().getTime();
	}