var msgWindow;
function OpenWindow(file,window,inf) {
	msgWindow=open(file,window,inf);
	if (msgWindow.opener == null) msgWindow.opener = self;
}


function openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}			
function OpenWindowSendTag(theURL,winName,features,tags){
  theURL = theURL + "?modulinfon=" + tags;
  window.open(theURL,winName,features);
}

var Pictures = [
"/art/firstmotion/background_footer.jpg",
"/art/firstmotion/background.gif",
"/art/firstmotion/pfeil.gif"
]
	
function loadpics(){
	var preImages = [];
	for (var i = 0; i < Pictures.length; i++){
		preImages[i] = new Image();
		preImages[i].src = Pictures[i];
	}
}
function clearstatus()
{}

function sendFormDahinGET(wohin,von,bis)
			{	
				var rand = Math.random()*10000000;
				
				if (wohin.indexOf('?')>-1)
				{
					wohin = wohin + "&rand=" + rand;
				}
				else
				{
					wohin = wohin + "?rand=" + rand;
				}
				
				if (document.getElementById('textsuchen'))
				{
					var suchB = document.getElementById('textsuchen').value.toLowerCase();
					//alert(suchB.indexOf('suchen'));
					if ((suchB.indexOf('suchen')>-1) || (suchB.indexOf('search')>-1))
					{
						document.getElementById('textsuchen').value = '';
					}
				}
				document.getElementById('von').value = von;
				document.getElementById('bis').value = bis;
				document.eingabe.action = wohin;
				document.eingabe.submit();
			}	
loadpics();

function sendFormDahin(wohin){
	document.eingabe.action = wohin;
	document.eingabe.submit();
}		
function submitFormular(FieldName,Content)
{
	if (document.getElementById(FieldName).value==Content)
	{
		document.getElementById(FieldName).value = '';
		document.getElementById(FieldName).style.color = '#000000';
	}

	document.eingabe.submit();
}


function AddField(FieldName,Content)
{
	if (document.getElementById(FieldName).value=='')
	{
		document.getElementById(FieldName).value = Content;
		document.getElementById(FieldName).style.color = '#757575';
	}
}			


function removeField(FieldName,Content)
{
	if (document.getElementById(FieldName).value==Content)
	{
		document.getElementById(FieldName).value = '';
		document.getElementById(FieldName).style.color = '#000000';
	}
}
		
function getV()
{}


var ok=0;if ((parseInt(navigator.appVersion) > 3) || ((parseInt(navigator.appVersion) == 3) && (navigator.appName=="Netscape"))){ok=1;}
function change(name, newpic){
	if (ok==1){
		this.document[name].src=newpic;
		return true;
	}
	}
	
	
function checkSearchForm()
{
	
	document.getElementById('search').value = getSearchValue();
	document.sucheoben.submit();
}

function getSearchValue()
{
	var sSearch= document.getElementById('searchdiv').getElementsByTagName('INPUT');
	var alleV = sSearch.length;
	for(var no=0;no<alleV;no++)
	{	
		if (sSearch[no].className !='FormSearch')
		{
			return sSearch[no].value;
		}
	
	}
}	


function checkSearch()
{
	if (document.getElementById('search').value!='')
	{
		document.formSearch.submit();
	}
	else
	{
		document.getElementById('errorSearch').innerHTML = "please enter a search word";
	}

	
}


