
function doDetail(aOB){
aSet="none";
aStatus=aOB.value;
if (aStatus=="Detail ein") {aSet="inline";aOB.value="Detail aus";}
if (aStatus=="Detail aus") {aOB.value="Detail ein";}
if (aStatus=="détail") {aSet="inline";aOB.value="sans détail";}
if (aStatus=="sans détail") {aOB.value="détail";}
document.forms(0)._Einsatzgewicht_OPR.style.display=aSet;
//document.forms(0)._Kubik_OPR.style.display=aSet;
document.forms(0)._Betriebsstunden_OPR.style.display=aSet;
document.forms(0)._Baujahr_OPR.style.display=aSet;
document.forms(0)._Handelspreis_OPR.style.display=aSet;
}

function doClear(){
   aOB=document.all.tags("INPUT");
   for(x=0; x < aOB.length; x++){
	if ( aOB[x].type=="text" ) { aOB[x].value=""; }
   }
   aOB=document.all.tags("TEXTAREA");
   for(x=0; x < aOB.length; x++){
	aOB[x].value="";
   }
   document.all.Bezeichnung[0].selected=true;
}


function BildUpload(aOB){
   if (document.forms.length==1){ return true;}
   if (eval("document.forms[1]."+aOB+".value") == '') { return false;}
   return true;
}

function stretch(aOB) {

	if (aOB.width>400) {aOB.width=400;}
}


function konvert(){
aFrm=document.forms[0].name;
a=eval("document."+aFrm+".tags('TEXTAREA')");
for (i=0; i < a.length ;i++) {
	if ( a[i].OMS != "0" ) {
	a[i].OMS="0";
	RefVerz = document.createElement("P");
	RefVerz.style.padding="5";
	RefVerz.style.border="1 outset";
	if (a[i].value=="") { RefVerz.innerHTML="&nbsp;"}
	else { RefVerz.innerHTML=a[i].value; }
	a[i].insertAdjacentElement("afterEnd",RefVerz);
	a[i].style.display="none";
	}
}
aInt=document.getElementById("intText");
if (typeof aInt != undefined) { aInt.style.display="none"; }
window.print();
}


function doReadOnly(){
a=document.all.tags('INPUT');
for (i=0; i < a.length ;i++) {
a[i].readOnly=true;
}
a=document.all.tags('TEXTAREA');
for (i=0; i < a.length ;i++) {
a[i].readOnly=true;
}
a=document.all.tags('SELECT');
for (i=0; i < a.length ;i++) {
a[i].disabled=true;
}
}

function cpAdr(){
Adresse=event.srcElement.alt;
Adresse=Adresse.replace(/, /g,"\r\n");
r=window.clipboardData.setData("Text",Adresse);
alert(Adresse+"\r\n\r\n in die Zwischenablage kopiert");
}
