
/* $Id: scripts.js,v 1.3 2005/05/02 15:54:56 ppz_dev Exp $ */

//  function openChild 
//	crienow - pepperzak

// Die Funktion openChild wird zum Oeffnen von Childwindows per JavaScript eingesetzt.
// Uebegabe Parameter sind:
//
// childUrl (string) - die URL des zu Oeffnenden Fensters
// childName (string) - der Name des Fensters
// childWidth (integer) - die Breite
// childHeight (integer) - die Hoehe
// childStatus (integer) - die Statuszeile wird angezeigt 
// childScrollbars (yes/no) -  es kann Scrollbars geben
// childLocation (yes/no) - die Adresszeile wird angezeigt
// childTollbar (yes/no) - die Toolbar wird angezeigt
// childMenubar (yes/no) - die Menubar wird angezeigt

// das Fenster wird in der Mitte des Bildschirms geoeffnet

function openChild(childUrl,childName,childWidth,childHeight,childStatus,childScrollbars,childLocation,childTollbar,childMenubar) {
	var newChild = null;
	if (childWidth>0) {
		childPosLeft = Math.floor((screen.width - childWidth) / 2);
		childPosTop = Math.floor((screen.height - childHeight) / 2);
		newChild = window.open(childUrl,childName,'width='+childWidth+',height='+childHeight+',innerwidth='+childWidth+',innerheight='+ childHeight+',top='+childPosTop+',left='+childPosLeft+',status='+childStatus+',scrollbars='+childScrollbars+',location='+childLocation+',toolbar='+childTollbar+',menubar='+childMenubar);
	} else {
		newChild = window.open(childUrl,childName);
	}
	if (newChild != null)
		newChild.window.focus();
}

//  function picOver
//	crienow - pepperzak

function picOver(n) {
	document.images['pic'+n].src = eval('on'+n).src;
}

//  function picOver
//	crienow - pepperzak

function picOut(n) {
	document.images['pic'+n].src=eval('off'+n).src;
}

function submit_event(obj) {
    var chosen = obj.id.selectedIndex;
    if (obj.id.options[chosen].value > 0) {
        obj.submit();
    }
}

function submit_stage_event(obj) {
    var chosen = obj.event_id.selectedIndex;
    if (obj.event_id.options[chosen].value > 0) {
        obj.submit();
    }
}

