<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->

/* 
Boxen
 */


/* show cart in checkout */
function show_checkout_cart()
{
   if (document.getElementById)
   {
      document.getElementById("checkout_cart_content").style.display = "block";
	  document.getElementById("checkout_cart_show").style.display = "none";
	  document.getElementById("checkout_cart_hide").style.display = "block";
   }
}

/* versteckt cart in checkout */
function hide_checkout_cart()
{
   if (document.getElementById)
   {
      document.getElementById("checkout_cart_content").style.display = "none";
	  document.getElementById("checkout_cart_show").style.display = "block";
	  document.getElementById("checkout_cart_hide").style.display = "none";
   }
}


// zeigt in my_supplies ne order an
function show_order_info(order_id)
{
   if (document.getElementById)
   {
      div = "order_" + order_id
	  document.getElementById(div).style.display = "block";
   }	
}

// blendet in my_supplies ne order aus
function hide_order_info(order_id)
{
   if (document.getElementById)
   {
      div = "order_" + order_id
	  document.getElementById(div).style.display = "none";
   }	
}

 
// zeigt abweichende lieferadresse an
function show_second_address(value)
{
   if (value == true)
   {
	   document.getElementById("invoice_address").style.display = "none";	 
   }
   else
   {
	   document.getElementById("invoice_address").style.display = "block";	 
   }
}

// generiert neue checkform im kontaktformular
function show_form_checksum()
{
   if (document.getElementById)
   {
      document.getElementById("form_checksum").innerHTML = '<input name="checksum2" type="hidden" id="checksum2" value="2" />';
   }
}


// erzeugt das drop down feld im für den addcart
function create_drop_down(abverkauf, innenlager, minbuy)
{
   var stocklimit = 100;
   
   document.write('<select style="font-size:14px" name="quantity" id="quantity">');
      
   if (parseInt(abverkauf) == 1)
   { 
      stocklimit = parseInt(innenlager); 
   } 
   
   if (parseInt(minbuy) == 1)
   {
	  for (var i = 1; i <= stocklimit; i++)
	  {		   
	     document.write('<option>' + i + '</option>');   		   
	  }
   }
   else
   {
	  // minbuy logik
	  
	  // wenn wir welche an, dann bis minbuy reinmachen
	  if (parseInt(innenlager) > 0 && parseInt(innenlager) <= parseInt(minbuy))
	  {
		 for (var i = 1; i <= parseInt(innenlager); i++)
	     {
	        if (i < minbuy)
			{
			   document.write('<option>' + i + '</option>');   
			}
		 }
	  }	  
	  	  
	  // minbuy schritt für schritt rein
	  for (var i = parseInt(minbuy); i <= stocklimit; i+=parseInt(minbuy))
	  {
	     document.write('<option>' + i + '</option>');   
	  }	  	  	  
   }   
   document.write('</select>');
}

