// JavaScript Document

var sSuchFeldText = 'Suchwort';

function fJsInit()
{
	var o = fJsGetE('sucheSuchtext');
	
	if (o)
	{
		o.value = sSuchFeldText;
	}

	var o = fJsGetE('sucheSuchtext2');

	if (o)
	{
		o.value = sSuchFeldText;
	}
}

function fJsGetE(s)
{
	try
	{
		return document.getElementById(s);
	} 
	catch (e)
	{
		return false;
	}
}

function fJsSuchTextFeldFocus(o)
{
	if (o.value == sSuchFeldText)
	{
		o.value = '';
	}
}

function fJsSuchTextFeldBlur(o)
{
	if (!o.value.length)
	{
		o.value = sSuchFeldText;
	}
}

function fJsSubmitSuchFormular()
{
	var o = fJsGetE('sucheSuchtext');
	
	if (o)
	{
		if (o.value == sSuchFeldText)
		{
			o.value = '';
		}
	}
	
	return true;
}

function fJsSubmitSuchFormular2()
{
	var o = fJsGetE('sucheSuchtext2');

	if (o)
	{
		if (o.value == sSuchFeldText)
		{
			o.value = '';
		}
	}
	
	return true;
}

function formularZuruecksetzen()
{
	if (document.getElementById('volltextsuche'))
	{	
		document.getElementById('volltextsuche').value = 'Volltext';
	}

	if (document.getElementById('Pflanze'))
	{	
		document.getElementById('Pflanze').selectedIndex = 0;
	}
	
	if (document.getElementById('Module'))
	{	
		document.getElementById('Module').selectedIndex = 0;
	}
}

function loescheFeldWert(o, sIstWert)
{
	if (o.value == sIstWert)
	{
		o.value = '';
	}
}

function fuelleFeldWert(o, sStandardWert)
{
	if (!o.value.length)
	{
		o.value = sStandardWert;
	}
}

/*
$("body#information h4").each(
	function(){
		if ( $(this).text() != "" ) {
			$(this).css('border-bottom','2px solid #9F9F9F');
			$(this).css('padding-bottom','5px');
		}
	}
);
*/

