function showLogin()
{
  document.getElementById('opodienLoginLayer').style.visibility = 'visible';
}

function showSommerspieleTeaser(id)
{
  // alle ausschalten
  for (var i = 1; i < 6; ++i)
  {
    document.getElementById('opodienFooterSommerLeft'+i).style.visibility = "hidden";
    document.getElementById('opodienFooterSommerCenter'+i).style.visibility = "hidden";
    document.getElementById('opodienFooterSommerRight'+i).style.visibility = "hidden";
  }
  document.getElementById('opodienFooterSommerLeft'+id).style.visibility = "visible";
  document.getElementById('opodienFooterSommerCenter'+id).style.visibility = "visible";
  document.getElementById('opodienFooterSommerRight'+id).style.visibility = "visible";
}


function showEcardsTeaser(id)
{
  // alle ausschalten
  for (var i = 1; i < 6; ++i)
  {
    document.getElementById('opodienFooterInfoBoxLeft'+i).style.visibility = "hidden";
    document.getElementById('opodienFooterInfoBoxCenter'+i).style.visibility = "hidden";
    document.getElementById('opodienFooterInfoBoxRight'+i).style.visibility = "hidden";
  }
  document.getElementById('opodienFooterInfoBoxLeft'+id).style.visibility = "visible";
  document.getElementById('opodienFooterInfoBoxCenter'+id).style.visibility = "visible";
  document.getElementById('opodienFooterInfoBoxRight'+id).style.visibility = "visible";
}

function closeLogin()
{
  document.getElementById('opodienLoginLayer').style.visibility = 'hidden';
}

function showVorteilsCodeAgb()
{
  window.open( 'http://opodien.de/home/html/agb_neu.html', 'agbs', 'width=440,height=740,scrollbars=yes' );
}

function showteilnahme()
{
  window.open( 'http://www.opodien.de/ministerwahl/teilnahmebedingungen.html', 'teilnahme', 'width=600,height=740,scrollbars=yes' );
}


function showpop(url)
{
  window.open( url, 'opodien', 'width=440,height=740,scrollbars=yes' );
}

var opodienMenu = {
	
	properties : {
		hover : {
			color 		: '#FFF',
			background 	: 'transparent url(/images/menu-hover.gif) 0px 1px repeat-x'
		},
		normal : {
			color 		: '#0F609A',
			background 	: 'none'
		}
	},
	
	set : function (element, restrict) {

		if ((element = document.getElementById(element)) != null) {
		
			if (restrict == null) {
				restrict = [];
			} else if (typeof restrict == 'string') {
				restrict = [restrict];
			}
			
			for (var x = 0; x < element.childNodes.length; ++x) {
			
				var liNodes = element.childNodes[x];

				if (liNodes.tagName == 'LI') {

					if (liNodes.id != '' && restrict.join('|').indexOf(liNodes.id) < 0) {

						liNodes.aNode  = liNodes.getElementsByTagName('a')[0];
						liNodes.ulNode = liNodes.getElementsByTagName('ul')[0];

						liNodes.onmouseover = function () {

							if (this.ulNode != null) {
								this.ulNode.style.display = 'block';
							}

							for (var p in opodienMenu.properties.hover) {

								this.aNode.style[p] = opodienMenu.properties.hover[p];
							}
						};

						liNodes.onmouseout = function () {

							if (this.ulNode != null) {
								this.ulNode.style.display = 'none';
							}

							if (this.aNode.rel != 'activ'){

								for (var p in opodienMenu.properties.normal) {

									this.aNode.style[p] = opodienMenu.properties.normal[p];
								}
							}
						};
					}
				}
			}	
		}
	},
	
	load : function (element, restrict) {
	
		var store = window.onload;

		if (store != null) {

			window.onload = function () {
				store();
				opodienMenu.set(element, restrict);
			};

		} else {

			window.onload = function () {

				opodienMenu.set(element, restrict);
			}
		}
	}
	
}; opodienMenu.load('opodienDropDown', ['opodienLogin','opodienLogout','opodienMyProfil']);


function ministercheck(){
	if(document.forms[0].soundId.value==""){
		alert("Bitte wählen Sie einen Favoriten aus!");
		return false;
	}else{
		return true;
	}
}
