
// preloading shizzle

var radio_on=new Image(); radio_on.src="/images/radio_1.png";
var radio_off=new Image(); radio_off.src="/images/radio_0.png";

var bradio_on=new Image(); bradio_on.src="/images/bradio1.png";
var bradio_off=new Image(); bradio_off.src="/images/bradio0.png";

var wahl_off=new Image(); wahl_off.src="/images/lightbox_waehlen_off.png";
var wahl_on=new Image(); wahl_on.src="/images/lightbox_waehlen.png";

var check_on=new Image(); check_on.src="/images/check1.png";
var check_off=new Image(); check_off.src="/images/check0.png";




function gehoert(which)
{

	if(which =="Vertriebspartner")
	{
	document.getElementById("gehoertvonyato_txt1").style.display="block";
	document.getElementById("gehoertvonyato_txt2").style.display="none";
	document.getElementById("gehoertvonyato_txt3").style.display="none";
	}
	if(which =="Profi-Seller")
	{
	document.getElementById("gehoertvonyato_txt2").style.display="block";
	document.getElementById("gehoertvonyato_txt3").style.display="none";
	document.getElementById("gehoertvonyato_txt1").style.display="none";
	}
	if(which=="Yato-Kunde")
	{
	document.getElementById("gehoertvonyato_txt3").style.display="block";
	document.getElementById("gehoertvonyato_txt2").style.display="none";
	document.getElementById("gehoertvonyato_txt1").style.display="none";
	}
	

}


function zahlungswitch()
{
	if(document.getElementById("zahlung_bradio").value=="0")
	{
		document.getElementById("zahlung0").style.display="block";
		document.getElementById("zahlung1").style.display="none";
	}
	else
	{
		document.getElementById("zahlung0").style.display="none";
		document.getElementById("zahlung1").style.display="block";
	}
}



function lieferswitch()
{
	if(document.getElementById("lieferdiffers").value=="0")
	{
	document.getElementById("lieferdiv").style.display="none";
	}
	else
	document.getElementById("lieferdiv").style.display="block";
}


function kontoswitch()
{
	if(document.getElementById("kontodiffers").value=="0")
	{
		document.getElementById("kontodiv").style.display="none";
		document.getElementById("kontotemp1").style.display="block";
		document.getElementById("kontotemp2").style.display="block";
	}
	else
	{
		document.getElementById("kontodiv").style.display="block";
		document.getElementById("kontotemp1").style.display="none";
		document.getElementById("kontotemp2").style.display="none";
	}
}



function cbSwitch(which)
{

	if(document.getElementById(which).value=="0")
	{
		document.getElementById(which).value="1";
		
	}
	else
	{
		
		document.getElementById(which).value="0";
	}

	
	
	
	if(document.getElementById(which).value==0)
		document.getElementById("cb_"+which).src=check_off.src;
	else
		document.getElementById("cb_"+which).src=check_on.src;
	
}


///

function radioSwitch(which,num)
{

	if(document.getElementById(which).value!=num)
	{
		document.getElementById(which).value=num

		document.getElementById(which+""+num).src=bradio_on.src;//"/images/bradio1.png";

		
		if(num==0)document.getElementById(which+"1").src=bradio_off.src;//"/images/bradio0.png";
		else document.getElementById(which+"0").src=bradio_off.src;//"/images/bradio0.png";
	
	}	
	
}

  
function radioSwitchRed(which,num)
{
	if(document.getElementById(which).value!=num)
	{
		document.getElementById(which).value=num
		document.getElementById(which+""+num).src=radio_on.src;//"/images/radio_1.png";
	
		if(num==0)document.getElementById(which+"1").src=radio_off.src;//"/images/radio_0.png";
		else document.getElementById(which+"0").src=radio_off.src;//"/images/radio_0.png";
	}	
}

function radioTripleSwitch(which,num)
{

	if(num==0)
	{
	
		document.getElementById(which+""+num).src=bradio_on.src;//"/images/bradio1.png";
		
		document.getElementById(which+"1").src=bradio_off.src;//"/images/bradio0.png";

		document.getElementById(which+"2").src=bradio_off.src;//"/images/bradio0.png";
	}
	if(num==1)
	{
		document.getElementById(which+""+num).src=bradio_on.src;//"/images/bradio1.png";
		
		document.getElementById(which+"0").src=bradio_off.src;//"/images/bradio0.png";
		
		document.getElementById(which+"2").src=bradio_off.src;//"/images/bradio0.png";
	}
	if(num==2)
	{
	
		document.getElementById(which+""+num).src=bradio_on.src;//"/images/bradio1.png";
		
		document.getElementById(which+"0").src=bradio_off.src;//"/images/bradio0.png";
		
		document.getElementById(which+"1").src=bradio_off.src;//"/images/bradio0.png";
	}

	document.getElementById(which).value=num;
}





// radio buttons for hardware...




function checkradio(which)
{
if(document.getElementById("wahlOK").value==which)return true;
return false;
}

function changeRadiohw(which)
{
	

	if(which=="radio3" || which=="radio4")
	{
		disableRadio("radio1");
		disableRadio("radio2");

		document.getElementById("wahl1").src=wahl_off.src;//"/images/lightbox_waehlen_off.png?rndjs="+Math.floor(Math.random()*10000)+".png";
		document.getElementById("wahl2").src=wahl_on.src;//"/images/lightbox_waehlen.png?rndjs="+Math.floor(Math.random()*10000)+".png";
		document.getElementById("wahlOK").value="plus";
	}

	if(which=="radio1" || which=="radio2")
	{
		disableRadio("radio3");
		disableRadio("radio4");
		document.getElementById("wahl1").src=wahl_on.src;//"/images/lightbox_waehlen.png?rndjs="+Math.floor(Math.random()*10000)+".png";
		document.getElementById("wahl2").src=wahl_off.src;//"/images/lightbox_waehlen_off.png?rndjs="+Math.floor(Math.random()*10000)+".png";
		document.getElementById("wahlOK").value="basic";
	}


	if(document.getElementById(which+"_value").value==0)
	{
		document.getElementById(which).src=radio_on.src;//"/images/radio_1.png?rndjs="+Math.floor(Math.random()*10000)+".png";
		document.getElementById(which+"_value").value=1;
		
		if(which=="radio1")disableRadio("radio2");
		if(which=="radio2")disableRadio("radio1");
		
		if(which=="radio3")disableRadio("radio4");
		if(which=="radio4")disableRadio("radio3");
		
	}
 
}
 
function disableRadio(which)
{
	document.getElementById(which).src=radio_off.src;//"/images/radio_0.png?rndjs="+Math.floor(Math.random()*10000)+".png";
	document.getElementById(which+"_value").value=0;
}
 




