function deleteconfirm(theForm){
    Check = confirm("!!! Es werden alle zugehörigen Bilder gelöscht!! Wollen Sie wirklich löschen? !!!");
    if(Check == false) {
    return false;
    }
    else{
    return true;
    } 
}

function deleteconfirmArtikel(theForm){
    Check = confirm("!!! Wollen Sie wirklich löschen? !!!");
    if(Check == false) {
    return false;
    }
    else{
    return true;
    } 
}

function checkImageInsert(theForm){
	if (document[theForm].text.value == " "){
		alert("Suchen Sie bitte eine Bild aus !!!");
	    document[theForm].imagePath.focus();
	    return false;
	}  
	return true;
}

function openWindow(theURL,winName,features) { //v2.0
 	window.open(theURL,winName,features);
}

function chkFormular(myForm){
if(document[myForm].name.value == "")    
        {
     alert("Bitte Ihren Namen eingeben!");     
         document[myForm].name.focus();
     return false;    
         }   
else if(document[myForm].email.value == "")    
        {
     alert("Bitte Ihre E-mail-Adresse eingeben!");     
         document[myForm].email.focus();
     return false;    
         }
else if(document[myForm].email.value.indexOf('@') == -1)    
        {
     alert("Eingabefehler, keine E-Mail-Adresse");     
         document[myForm].email.focus();
     return false;    
         }
else if(document[myForm].email.value.indexOf('.') == -1)
       {
           alert("Eingabefehler, keine E-Mail-Adresse");     
           document[myForm].email.focus();
      return false;
           }      
else if(document[myForm].message.value == "")    
        {
     alert("Bitte Ihren Text eingeben!");     
         document[myForm].message.focus();
     return false;    
         }
else
        return true;
		alert("true");  
}

function submitForm(myForm){
		
        bValidForm = chkFormular(myForm);
        if(bValidForm)
        {
                with(document[myForm])
                {
						
                        submit();
                }
        }
}

function chkFormularNewsletter(myForm)  
{
if(document[myForm].checkInformationRight.checked == false)    
        {
     alert("Bitte stimmen Sie zu, dass Sie den Newsletter erhalten möchten!");     
         document[myForm].checkInformationRight.focus();
     return false;    
         } 	
else if(document[myForm].vorname.value == "")    
        {
     alert("Bitte Ihren Vornamen eingeben!");     
         document[myForm].vorname.focus();
     return false;    
         }   
else if(document[myForm].nachname.value == "")    
        {
     alert("Bitte Ihren Nachnamen eingeben!");     
         document[myForm].nachname.focus();
     return false;    
         }
else if(document[myForm].plz.value == "")    
        {
     alert("Bitte Ihre PLZ eingeben!");     
         document[myForm].plz.focus();
     return false;    
         }
else if(document[myForm].email.value == "")    
        {
     alert("Bitte Ihre E-mail-Adresse eingeben!");     
         document[myForm].email.focus();
     return false;    
         }
else if(document[myForm].email.value.indexOf('@') == -1)    
        {
     alert("Eingabefehler, keine E-Mail-Adresse");     
         document[myForm].email.focus();
     return false;    
         }
else if(document[myForm].email.value.indexOf('.') == -1)
       {
           alert("Eingabefehler, keine E-Mail-Adresse");     
           document[myForm].email.focus();
       return false;
           }      
else
        return true;
		alert("true");  
}

function submitFormNewsletter(myForm)
{
		
        bValidForm = chkFormularNewsletter(myForm);
        if(bValidForm)
        {
                with(document[myForm])
                {
						
                        submit();
                }
        }
}

function chkFormularEcard(myForm) {
if(document[myForm].myname.value == "") {
     alert("Bitte Ihren Namen eingeben!");     
     document[myForm].myname.focus();
     return false;    
} else if(document[myForm].recname.value == "") {
     alert("Bitte den Namen des Empfängers eingeben!");     
     document[myForm].recname.focus();
     return false;    
} else if(document[myForm].plz.value == "") {
     alert("Bitte Ihre PLZ eingeben!");     
     document[myForm].plz.focus();
     return false;    
} else if(document[myForm].myemail.value == "") {
     alert("Bitte Ihre E-mail-Adresse eingeben!");     
     document[myForm].myemail.focus();
     return false;    
} else if(document[myForm].myemail.value.indexOf('@') == -1) {
     alert("Eingabefehler, keine E-Mail-Adresse");     
     document[myForm].myemail.focus();
     return false;    
} else if(document[myForm].myemail.value.indexOf('.') == -1) {
      alert("Eingabefehler, keine E-Mail-Adresse");     
      document[myForm].myemail.focus();
      return false;
} else if(document[myForm].recemail.value == "") {
     alert("Bitte Empfänger E-mail-Adresse eingeben!");     
     document[myForm].recemail.focus();
     return false;    
} else if(document[myForm].recemail.value.indexOf('@') == -1) {
     alert("Eingabefehler, keine E-Mail-Adresse");     
     document[myForm].recemail.focus();
     return false;    
} else if(document[myForm].recemail.value.indexOf('.') == -1) {
     alert("Eingabefehler, keine E-Mail-Adresse");     
     document[myForm].recemail.focus();
    return false;
} else if(document[myForm].message.value == "") {
     alert("Bitte Ihren Text eingeben!");     
     document[myForm].message.focus();
     return false;    
} else 
        return true;  
}

function submitFormEcard(myForm) {
        bValidForm = chkFormularEcard(myForm);
        if(bValidForm) {
                with(document[myForm]) {
                        submit();
                }
        }
}

function ImagePreload(){
    document.Vorladen = new Array();
    if(document.images)
    {
        for(var i = 0; i < ImagePreload.arguments.length; i++)
        {
            document.Vorladen[i] = new Image();
            document.Vorladen[i].src = ImagePreload.arguments[i];
        }
    }
}

function reloadPage() {
	window.document.location.href = currentPage;
}

function writeCaption(txt) {
	if (document.getElementById("captionDiv")) {
		document.getElementById("captionDiv").innerHTML = txt;
	}
}

var currentRegion = "";

//______________________________________________________________________
// Images
var aImages = new Array();
function preLoader(imgName, src1, src2) {
	aImages[imgName] = new Array();
	aImages[imgName]["off"] = new Image();
	aImages[imgName]["off"].src = src1;
	aImages[imgName]["on"] = new Image();
	aImages[imgName]["on"].src = src2;
}
preLoader("scroll_up","images/pix/arrow_up.gif","images/pix/arrow_upHi.gif");
preLoader("scroll_down","images/pix/arrow_down.gif","images/pix/arrow_downHi.gif");
preLoader("back","images/pix/arrow_back.gif","images/pix/arrow_backHi.gif");
preLoader("frw","images/pix/arrow_frw.gif","images/pix/arrow_frwHi.gif");

function getImage(imgName, layerID) {
	return (document.all || document.getElementById ? window.document.images[imgName] : layerID ? document.layers[layerID].document.images[imgName] : window.document.images[imgName]);
}
function imgOn(imgName, layerID) {
	getImage(imgName, layerID).src = aImages[imgName]["on"].src;
}
function imgOff(imgName, layerID) {
	getImage(imgName, layerID).src = aImages[imgName]["off"].src;
}
		
// JavaScript Document
/*******************************************************************************
file:			scrollLayer.js
author:			oh@design-aspekt.com
date:			16-09-2005

requires:		Scroll-Layer within Container-Layer
				Layer with Scroll-Buttons / -Links

input params:	essential: layerID, containerID, scrollbarID
				optional: speed [default = 10 -> lower value = faster scrolling]
********************************************************************************/
var initScroll = false;
var loopScroll = false;
var timerScroll = 0;
if (adjustScrollsteps == 'undefined') { var adjustScrollsteps = 1; }


function scrollLayer(layerID, containerID, scrollbarID, speed) {
	this.id = layerID;
	this.layerObj = (document.getElementById ? document.getElementById(this.id) : document.all ? document.all[this.id] : document.layers[this.id]);
	this.styleObj = (document.getElementById ? this.layerObj.style : document.all ? this.layerObj.style : this.layerObj);
	
	this.scrollHeight = this.layerObj.offsetHeight;
	if (speed > 0) { this.speed = speed; }
	else { this.speed = 10; }
	
	this.containerObj = (document.getElementById ? document.getElementById(containerID) : document.all ? document.all[containerID] : document.layers[containerID]);
	this.containerClipHeight = this.containerObj.offsetHeight;
	  
	// Back-Reference for Timeout
	this.obj = this.id + "Object";
	eval(this.obj + "=this");
	
	// Methods
	this.up = moveAreaUp;
	this.down = moveAreaDown; 
	this.moveArea = moveArea;
	this.scroll = performScroll;
	this.stopScroll = ceaseScroll;
	
	// set Scroll-Layer to left-top
	this.moveArea(0, 0);
	
	// show Scrollbar-Layer and initialise scrolling, if Scrolltext extends Clip-Area of Container-Layer
	if ((this.scrollHeight > this.containerClipHeight) && document.getElementById(scrollbarID)) {
		document.getElementById(scrollbarID).style.visibility = "visible";
		initScroll = true;
	}
} 
	
function moveArea(x, y) {
	this.x = x;
	this.y = y; 
	this.styleObj.left = this.x +"px";
	this.styleObj.top = this.y +"px";
} 
	 
function moveAreaDown(step) {
	if (this.y > -this.scrollHeight + this.containerClipHeight) { 
		this.moveArea(0, (this.y-step));
		if (loopScroll == true) { timerScroll = setTimeout(this.obj + ".down(" + step + ")", this.speed); } 
	} 
}
	 
function moveAreaUp(step) { 
	if (this.y < 0){ 
		this.moveArea(0, (this.y-step)); 
		if (loopScroll == true) { timerScroll = setTimeout(this.obj + ".up(" + step + ")", this.speed); }
	} 
} 
	 
function performScroll(step) {
	if (initScroll == true) { 
		loopScroll = true;
		step = (step * adjustScrollsteps);
		if (step > 0) { this.down(step); } 
		else { this.up(step); } 
	} 
} 
	 
function ceaseScroll() { 
	loopScroll = false; 
	if (timerScroll) { clearTimeout(timerScroll); } 
} 
