/*
	$Id$
*/

Normal1 = new Image();
Normal1.src = "images/navi_01_lo.gif";
Highlight1 = new Image();
Highlight1.src = "images/navi_01_hi.gif";

Normal2 = new Image();
Normal2.src = "images/navi_02_lo.gif";
Highlight2 = new Image();
Highlight2.src = "images/navi_02_hi.gif";

Normal3 = new Image();
Normal3.src = "images/navi_03_lo.gif";
Highlight3 = new Image();
Highlight3.src = "images/navi_03_hi.gif";

Normal3 = new Image();
Normal3.src = "images/navi_03_lo.gif";
Highlight3 = new Image();
Highlight3.src = "images/navi_03_hi.gif";

Normal4 = new Image();
Normal4.src = "images/navi_04_lo.gif";
Highlight4 = new Image();
Highlight4.src = "images/navi_04_hi.gif";

Normal5 = new Image();
Normal5.src = "images/absenden_05_lo.gif";
Highlight5 = new Image();
Highlight5.src = "images/absenden_05_hi.gif";

Normal6 = new Image();
Normal6.src = "images/naehrwertinfo_06_lo.gif";
Highlight6 = new Image();
Highlight6.src = "images/naehrwertinfo_06_hi.gif";

Normal7 = new Image();
Normal7.src = "images/zurueck_07_lo.gif";
Highlight7 = new Image();
Highlight7.src = "images/zurueck_07_hi.gif";



function Bildwechsel(Bildnr,Bildobjekt) {
	//window.document.images[Bildnr].src = Bildobjekt.src;
	
	var newSrc = "";
	if(window.document.images[Bildnr].src.match(/_hi/)) {
		newSrc = window.document.images[Bildnr].src.replace(/_hi/, "_lo");
	} else {
		newSrc = window.document.images[Bildnr].src.replace(/_lo/, "_hi");
	}
	window.document.images[Bildnr].src = newSrc;
}
			
function switchImg(id,Bildobjekt){
	var newSrc = "";
	if(window.document.getElementById(id).src.match(/_hi/)) {
		newSrc = window.document.getElementById(id).src.replace(/_hi/, "_lo");
	} else {
		newSrc = window.document.getElementById(id).src.replace(/_lo/, "_hi");
	}
	window.document.getElementById(id).src = newSrc;	
}
			
/**
* @author Stefan Saasen <stefan.saasen@e-7.com>
*/
function sendfriend( catchtime, catchedbonscher, imagenr ) {
	//document.location.href="c11000.php?catchtime="+catchtime+"&catchedbonscher="+catchedbonscher+"&imagenr="+imagenr;
    
    if (document.getElementById && document.createElement) {
        var myForm = document.createElement("form");
        var formAtt = document.createAttribute("method");
        formAtt.nodeValue = "post";
        myForm.setAttributeNode(formAtt);
        
        formAtt = document.createAttribute("action");
        formAtt.nodeValue = "c11000.php";
        myForm.setAttributeNode(formAtt);            
        
        var element = createInputElement("catchtime", catchtime);
        myForm.appendChild(element);   
        element = createInputElement("catchedbonscher", catchedbonscher);
        myForm.appendChild(element); 
        element = createInputElement("imagenr", imagenr);
        myForm.appendChild(element);     	
        /*
        var submitElement = document.createElement("input");
        var formElementType = document.createAttribute("type");
        formElementType.nodeValue  = "submit";
        submitElement.setAttributeNode(formElementType);
        myForm.appendChild(submitElement);
		*/
        var div = document.getElementById("flashspielDiv");
        div.appendChild(myForm);
        myForm.submit();
    } else {
	    document.location.href="c11000.php?catchtime="+catchtime+"&catchedbonscher="+catchedbonscher+"&imagenr="+imagenr;
    }
    
}

/**
* @author Stefan Saasen <stefan.saasen@e-7.com>
*/
function createInputElement(name, value) {
    var formElement = document.createElement("input");
    var formElementType = document.createAttribute("type");
    formElementType.nodeValue  = "hidden";
    formElement.setAttributeNode(formElementType);
    formElementType = document.createAttribute("name");
    formElementType.nodeValue  = name;
    formElement.setAttributeNode(formElementType);
    formElementType = document.createAttribute("value");
    formElementType.nodeValue  = value;     
    formElement.setAttributeNode(formElementType);   
    return formElement;
}			
		
		
function riesenpopup(caller){
	riesenwin = window.open(caller.href,"riesenwin","toolbar=no,status=no,scrollbars=no,resizable=no,location=no,menubar=no,directories=no,width=700,height=450");
	return false;
}		
			