/* RotorTool Java Script */

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

var oldid="0";
function btn(id,cl) 
{
	if (id!=oldid)
	{
		document.getElementById(id).className=cl;
	
	if (cl=="btn_click_td")
	{
		if (oldid!="0" && oldid!=null && oldid!="")
			document.getElementById(oldid).className="btn_off_td";
		oldid=id;
	}}
}

function clickbtn(id)
{
	if(oldid!="0" && oldid!=null && oldid!="")
		document.getElementById(oldid).className="btn_off_td";
	if(id!="0" && id!=null && id!="")
		document.getElementById(id).className="btn_click_td";
	oldid=id;
	
}



function offbtn(id1) {
	document.getElementById(id1).className="offbtn_td";	
}

function clkbtn(id1) {
	document.getElementById(id1).className="clkbtn_td";	
}


function chkFormularDE()
{
 if(document.Formular.Werkstueck.value == "")  {
   alert("Bitte Gewicht des Werkstückes eingeben!");
   document.Formular.Werkstueck.focus();
   return false;
  }
 if(document.Formular.n_max.value == "") {
   alert("Bitte maximale Umdrehungsgeschwindigkeit eingeben!");
   document.Formular.n_max.focus();
   return false;
  }
 if(document.Formular.Axialbelastung.value == "") {
   alert("Bitte Axialbelastung eingeben!");
   document.Formular.Axialbelastung.focus();
   return false;
  }
 if(document.Formular.Rundlauf.value == "") {
   alert("Bitte maximale Rundlaufabweichun eingeben!");
   document.Formular.Rundlauf.focus();
   return false;
  }
 if(document.Formular.Aufnahmekonus.value == "") {
   alert("Bitte Aufnahmekonus wählen!");
   document.Formular.Aufnahmekonus.focus();
   return false;
  }

	if(document.Formular.A.value == "") {
   alert("Bitte Abmessung A eingeben!");
   document.Formular.Alter.focus();
   return false;
  }
	if(document.Formular.B.value == "") {
   alert("Bitte Abmessung B eingeben!");
   document.Formular.B.focus();
   return false;
  }
	if(document.Formular.C.value == "") {
   alert("Bitte Abmessung C eingeben!");
   document.Formular.C.focus();
   return false;
  }
	if(document.Formular.D.value == "") {
   alert("Bitte Abmessung D eingeben!");
   document.Formular.D.focus();
   return false;
  }
	if(document.Formular.E.value == "") {
   alert("Bitte Abmessung E eingeben!");
   document.Formular.E.focus();
   return false;
  }
	if(document.Formular.H.value == "") {
   alert("Bitte Abmessung H eingeben!");
   document.Formular.H.focus();
   return false;
  }
	if(document.Formular.P.value == "") {
   alert("Bitte Abmessung P eingeben!");
   document.Formular.P.focus();
   return false;
  }
	if(document.Formular.Alpha.value == "") {
   alert("Bitte Winkel Alpha eingeben!");
   document.Formular.Alpha.focus();
   return false;
  }
	
	if(document.Formular.name.value == "") {
   alert("Bitte vollständigen Namen eingeben!");
   document.Formular.name.focus();
   return false;
  }
	if(document.Formular.email.value == "") {
   alert("Bitte gültige E-mail eingeben!");
   document.Formular.email.focus();
   return false;
  }
	
	if(document.Formular.email.value.indexOf('@') == -1) {
   alert("Keine E-Mail-Adresse!");
   document.Formular.email.focus();
   return false;
  }
}

function chkFormularEN()
{
 if(document.Formular.Werkstueck.value == "")  {
   alert("Please enter the weight of the workpiece!");
   document.Formular.Werkstueck.focus();
   return false;
  }
 if(document.Formular.n_max.value == "") {
   alert("Please enter maximum RPM!");
   document.Formular.n_max.focus();
   return false;
  }
 if(document.Formular.Axialbelastung.value == "") {
   alert("Please enter axial load!");
   document.Formular.Axialbelastung.focus();
   return false;
  }
 if(document.Formular.Rundlauf.value == "") {
   alert("Please enter maximum eccentricity!");
   document.Formular.Rundlauf.focus();
   return false;
  }
 if(document.Formular.Aufnahmekonus.value == "") {
   alert("Please enter Taper!");
   document.Formular.Aufnahmekonus.focus();
   return false;
  }
	if(document.Formular.Line.value == "") {
   alert("Please choose ROTOR Line!");
   document.Formular.Line.focus();
   return false;
  }
	if(document.Formular.A.value == "") {
   alert("Please enter A!");
   document.Formular.Alter.focus();
   return false;
  }
	if(document.Formular.B.value == "") {
   alert("Please enter B!");
   document.Formular.B.focus();
   return false;
  }
	if(document.Formular.C.value == "") {
   alert("Please enter C!");
   document.Formular.C.focus();
   return false;
  }
	if(document.Formular.D.value == "") {
   alert("Please enter D!");
   document.Formular.D.focus();
   return false;
  }
	if(document.Formular.E.value == "") {
   alert("Please enter E!");
   document.Formular.E.focus();
   return false;
  }
	if(document.Formular.H.value == "") {
   alert("Please enter H!");
   document.Formular.H.focus();
   return false;
  }
	if(document.Formular.P.value == "") {
   alert("Please enter P!");
   document.Formular.P.focus();
   return false;
  }
	if(document.Formular.Alpha.value == "") {
   alert("Please type correct angle Alpha!");
   document.Formular.Alpha.focus();
   return false;
  }
	
	if(document.Formular.name.value == "") {
   alert("Please type correct Name!");
   document.Formular.name.focus();
   return false;
  }
	if(document.Formular.email.value == "") {
   alert("No correct E-Mail!");
   document.Formular.email.focus();
   return false;
  }
	
	if(document.Formular.email.value.indexOf('@') == -1) {
   alert("No correct E-Mail!");
   document.Formular.email.focus();
   return false;
  }
}

