// mouseover topnavigation
var act = 1;
function over01(x){
	if(document.all) x.style.cursor = "hand";
	else x.style.cursor = "pointer";

	if(x.className=="high"){
		act = 0;
		return;
	}
	else{
		act = 1;
	}
	if(!x.childNodes) return;

	if(x.childNodes[0].innerHTML) x.innerHTML=x.childNodes[0].innerHTML;

	x.style.backgroundPosition = "0px -34px";
	x.style.color="#ffffff";
}

function out01(x){
	if(act==0) return;
	x.style.backgroundPosition = "0px 0px";
	x.style.color="#ffffff";
}



// mouseover leftnavigation
function over02(x){
	if(document.all) x.style.cursor = "hand";
	else x.style.cursor = "pointer";


	if(!x.style) return;
	oldcolor = x.style.backgroundColor;
	x.style.backgroundColor="#FCD116";
}

function out02(x){
	if(!x.style) return;
	x.style.backgroundColor=oldcolor;
}

//topnavigation & leftnavigation
function linkme(x){
if(x) document.location.href = x;
else document.location.href = "#";
}


//sitemap
function openSitemap(url) {
	satellit =window.open(url,"SiteMap","location=yes,menubar=yes,resizable=yes,scrollbars=yes,status=yes,toolbar=yes");
	satellit.window.focus();
}
//kontakt
if(document.layers){
height00 = 730;
}
else{
height00 = 700;
}
function openKontakt(url) {
	satellit =eval('window.open(url,"Form","location=no,menubar=no,resizable=yes,scrollbars=no,status=no,toolbar=no,width=661,height='+height00+'")');
	satellit.window.focus();
}
function openProduktKontakt(url) {
	satellit =eval('window.open(url,"ProduktForm","location=no,menubar=no,resizable=yes,scrollbars=no,status=no,toolbar=no,width=661,height='+height00+'")');
	satellit.window.focus();
}
//Gebrauchtwagen-Anfrage-Formular
function openCHFormular(url) {
	satellit =eval('window.open(url,"Form","location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,width=700,height='+height00+'")');
	satellit.window.focus();
}
//hotbutton
if(document.layers){
height01 = 680;
}
else{
height01 = 650;
}
function openHotbutton(url) {
	satellit =eval('window.open(url,"Form","location=no,menubar=no,resizable=yes,scrollbars=no,status=no,toolbar=no,width=661,height='+height01+'")');
	satellit.window.focus();
}
//zoom
function zoom(img,w,h)
{
	if (!w)
		w = 700;
	if (!h)
		h = 500;

	var features = "location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,width=" + w + ",height=" + h;
	satellit = window.open(img, "Form", features);
	satellit.window.focus();

}

//printview
function openPrint(url) {
	satellit =eval('window.open(url,"Printwindow","location=no,menubar=yes,resizable=yes,scrollbars=yes,status=no,toolbar=yes,width=661,height=600")');
	satellit.window.focus();
}

//language selector
function portme(){
var x = document.man_portals.portals.options;
	if (x[x.selectedIndex].value != '') {
		document.location.href=x[x.selectedIndex].value;
		x.selectedIndex = 0;
	}
}

//remove label text in input fields
function clearInitValue(el, initString)
{
	// clear text input value when input field is gaining focus for the first time
	if (el && initString && el.value == initString)
		el.value = "";
}

/*neue Funktionen Produkt Relaunch*/

//Tabelle chassis einblenden
function chassis(){
	document.getElementById("chassis").style.visibility = "visible";
	document.getElementById("sattel").style.visibility = "hidden";
	document.getElementById("sattel_tab").className = "prodtable_remote_inactive_l";
	document.getElementById("chassis_tab").className = "prodtable_remote_active";
}

//Tabelle sattel einblenden
function sattel(){
	document.getElementById("chassis").style.visibility = "hidden";
	document.getElementById("sattel").style.visibility = "visible";
	document.getElementById("sattel_tab").className = "prodtable_remote_active";
	document.getElementById("chassis_tab").className = "prodtable_remote_inactive_r";
}

//Radformel Grafik auf mouseover einblenden
function radformel(url, formel){
	document.getElementById("radformel").innerHTML = '<div class="radformel_head"><strong>'+formel+'</strong></div><div class="radformel_img"><img src="'+url+'" alt="" border="0" /></div>';
}

//Radformel Grafik auf mouseout ausblenden
function radformelHelp(txt,touch,show,klick,pick ){
	var img_radformel_help = /*VIPURL*/ "/mn-prod/man2/global/datapool/images/radformel_help.jpg";
	var radformelHTML = '<div class="radformel_titel"><strong>'+txt+'</strong></div><div><img src="' + img_radformel_help + '" alt="" width="223" height="84" border="0" /></div><div class="radformel_txt"><table border="0" cellpadding="0" cellspacing="0"><tr><td class="radformel_legende_r"><strong>'+touch+'</strong></td><td class="radformel_legende">'+show+'</td></tr><tr><td class="radformel_legende_r"><strong>'+klick+'</strong></td><td class="radformel_legende">'+pick+'</td></tr></table></div>';
	document.getElementById("radformel").innerHTML = radformelHTML;
}


//Achsenlegende ausklappen
function mehr_2(legend2) {
	var img_minus = /*VIPURL*/ "/mn-prod/man2/global/datapool/images/minus.gif";
	document.getElementById("box_2").style.overflow="visible";
	document.getElementById("box_2").style.height="100%";
	document.getElementById("switch_small").innerHTML="<a href=\"javascript:weniger_2('"+legend2+"')\"><img src="+ img_minus +" alt=\"\" width=\"12\" height=\"12\" border=\"0\"></a>&nbsp;&nbsp;<a href=\"javascript:weniger_2('"+legend2+"')\">"+legend2+"</a>";
}

//Achsenlegende einklappen
function weniger_2(legend2) {
	var img_plus = /*VIPURL*/ "/mn-prod/man2/global/datapool/images/plus.gif";
	document.getElementById("box_2").style.overflow="hidden";
	document.getElementById("box_2").style.height="34px";
	document.getElementById("switch_small").innerHTML="<a href=\"javascript:mehr_2('"+legend2+"')\"><img src="+ img_plus +" alt=\"\" width=\"12\" height=\"12\" border=\"0\"></a>&nbsp;&nbsp;<a href=\"javascript:mehr_2('"+legend2+"')\">"+legend2+"</a>";
}

//Player einblenden
function showPlayer(){
	if (document.getElementById("popupfeld").className=="zu") {
		document.getElementById("popupfeld").style.visibility = "visible";
	}
	else {
		document.getElementById("popupfeld").style.visibility = "visible";
		player_iframe.preload();
	}

}
