<!-- ---------------------------------------------------- -->
<!-- JavaScript                                           -->
<!-- ---------------------------------------------------- -->

// PopUp-Funktion fuer die Video-Vorschau
function VPopUp(VarSizeStr) {
 attrib=VarSizeStr;
 fenster=window.open("http://www.technoload.com/extern/UPL/bitte_warten.php", "VideoPreview", attrib);
 fenster.focus();
 return true;
}

// PopUp-Funktion fuer den Download
function DPopUp() {
 attrib="width=600,height=400,left=200,top=200,resizable=no";
 fenster=window.open("http://www.technoload.com/extern/UPL/bitte_warten.php", "Download", attrib);
 fenster.focus();
 return true;
}

// PopUp-Funktion fuer die Image-Vorschau
function IPopUp(VarSizeStr) {
 attrib=VarSizeStr;
 fenster=window.open("http://www.technoload.com/extern/UPL/bitte_warten.php", "ImagePreview", attrib);
 fenster.focus();
 return true;
}

// Klapp-Funktion fuer den Katalog
function Show_Stuff(id)
// Function that will swap the display/no display for
// all content within span tags
{
    var content = document.getElementById(id);
    var contentOff = document.getElementById(id+"Off")
    var contentOn = document.getElementById(id+"On");
    if (content.style.display == "none")
    {
        content.style.display = "";
        contentOn.style.display = "";
        contentOff.style.display = "none";
    }
    else
    {
        content.style.display = "none";
        contentOn.style.display = "none";
        contentOff.style.display = "";
    }
}

// Simpler Bestaetigungsdialog
function del_question()
{
	//Produkt=VarSizeStr;
	answer = window.confirm("Soll das Produkt entfernt werden?");
	return answer;
}

// Ladefunktion fuer die kaufen.php im iframe mit uebergebener ID
function KaufenLoad(id){
	var iframe = document.getElementByTagName("iframe");
	var address = "http://www.technoload.com/extern/DWL/kaufen.php?authId=71&pId="+id;
	iframe.setAttribute("src",address);
}

// Funktion zum moeglichst Browserunabhaengigen erhalten von Elementen
function getElement(aID){ 
  return (document.all[aID]) || (document.getElementById(aID)); 
}

// Funktion um den onclick-handler nach dem ersten Click zu aendern
function deselect(i){
	i.onclick = select(i);
}

// Funktion zum leichten deselektieren von Optionen
function select(i){
	if (i.selected == true){
		i.selected = false;
	} else {
		i.selected = true;
	}
}
