////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//
//                                 R O I
//
//                   - L O G I S T I K - L E X I K O N -
//
//                          (JavaScript-Kiste)
//
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//
// File name: roi.js
//
// requires: 
//
// classes: 
//
// Version: 1.0
//
// Languages: JavaScript
//
// Author: Hardy Krueger, Kernzeit GmbH - hardy@kernzeit.com
//
// Website: www.kernzeit.com
//
// Tested with: nc 4.75, nc 6, ie 5, ie 5.5
//
// History: 26.03.2002, erstellt von Hardy Krueger
//
////////////////////////////////////////////////////////////////////////////////
//
// JavaScript-Funktionen. Beschreibung siehe unten.
//
////////////////////////////////////////////////////////////////////////////////
//
// Copyright: (c) 2002 by kernzeit GmbH, Munich, Germany
//
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////

/**
* checkFrames(boolean main)
*
* Prüft auf Frames und leitet evtl. auf das Frameset weiter.
*
* @param		boolean	main		'main'-Frame
* @return	void
*/
function checkFrames(main)
{
	noFrames = (top.location == location);
	var cURL = unescape(window.location.pathname);
	
	if (noFrames && main)
		location.href = 'http://www.logistik-lexikon.de/?main='+cURL;
	else if (noFrames && !main)
		location.href = 'http://www.logistik-lexikon.de/';
}


/**
* sendSearchForm(boolean isButton)
*
* Formularbearbeitung für die Suche.
*
* @param		boolean	isButton		Formular über Button abgeschickt?
* @return	void
*/
function sendSearchForm(isButton)
{
	if (document.search.input.value.length < 1)
	{
		window.alert('Bitte geben Sie einen Suchbegriff ein!');
		
		if(!isButton)
			return false;
	}
	else
		document.search.submit();
}