

var dreiMonate='1,63'; 
var sechsMontate='2,82'; 
var zwoelfMonate='5,12'; 
var achtzehnMonate='7,63'; 
var vierundzwanzigMonate='10,08'; 
var sechsunddreisigMonate='15,19'; 
var achtundvierzigMonate='20,49'; 

	function limitinput(evt, strList, bAllow)
			{
				var charCode = evt.keyCode;
				if (charCode==0)
				{
					charCode = evt.which;
				}
				var strChar = String.fromCharCode(charCode);
				var controlArray = Array(0, 8, 9, 10, 13, 27);
				var intOut = 0;
				
				if (bAllow==true)
				{
					if (charCode==96 || charCode==97 || charCode==98 || charCode==99 || charCode==100 || charCode==101 || charCode==102 || charCode==103 || charCode==104 || charCode==105 || charCode==8 || charCode==9 || charCode==37 || charCode==39 || charCode==46 || charCode==116 || (strList.indexOf(strChar)!=-1))
					{
						return true;
					}
				else
				{
					return false;
				}
				}
				else
				{
					if (charCode==8 || charCode==9 || charCode==37 || charCode==39 || charCode==46 || charCode==116 || (strList.indexOf(strChar)==-1))
						{
							return true;
						}
				else
				{
					return false;
				}
				}
			}

function rechnen() { 
  if(document.rechner.bestellwert.value < 200) {
    alert('Der Mindestbestellwert muss mindestens 200 Euro sein!'); 
    } 
    else 
    { 
    if(document.rechner.bestellwert.value == '') {
      alert('Sie haben keinen Bestellwert eingegeben');
      } 
      var ergebnis=0; 
      var faktor,bestellwert,monaterate,monate; 
      id=document.rechner.auswahlmonat.selectedIndex; 
      monate=parseInt(document.rechner.auswahlmonat.options[id].text); 
      bestellwert=document.rechner.bestellwert.value; 
      faktor=1+(document.rechner.auswahlmonat.options[id].value/10000); 
      monaterate=parseFloat(parseInt((bestellwert*faktor/monate)*100))/100; 
      document.rechner.gesamtwert.value=monaterate; 
    } 
  } 


function checkMailadress(adress)
{
	if ((adress.match(/^[a-zA-Z0-9_\.-]{2,}@[a-z0-9-]{3,}\.[a-z]{2,4}|museum$/)) && (adress.length > 0))
	{
		return true;
	}
	else
	{
		return false;
	}

}

function WaterMark(text, feld, option)
{
  if (option == 'enter')
  {
    if (feld.value == text)
    {
      feld.value = '';
      feld.className='inputbox';
    }
  }
  
  if (option == 'exit')
  {
    if (feld.value == '')
    {
      feld.value = text;
      feld.className='inputbox_watermark';
    }
  }
}

  function bild_loading(bild)
  {
    if (window.opera) return false;
    try
    {
      document.getElementById(bild + '_loading').style.display = 'block';
      document.getElementById(bild).style.display = 'none';
      
      document.getElementById(bild).onload = function() {
        	  
        document.getElementById(this.id + '_loading').style.display = 'none';
        this.style.display = 'block';
        };
    }
    catch (e)
    {
      document.getElementById(bild).style.display = 'block';
    }
  }
  
      function setMailto(name,domain, style)
      {
				document.write('<a href=\"mailto:' + name + '@' + domain + '\" style="' + style + '">');
				document.write(name + '@' + domain + '<\/a>');
      }
