/****************\
 * DropDownNavi *
\*'**************/
function showItem(element){
	element.className += "hover";
}
function hideItem(element){
	element.className = element.className = "";
}

/****************\
* Formularfelder leeren *
\*'**************/
function clearValue(feld) {

	document.forms['searchform'].elements[feld].value = "";
	return true;
}


/****************\
* Kompetenz-Center *
\*'**************/
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->

<!--

function clearDefault(el) {

  if (el.defaultValue==el.value) el.value = ""

}


//-->


<!--

function gotoUrlIE(url)
{
	IE = (document.all) ? 1 : 0
    if (IE) {
        gotoUrl(url);
    }
}


activateMenu = function(nav)
{
	if (document.getElementById(nav))
	{
	   /* currentStyle restricts the Javascript to IE only */
		if (document.all && document.getElementById(nav).currentStyle)
		{
	        var navroot = document.getElementById(nav);

	        /* Get all the list items within the menu */
	        var lis=navroot.getElementsByTagName("LI");
	        for (i=0; i<lis.length; i++)
	        {
	           /* If the LI has another menu level */
	            if(lis[i].lastChild.tagName=="UL")
	            {
	                /* assign the function to the LI */
	             	lis[i].onmouseover=function()
	             	{
	                   /* display the inner menu */
	                   this.lastChild.style.display="block";
	                }
	                lis[i].onmouseout=function()
	                {
	                   this.lastChild.style.display="none";
	                }
	            }
	        }
	    }
	}
}

window.onload = function() {
	
	if (document.getElementById("pda-brand"))
	{
	dynamicSelect("pda-brand", "pda-type");
	activateMenu('qf');
	}
	else
		activateMenu('qf');
}

//AYA 03.01.2007: Kompetenz-Center


function dynamicSelect(id1, id2) {
	// Feature test to see if there is enough W3C DOM support
	if (document.getElementById && document.getElementsByTagName) {
		// Obtain references to both select boxes
		var sel1 = document.getElementById(id1);
		var sel2 = document.getElementById(id2);
		// Clone the dynamic select box
		var clone = sel2.cloneNode(true);
		// Obtain references to all cloned options 
		var clonedOptions = clone.getElementsByTagName("option");
		// Onload init: call a generic function to display the related options in the dynamic select box
		refreshDynamicSelectOptions(sel1, sel2, clonedOptions);
		// Onchange of the main select box: call a generic function to display the related options in the dynamic select box
		sel1.onchange = function() {
			refreshDynamicSelectOptions(sel1, sel2, clonedOptions);
		};
	}
}
function refreshDynamicSelectOptions(sel1, sel2, clonedOptions) {
	// Delete all options of the dynamic select box
	while (sel2.options.length) {
		sel2.remove(0);
	}
	// Create regular expression objects for "select" and the value of the selected option of the main select box as class names
	var pattern1 = /( |^)(select)( |$)/;
	var pattern2 = new RegExp("( |^)(" + sel1.options[sel1.selectedIndex].value + ")( |$)");
	// Iterate through all cloned options
	for (var i = 0; i < clonedOptions.length; i++) {
		// If the classname of a cloned option either equals "select" or equals the value of the selected option of the main select box
		if (clonedOptions[i].className.match(pattern1) || clonedOptions[i].className.match(pattern2)) {
			// Clone the option from the hidden option pool and append it to the dynamic select box
			sel2.appendChild(clonedOptions[i].cloneNode(true));
		}
		
	}
}
function go(){
	
	var element = document.getElementById('pda-type');
	var formName = element.form.name;
	
		var elemName = element.getAttribute('name');
		
		var elemOpt = element.selectedIndex;
		var elemValue = document.forms[formName].elements[elemName].options[elemOpt].value;
		var nothing  = self.location.href;
	//location.href=elemValue; 
	if (document.forms[formName].elements[elemName].options[elemOpt].value != "select") {

	//nur schicken, wenn zweiter Step auch ausgefüllt	
	document.kompetenz.method = "post";
	document.kompetenz.action = elemValue;
	document.kompetenz.submit();	
	
	return true;
		}
		 else {
		 	
	return false;
		
		}
	
}


function check_sec_level(){
	var element = document.getElementById('pda-type');
var formName = element.form.name;
var elemName = element.getAttribute('name');
		
	var elemOpt = element.selectedIndex;
	var elemValue = document.forms[formName].elements[elemName].options[elemOpt].value;
	
	if (document.forms[formName].elements[elemName].options[elemOpt].value == "select") {
		document.getElementById('kompetenz-label').style.color = '#ff0000';
	}
}
// Ende :Kompetenz-Center