<!-- 
var formfeld="";
var maxlang=160;

function zaehle()
{ 
	if (window.document.zeige.Text.value.length>160)	
{
	window.document.zeige.Text.value=formfeld;
	return;
}
else 
	{
formfeld=window.document.zeige.Text.value;
window.document.zeige.anzeigen.value=maxlang-window.document.zeige.Text.value.length;
	}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function orderTotal(oform, prefix)
{
// set references to fields
var qty = oform[prefix + "_qty"];
var stHold = oform[prefix + "_stHold"];
var price = oform[prefix + "_price"];
var stVis = oform[prefix + "_stVis"];

// only bother if the field has contents
if (qty == "")return;

// if the with is not a number (NaN)
// or is zero or less
// everything goes blank
if(isNaN(qty.value) || (qty.value <= 0))
   {
   qty.value = "";
   stHold.value = "";
   }
   
// else the field is a valid number, so calculate the 
// total order cost and put that value in the 
// hidden subtotal field
else
   stHold.value = (Math.round(qty.value * price.value * 100))/100;

// call the routine which checks if the 
// visible subtotal is correct
visTotal(oform, prefix);
}

// checks if the visible subtotal is correct
// ie, if it equals the hidden subtotal field
function visTotal(oform, prefix)
{
var stHold = oform[prefix + "_stHold"];
var stVis = oform[prefix + "_stVis"];

if (stVis.value != stHold.value)
   stVis.value = stHold.value;
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function setBox(nummer,text) {
	var tel = document.getElementById("noTelefon_" + nummer).value;
	if (tel == 'no') {
		if(document.getElementById("CheckBoxGebot_" + nummer).checked && document.getElementById("CheckBoxTelefon_" + nummer).checked)
		{
			alert(text);
			document.getElementById('geboot_' + nummer).disabled = false;
			document.getElementById("CheckBoxTelefon_" + nummer).checked = false;
		} else if(document.getElementById("CheckBoxGebot_" + nummer).checked && !document.getElementById("CheckBoxTelefon_" + nummer).checked) {
			document.getElementById('geboot_' + nummer).disabled = false;
		} else {
			document.getElementById('geboot_' + nummer).disabled = true;
		}
	} else {
		if(document.getElementById("CheckBoxGebot_" + nummer).checked) {
			document.getElementById('geboot_' + nummer).disabled = false;
		}
	}
}
function updateBox(selectorTo, selectorFrom, nummer){
	if (selectorTo=='CheckBoxTelefon_'){
		$('#geboot_'+nummer).attr('disabled','disabled');
		$('#CheckBoxGebot_'+nummer).removeAttr('checked');
		$('#CheckBoxTelefon_'+nummer).attr('checked','checked');
	}else{
		$('#geboot_'+nummer).removeAttr('disabled').select().focus();
		$('#CheckBoxGebot_'+nummer).attr('checked','checked');
		$('#CheckBoxTelefon_'+nummer).removeAttr('checked');
	}
}
var popup_window = null;

function popup(status,url) {
	
var b = "450";                                      // (Fensterbreite z.B. '400')
var h = "450"                                       // (Fensterh�he z.B. '390')

// hier andere Fenstereigenschaften festlegen:
// f�r ja den Wert von Null auf Eins �ndern
var eigenschaften;

eigenschaften= eigenschaften + "menubar=0";     // Men�leiste
eigenschaften= eigenschaften + "toolbar=0";     // Symbolleiste
eigenschaften= eigenschaften + "statusbar=0";   // Statuszeile
eigenschaften= eigenschaften + "scrollbars=1";  // Scrollbars
eigenschaften= eigenschaften + "resizable=0";   // Gr��e ver�nderbar
eigenschaften= eigenschaften + "locationbar=0"; // Adresszeile
eigenschaften= eigenschaften + "directories=0"; // Linkleiste
// ------------Ende �nderungen -----------------------------

// Position berechnen
var ns6 = (!document.all && document.getElementById);
var ie4 = (document.all);
var ns4 = (document.layers);
if(ns6||ns4) {
sbreite = innerWidth;
shoehe = innerHeight;
}
else if(ie4) {
sbreite = document.body.clientWidth;
shoehe = document.body.clientHeight;
}
x = (sbreite-b)/2;
y = (shoehe-h)/2;

// Fenstereigenschaften
//eigenschaften="left="+x+",top="+y+",screenX="+x+",screenY="+y+",width="+b+",height="+h;
//eigenschaften = eigenschaften + "width="+b+",height="+h;
eigenschaften = "scrollbars=1,left="+10+",top="+y+",screenX="+x+",screenY="+y+",width="+b+",height="+h;

if(status != 0) {
if(popup != null) popup.focus(); 
else { 
var popup = open(url, "Ansicht", eigenschaften);
popup_window = popup;
}
} else {
if(popup_window != null) popup_window.close();
}
}

function checkAgb(nummer,text)
{
	
	var gebot = document.getElementById('geboot_' + nummer).value;		
	gebot = parseFloat(gebot) ? parseFloat(gebot) : 0;
		
	if((document.getElementById("CheckBoxGebot_" + nummer).checked || document.getElementById("CheckBoxTelefon_" + nummer).checked) && document.getElementById("CheckBoxAgb_" + nummer).checked)
	{
/*
		if (document.getElementById("CheckBoxGebot_" + nummer).checked && gebot == 0) 
		{
			alert("Ungueltiges Gebot");
	 		return false;
		}
				
		return true;
*/
	} else if ((!document.getElementById("CheckBoxGebot_" + nummer).checked && !document.getElementById("CheckBoxTelefon_" + nummer).checked) && document.getElementById("CheckBoxFavorit_" + nummer).checked) {
 		return true;
	} else if (!document.getElementById("CheckBoxGebot_" + nummer).checked && !document.getElementById("CheckBoxTelefon_" + nummer).checked && !document.getElementById("CheckBoxFavorit_" + nummer).checked) {
		//alert('Ungueltiges Gebot');
		return true;
	} else {		
 		alert(text);	
 		return false;
	} 
}

function StreamWindow(theURL, Name, popW, popH, scroll) 
{ 
	var winleft = (screen.width - popW) / 2;
	var winUp 	= (screen.height - popH) / 2;

	winProp = 'width='+popW+',height='+popH+',left='+winleft+',top='+winUp+',scrollbars='+scroll+','
		
//	if (scroll == 'yes')
//	{
//		popW = screen.width;
//		popH = screen.height;
		winProp = 'width='+popW+',height='+popH+',resizable=yes,scrollbars=yes'
//	}
	
	Win = window.open(theURL, Name, winProp)
	if (parseInt(navigator.appVersion) >= 4) { Win.window.focus(); }
}

function setHeightForToSmallTable() {
	var x = document.getElementById('tableToSmall');
	if (!x) {
		return;
	}

	x.height = document.body.clientHeight - 210;
}
//-->

