// JavaScript Document

function toggle (id, link) {
    if (document.getElementById(id).style.display == 'none')
    {
        document.getElementById(id).style.display = "block";
        link.firstChild.nodeValue = "schließen";
    }
    else
    {
        document.getElementById(id).style.display = "none";
        link.firstChild.nodeValue = "mehr";
    }
}

function toggleFaq(id, single, hash) {	
		
	if(single) {
		//show only one Q+A at a time
		toggleAll(false, hash);		
		showHideFaq(id, true, hash);
	}
	else {
		//open as many Q+A as you like		
		if(document.getElementById('irfaq_a_'+id+'_'+hash).style.display == 'none') {
			showHideFaq(id, true, hash);
		}
		else {
			showHideFaq(id, false, hash);
		}			
	}	
}

function showHideFaq(id, status, hash) {
	var faq_id = 'irfaq_a_'+id+'_'+hash; //answer
	var pm_id  = 'irfaq_pm_'+id+'_'+hash; // plus/minus icon
	
	if(status) {
		document.getElementById(faq_id).style.display = 'block';
		document.getElementById(pm_id).src = tx_irfaq_pi1_iconMinus;
	}
	else {
		document.getElementById(faq_id).style.display = 'none';	
		document.getElementById(pm_id).src = tx_irfaq_pi1_iconPlus;
	}
}


function popup(data,width,height) {
    var winwidth = (screen.width - width) / 2;
    var winheight = (screen.height - height) / 2;
    Neufenster2=window.open(data,"Zweitfenster2","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,top="+winheight+",left="+winwidth+",height="+height+",width="+width); 
 		setTimeout('Neufenster2.focus();',250);
}

function chkFormularG() {
  if(document.Formular.Name.value == "") {
    alert("Bitte geben Sie Ihre Firma ein.");
    document.Formular.Name.focus();
    return false;
  }
  if(document.Formular.Strasse.value == "") {
    alert("Bitte geben Sie Ihre Strasse ein.");
    document.Formular.Strasse.focus();
    return false;
  }
  if(document.Formular.PLZ.value == "") {
    alert("Bitte geben Sie Ihre Postleitzahl ein.");
    document.Formular.PLZ.focus();
    return false;
  }
  if(document.Formular.Ort.value == "") {
    alert("Bitte geben Sie Ihren Ort ein.");
    document.Formular.Ort.focus();
    return false;
  }

  if(document.Formular.Mail.value == "") {
    alert("Bitte geben Sie Ihre E-Mail ein.");
    document.Formular.Mail.focus();
    return false;
  }
	if(document.Formular.ds.checked == false) {
	  alert("Datenschutzbestimmungen bitte bestätigen.");
		document.Formular.ds.focus();
		return false;
	}
}

function popup(data,width,height) {
 var winwidth = (screen.width - width) / 2;
 var winheight = (screen.height - height) / 2;
 NW2=window.open(data,"W2","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,top="+winheight+",left="+winwidth+",height="+height+",width="+width); 
 setTimeout('NW2.focus();',250);
}

