/**
 * JavaScript für das Kontakt-Formular
 */
function Contact()
{
	/**
	 * Aktualisiert das Formular
	 */
	this.updateForm = function()
	{
		var hints 		= ['faq','faq_fwf_partners','faq_shop','services','tarif','stornierung','lieferung','meinedaten','rufnummermitnahme'];
		var addresses	= ['discotel','presse'];
		var sel_value 	= js.e('subject_select').value.split(':')[1];
		var show_hint	= js.inArray( sel_value, hints );
		var is_address	= js.inArray( sel_value, addresses );
		var value_id	= 'hint_' + sel_value;
		
		// Hinweise durchlaufen und (un)sichtbar machen
		for ( var i = 0; hints[i]; ++i )
		{
			var body_id = 'hint_' + hints[i];
			js.e( body_id ).style.display = (!show_hint || body_id != value_id) ? 'none' : ''; 
		}
		
		// Restliche Formular-Elemente anzeigen
		js.e( 'form_elems' ).style.display 			= (show_hint || !is_address) ? 'none' : '';
		js.e( 'footer_standard' ).style.display 	= is_address ? 'none' : '';
		js.e( 'footer_send' ).style.display 		= !is_address ? 'none' : '';
	}
}

// Instanz erstellen
var contact = new Contact();