// JS für Provinzen

window.onload = function () {
  $('News').addClassName('highlight');
  $('Suche').addClassName('highlight');
  $('Merkliste').addClassName('highlight');
}

function $N(element) {
 	if (typeof element == 'string') {
    		element = document.getElementsByName(element)[0];
  		return Element.extend(element);
	}
	else {
		return null;
	}
}

function highlight(obj) {
	if($N(obj).hasClassName('highlight')) {
		$N(obj).removeClassName('highlight');
	}
	else {
		$N(obj).addClassName('highlight');
	}
}

function findeFlash (flash) {
    if (document.all) {
      if (document.all[flash]) {
        return document.all[flash];
      }
      if (window.opera) {
        var movie = eval(window.document + flash);
        if (movie.SetVariable) {
          return movie;
        }
      }
      return;
    }
    if(document.layers) {
      if(document.embeds) {
        var movie = document.embeds[flash];
        if (movie.SetVariable) {
          return movie;
        }
      }
      return;
    }
    if (!document.getElementById) {
      return;
    }
    var movie = document.getElementById(flash);
    if (movie.SetVariable) {
      return movie;
    }
    var movies = movie.getElementsByTagName('embed');
    if (!movies || !movies.length) {
      return;
    }
    movie = movies[0];
    if (movie.SetVariable) {
      return movie;
    }
    return;
}

function editflash(name, on) {
	var movie = findeFlash('provinzkarte');
	if (movie) {
		if (on)	 {
			movie.SetVariable("dot", name);
		} else {
			movie.SetVariable("dot", "");
		}
	}
}

