
init_mousemove();
//---  mouse catch
var xPos="";
var yPos="";

function doLogin1() // verlinkung zu ssl
{
document.loginnow.submit();

}

function doLogin2() // verlinkung zu ssl
{

document.loginnow2.submit();

}

function getButton(Ereignis)
{
if (!Ereignis)
    Ereignis = window.event;
  if (Ereignis.button) { return  Ereignis.button }
  else {return -1;}

}


var docEl = (   typeof document.compatMode != "undefined" && 
                 document.compatMode        != "BackCompat"
                )? "documentElement" : "body";

function init_mousemove() 
{    if(document.layers) document.captureEvents(Event.MOUSEMOVE);
    document.onmousemove =	dpl_mouse_pos;
}

function dpl_mouse_pos(e) 
{   xPos    =  e? e.pageX : window.event.x;
  	yPos    =  e? e.pageY : window.event.y;

	
	if (document.all && !document.captureEvents && docEl) 
	{   xPos    += document[docEl].scrollLeft;
	    yPos    += document[docEl].scrollTop;
	}
    
    if (document.layers) routeEvent(e);
}

//-----  ende mouse catch

   
   
    function hideDisplay()
     {
 
      document.getElementById('sel1').style.height='0px';
      document.getElementById('sel1').style.display='none';
     }   
     
     function showDisplay1(left)
     {
      var shiftl =170;
		document.getElementById('sel1').style.top = (yPos-40)+'px';
		document.getElementById('sel1').style.left =(xPos-shiftl-10)+'px';
      	document.getElementById('sel1').style.height='auto';
      	document.getElementById('sel1').style.display='block';
       	window.focus(); 
     }

function writeMail()
{
	document.write(unescape('%69%6E%66%6F%40%66%61%68%72%68%6F%6C%7A%2E%6E%65%74'));
}


	function checkAGB()
	{
	var fo=document.getElementById('subForm');
	if (fo)
	 {
	
	if (fo.zahlart[1].checked)
	   {
	  if (fo.read.checked && fo.readlasts.checked)
		{
			if (fo.inst.value != '' &&  ! isNaN(fo.blz.value) && fo.blz.value.length == 8 && ! isNaN(fo.knr.value) && fo.knr.value.length > 4)
				{
				result=true;
				fo.weg1.click();
				}
			else
				{
				alert(unescape('Um per Lastschriftverfahren zu bestellen, m%FCssen Sie Ihre Kontodaten angeben. Bitte %FCberpr%FCfen Sie Ihre Eingaben.'));
				}
		}
	  else
		{
		alert(unescape('Um zu bestellen, muss den AGB sowie der Erkl%E4rung zum Lastschriftverfahren zugestimmt werden.'));
	 	
		}
	   }
	else
	   {
	if (fo.read.checked)
		{
		result=true;
		fo.weg1.click();
		}
	  else
		{
		alert('Um zu bestellen, muss den AGB zugestimmt werden.');
	 	
		}
	   }
	 }
	}
	
	function changeLastschrift()
	{
	var fo=document.subForm;

	if (fo)
	 {
	  if (document.subForm.zahlart[1].checked == true)
	   {

		var lastdiv=document.getElementById('lastcheck');
	    	if (lastdiv) 
			{
			lastdiv.style.height='auto';
			lastdiv.style.display='block';
			}
		}
	   else
	    {
	     var lastdiv=document.getElementById('lastcheck');
	    	if (lastdiv) 
			{
	         lastdiv.style.height='0px';
	         lastdiv.style.display='none';
			}
	    }
	 }
	}

function changeShipping(id,id2)
{
	document.getElementById(id).style.display = "inline";
	document.getElementById(id2).style.display = "none";
}


function checkShippingform()
{
	if(document.paypalshipping.vn.value=="")
	{ alert("Bitte geben Sie Ihren Vornamen an");
	document.paypalshipping.vn.focus();
	return false; }

	if(document.paypalshipping.n.value=="")
	{ alert("Bitte geben Sie Ihren Namen an");
	document.paypalshipping.n.focus();
	return false; }

	if(document.paypalshipping.str.value=="")
	{ alert("Bitte geben Sie Ihre Straße und Hausnummer an");
	document.paypalshipping.str.focus();
	return false; }

	if (document.getElementById('plz').value.length < 10)
	{
		alert('Bitte geben Sie Ihre Postleitzahl und den Wohnort richtig an'); 
		document.paypalshipping.plz.focus();
		return false; 

	}

	if(!document.subForm.read.checked)
	{ alert("Bitte stimmen Sie unseren AGB zu!");
	document.subForm.read.focus();
	return false; }


}




