﻿// JScript-Datei

function setdimension(packetID, Lenght, Width, Height, Weight)
{
    var metrics = document.getElementById(packetID).value;
    var dimension = metrics.split("|");
    
    if (dimension.length == 5)
    {
        document.getElementById(Lenght).value = dimension[1]
        document.getElementById(Width).value = dimension[2]
        document.getElementById(Height).value = dimension[3]
        document.getElementById(Weight).value = dimension[4]
        //alert(dimension[4]);
    }    
}

function dropdownSetNullValue (selBoxId, selectedvalue)
{
    if (selectedvalue == "0| | | |0")  // Auswahl auf freie Eingabe setzen
    {
       document.getElementById(selBoxId).selectedIndex = 0;
    }
}

function GetDetailsContainer(id) {
	return document.getElementById("details" + id.toString());
}   
           
function ShowDetails(id) {

    if (document.getElementById("hiddendetails" + id.toString()).value == 0)
        {
          document.getElementById("hiddendetails" + id.toString()).value = 2;
          Callback1.PerformCallback(id);
        }
	
	if (document.getElementById("hiddendetails" + id.toString()).value == 2)
	    {
          document.getElementById("tr1_details" + id.toString()).style.display = "";
          document.getElementById("tr2_details" + id.toString()).style.display = "";
          document.getElementById("details" + id.toString()).style.display = "block";
          document.getElementById("hiddendetails" + id.toString()).value = 1;
          document.getElementById("imgOpenClose" + id.toString()).src = "../../images/buttons/btn_detail_zu_13x19.gif"
        } 
    else 
        {
          document.getElementById("tr1_details" + id.toString()).style.display = "none";
          document.getElementById("tr2_details" + id.toString()).style.display = "none";
          document.getElementById("details" + id.toString()).style.display = "none";
          document.getElementById("hiddendetails" + id.toString()).value = 2;
          document.getElementById("imgOpenClose" + id.toString()).src = "../../images/buttons/btn_detail_auf_13x19.gif"
        }
        
} 
function showProductLayerDescription(id)
{
    Callback1.PerformCallback(id);
}

function makePriceSelected(priceid)
{
    for (i=1; i<=9; i++)
    {
        if (document.getElementById("price" + i.toString()) != null )
        {
            document.getElementById("price" + i.toString()).style.fontWeight = "normal";
            document.getElementById("price" + i.toString()).style.fontSize = "11px";
        }
    }
    if (document.getElementById("price" + priceid.toString()) != null )
     {
        document.getElementById("price" + priceid.toString()).style.fontWeight = "bold";
        document.getElementById("price" + priceid.toString()).style.fontSize = "12px";
     }
}