function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function flyer(url, breite, hoehe)
{
var nwl = (screen.width-breite)/2;
var nwh = (screen.height-hoehe)/2;
fenster = window.open(url,'flyer','width=' + breite +',height=' + hoehe + ',directories=no,toolbar=no,location=no,menubar=no,scrollbars=2,status=no,resizable=yes,dependent=no,fullscreen=no, left='+nwl+',top='+nwh+'');
fenster.focus();
}show_datum_ende


function showdiv(hideShow, color, obj, hoverColor) {
obj.style.backgroundColor=hoverColor;
show_location_name(hideShow, color);
}

function hidediv(hideShow, color, obj, MouseOutColor) {
obj.style.backgroundColor=MouseOutColor;
hide_location_name(hideShow, color);
}

function show_location_name(hideShow, color) {
if (hideShow != '236') {

var layer =  'layer_' + hideShow;
document.getElementById(layer).style.zIndex = 1000;

var imgname =  'location_image_' + hideShow;

switch (color) {
	case 'red':
		document.getElementsByName(imgname)[0].src = 'pics/location_red_highlight.gif';
		break;
	case 'blue':
		document.getElementsByName(imgname)[0].src = 'pics/location_blue_highlight.gif';
		break;
	case 'green':
		document.getElementsByName(imgname)[0].src = 'pics/location_green_highlight.gif';
		break;
	case 'orange':
		document.getElementsByName(imgname)[0].src = 'pics/location_orange_highlight.gif';
		break;
}

hideShow = 'location_' + hideShow;

if (document.getElementById) { // DOM3 = IE5, NS6
document.getElementById(hideShow).style.visibility = 'visible';
}
else {
if (document.layers) { // Netscape 4
document.hideShow.visibility = 'visible';

}
else { // IE 4
document.all.hideShow.style.visibility = 'visible';
}
}
}
}



function hide_location_name(hideShow, color) {
if (hideShow != '236') {

var layer = 'layer_' + hideShow;
document.getElementById(layer).style.zIndex = 100;

var imgname = 'location_image_' + hideShow;

switch (color) {
	case 'red':
		document.getElementsByName(imgname)[0].src = 'pics/location_red.gif';
		break;
	case 'blue':
		document.getElementsByName(imgname)[0].src = 'pics/location_blue.gif';
		break;
	case 'green':
		document.getElementsByName(imgname)[0].src = 'pics/location_green.gif';
		break;
	case 'orange':
		document.getElementsByName(imgname)[0].src = 'pics/location_orange.gif';
		break;
}

hideShow = 'location_' + hideShow;

if (document.getElementById) { // DOM3 = IE5, NS6
document.getElementById(hideShow).style.visibility = 'hidden';
}
else {
if (document.layers) { // Netscape 4
//document.hideShow.visibility = 'hidden';
}
else { // IE 4
document.all.hideShow.style.visibility = 'hidden';
}
}
}
}




function delete_confirmation(goto_location){
if (confirm('Do you really want to delete this activity?') == true) document.location = goto_location;
	else document.location = "index.php?nav=admin&amp;subnav=event_add";
}


function show_datum_ende(objekt) {
	if (objekt.checked) {
		document.getElementById('datum_ende_td1').style.visibility='visible';
		document.getElementById('datum_ende_td2').style.visibility='visible';
	} else {
		document.getElementById('datum_ende_td1').style.visibility='hidden';
		document.getElementById('datum_ende_td2').style.visibility='hidden';		
	}
}


function flyer(url, breite, hoehe)
{
var nwl = (screen.width-breite)/2;
var nwh = (screen.height-hoehe)/2;
fenster = window.open(url,'flyer','width=' + breite +',height=' + hoehe + ',directories=no,toolbar=no,location=no,menubar=no,scrollbars=2,status=no,resizable=yes,dependent=no,fullscreen=no, left='+nwl+',top='+nwh+'');
fenster.focus();
}

function hover_over(obj, hoverColor) {
obj.style.backgroundColor=hoverColor;
}

function hover_out(obj, MouseOutColor) {
obj.style.backgroundColor=MouseOutColor;
}


function switch_shadows(no, color) {
	document.getElementsByName('shadow_top'+no)[0].src = 'pics/shadow_'+color+'_top.gif';
	document.getElementsByName('shadow_bottom'+no)[0].src = 'pics/shadow_'+color+'_bottom.gif';
	document.getElementsByName('shadow_left'+no)[0].src = 'pics/shadow_'+color+'_left.gif';
	document.getElementsByName('shadow_right'+no)[0].src = 'pics/shadow_'+color+'_right.gif';
}

