/* MouseOver/MouseOut für Liste der Fahrzeugarten im Header */
function mouseOver(id, bildname){
	document.getElementById(id).src = '/system/images/header_navigation_top/navi_fzg_arten/'+bildname+'_mo.gif';
}

function mouseOut(id, bildname){
	document.getElementById(id).src = '/system/images/header_navigation_top/navi_fzg_arten/'+bildname+'.gif';
}

/* MouseOver/MouseOut für Subnavigation "Neu auf Lager" */
function showHideSubNav(id){
	if(document.getElementById(id).style.display == 'none'){
		document.getElementById(id).style.display = '';
		navZustand = "auf";
	}else{
		document.getElementById(id).style.display = 'none';
		navZustand = "zu";
	}
}

/* MouseOver/MouseOut für alle Subnavigationen außer "Neu auf Lager" */
function showSubNav(id){
	document.getElementById('sub'+id).style.display = '';
}

function hideSubNav(id){
	document.getElementById('sub'+id).style.display = 'none';
}

function mouseOverNav(id){
	doc = document.getElementById(id);
	doc_link = document.getElementById(id+'_link');
	
	doc.style.backgroundColor = '#ffffff';
	doc_link.style.color = '#4e4c4c';
}

function mouseOutNav(id){
	doc = document.getElementById(id);
	doc_link = document.getElementById(id+'_link');
	
	doc.style.backgroundColor = '#4e4c4c';
	doc_link.style.color = '#ffffff';
}

function mouseOverNav2(id){
	doc = document.getElementById(id);
	doc_link = document.getElementById(id+'_link');
	
	doc.style.backgroundColor = '#ffffff';
	doc_link.style.color = '#abbbc4';
}

function mouseOutNav2(id){
	doc = document.getElementById(id);
	doc_link = document.getElementById(id+'_link');
	
	doc.style.backgroundColor = '#abbbc4';
	doc_link.style.color = '#ffffff';
}

/* Datenschutz-Checkboxes auf able/disable setzen*/
function ableInfosDatenschutz(formname) {
	doc = document.forms[formname];
	
	doc.i_infos_telefon.disabled = false;
	doc.i_infos_email.disabled = false;
}

function disableInfosDatenschutz(formname) {
	doc = document.forms[formname];
	
	doc.i_infos_telefon.disabled = true;
	doc.i_infos_email.disabled = true;
}

/* Anfahrt */
function showAnfahrt(id){
	arr_standorte = new Array('uebersichtskarte', 'bovenden', 'schopsdorf', 'niederlehme', 'lich');
	
	for(i = 0; i < arr_standorte.length; i++){
		document.getElementById('anfahrt_'+arr_standorte[i]).style.display = 'none';
	}
	
	document.getElementById('anfahrt_'+id).style.display = 'block';
}

function showAnfahrtArt(id, art){
	if(art == '1'){
		art = 'skizze';
	}else if(art == '2'){
		art = 'google';
	}else{
		art = 'map24';
	}
	arr_art = new Array('skizze', 'google', 'map24'); /*, 's_skizze', 's_google', 's_map24', 'n_skizze', 'n_google', 'n_map24', 'l_skizze', 'l_google', 'l_map24'*/
	
	for(i = 0; i < arr_art.length; i++){
		document.getElementById('anfahrt_'+id+'_'+arr_art[i]).style.display = 'none';
	}
	
	document.getElementById('anfahrt_'+id+'_'+art).style.display = 'block';
}

/* Newsletter: Eintragen - Austragen */
function showAustrag(){
	document.getElementById('div_austragen').style.display = '';
	document.getElementById('div_eintragen').style.display = 'none';
}
function showEintrag(){
	document.getElementById('div_eintragen').style.display = '';
	document.getElementById('div_austragen').style.display = 'none';
}

/* Ländervorwahl übernehmen */
function uebernehmeVorwahl(){
	document.getElementById('i_laendervorwahl_input').value = document.getElementById('i_laendervorwahl_select').options[document.getElementById('i_laendervorwahl_select').selectedIndex].value;
	document.getElementById('i_vorwahl_land').value = document.getElementById('i_laendervorwahl_select').options[document.getElementById('i_laendervorwahl_select').selectedIndex].text;
}

/* Lokale Uhrzeit */
function lokaleUhrzeit(){
	zeit = new Date();
	stunde = zeit.getHours();
	stunde = stunde.toString();
	if(stunde.length == 1) stunde = '0'+stunde;
	minute = zeit.getMinutes();
	minute = minute.toString();
	if(minute.length == 1) minute = '0'+minute;
	
	
	if(document.getElementById('lokale_uhrzeit')){
		document.getElementById('lokale_uhrzeit').innerHTML = stunde+':'+minute;
	}
	
	setTimeout("lokaleUhrzeit();", 5000);
}
