	/******************************************************************************************************************
	*
	*		JavaScript
	*
	*		Modulname		:	js.js
	*
	*		Copyright		:	@.exe multimedia
	*		Ersteller		:	Patrice Huber
	*		Erstellt		:	28.02.2008
	*
	*		Editor			:	-
	*		Editiert		:	-
	*
	*		Beschreibung	:	JavaScript - Funktionen
	*
	********************************************************************************************************************/
 
 	/*******************************************************************************************************************/
	// Der Wert des übergebenen Objektes TF wird gelöscht
	function leer( TF, Text )
	{
		if( TF.value == Text )
		{
			TF.value = "";
		}
	}
	/*******************************************************************************************************************/

	/*******************************************************************************************************************/
	// Der Wert des übergebenen Objektes TF wird durch den übergebenen String Text ersetzt
	function voll( TF, Text )
	{
		if( TF.value == "" )
		{
			TF.value = Text;
		}
	}
	/*******************************************************************************************************************/

	/*******************************************************************************************************************/
	// Prüft, ob das übergebene Element sichtbar bzw. unsichtbar ist und ändert entsprechend den Status
	function displayElement( TagName1, TagName2 )
	{
		Tag1 = document.getElementById( TagName1 )
		Tag2 = document.getElementById( TagName2 )

		if( Tag1.style.display == 'block' )
		{
			Tag1.style.display = 'none';
			Tag2.style.borderBottom = '1px solid #C4CBDE';
		}
		else
		{
			Tag1.style.display = 'block';
			Tag2.style.borderBottom = '1px solid #FFFFFF';
		}
	}
	/*******************************************************************************************************************/

	/*******************************************************************************************************************/
	// Macht das angegebene Tag sichtbar und ändern die Breit und Hoehe. Ausgabe zentriert am bildschirm
	function ZoomPic(TagId,Breite,Hoehe)
	{
		for(i=0;i<(AnzGesBild+3);i++)
		{
			if( div = document.getElementById('bild'+i) )
			{
				if( div.id != TagId )
				{
//					div.style.visibility = "hidden";
					div.style.display	=	"none";
				}
			}
		}

		div	=	document.getElementById(TagId);
/*		div.style.visibility = "visible";*/
		div.style.display	=	"block";
		//div.style.height	=	Hoehe + "px";
		//div.style.width	=	Breite + "px";
		var x,y,Y_Distance;

		if (self.innerHeight) // all except Explorer
		{
			x = self.innerWidth;
			y = self.innerHeight;
			Y_Distance = 0;
			NewTop	=	( y + Y_Distance - Hoehe+25 ) / 2;
		}
		else if (document.documentElement && document.documentElement.clientHeight)
			// Explorer 6 Strict Mode
		{
			x = document.documentElement.clientWidth;
			y = document.documentElement.clientHeight;
			Y_Distance = document.documentElement.scrollTop;
			NewTop	=	( y + Y_Distance - Hoehe+25 - 300);
		}
		else if (document.body) // other Explorers
		{
			x = document.body.clientWidth;
			y = document.body.clientHeight;
			Y_Distance = 0;
			NewTop	=	( y + Y_Distance - Hoehe+25 ) / 2;
		}
		NewLeft	=	( 450 - Breite+25 ) / 2;

	  if (window.pageYOffset) {
		NewTop += window.pageYOffset;
	  } else if (document.body && document.body.scrollTop) {
		NewTop += document.body.scrollTop;
	  }

		div.style.left	=	NewLeft + "px";
		div.style.top	=	NewTop + "px";
	}

function CloseZoomPic(TagId)
{
	document.getElementById(TagId).style.visibility = "hidden";
}
function get( ID ) {
	return	document.getElementById( ID );	
}
function checkContaktForm( Meldung ) {
	Required	=	Array( "Firma", "Vorname", "Nachname", "Strasse", "PLZ", "Ort", "Land", "Telefon", "EMail", "Nachricht", "Sicherheitscode" );
	Err			=	false;
	for( i=0; i<Required.length; i++ ) {
		if( Feld = get( Required[ i ] ) ) {
			if( Feld.value == "" ) {
				Feld.style.backgroundColor	=	"#FCC";	
				Err							=	true;
			}
			else {
				Feld.style.backgroundColor	=	"";	
			}
		}
	}
	if( Err ) {
		alert( Meldung );
		return	false;
	}
	return	true;
}