/*
 * ----------------------------------------------------------------------------
 * TITLE       : SREP JavaScript
 * COMPANY     : interactive tools GmbH <http://www.interactive-tools.de>
 * ----------------------------------------------------------------------------
 */

/*
 * ----------------------------------------------------------------------------
 * pulldownLanguage - Sprachwechsel box
 * ----------------------------------------------------------------------------
 */
function pulldownLanguage(url) {
	if(url!=''){	location=url;}
}

/* Klickdummy Pulldown Verstecken fuer aeltere Browser */
function surfto(form) {
var myindex=form.select1.selectedIndex
if (form.select1.options[myindex].value != "0") {
location=form.select1.options[myindex].value;}
}

function navto(form) {
var myindex=form.nav1.selectedIndex
if (form.nav1.options[myindex].value != "0") {
location=form.nav1.options[myindex].value;}
}



function pop (a){
	if(navigator.appName.substring(0,8)=="Netscape"){
		mini=window.open(a,'Pop','toolbar=0,location=0,status=0,resizable=1,menubar=1,scrollbars=1,height=590,width=436,top=0,left=0');
		mini.focus();
	}
	else{
		mini=window.open(a,'Pop','toolbar=0,location=0,status=0,resizable=yes,menubar=1,scrollbars=1,height=573,width=453,top=0,left=0');
		mini.focus();
	}
}
function popVin (a){
	if(navigator.appName.substring(0,8)=="Netscape"){
		mini=window.open(a,'Pop','toolbar=1,location=1,status=0,resizable=yes,menubar=0,scrollbars=YES,scrollbars=1,height=595,width=680,top=0,left=0');
		mini.focus();
	}
	else{
		mini=window.open(a,'Pop','toolbar=1,location=1,status=0,resizable=yes,menubar=0, scrollbars=YES,scrollbars=1,height=600,width=690,top=0,left=0');
		mini.focus();
	}
}

function popFilm (a){
	if(navigator.appName.substring(0,8)=="Netscape"){
		mini=window.open(a,'Pop','toolbar=0,location=0,status=0,resizable=1,menubar=1,scrollbars=1,height=680,width=780,top=0,left=0');
		mini.focus();
	}
	else{
		mini=window.open(a,'Pop','toolbar=0,location=0,status=0,resizable=yes,menubar=1,scrollbars=1,height=680,width=820,top=0,left=0');
		mini.focus();
	}
}
function zoom (a){
	if(navigator.appName.substring(0,8)=="Netscape"){
		mini=window.open(a,'Zoom','toolbar=1,location=1,status=0,resizable=yes,menubar=0,scrollbars=YES,scrollbars=1,height=522,width=600,top=0,left=0');
		mini.focus();
	}
	else{
		mini=window.open(a,'Zoom','toolbar=1,location=1,status=0,resizable=yes,menubar=0, scrollbars=YES,scrollbars=1,height=522,width=600,top=0,left=0');
		mini.focus();
	}
}

function makeRemote(dateiname) {
remote = window.open("","remotewin",'toolbar=1,location=0,status=0,menubar=1,resizable=yes,scrollbars=1,height=520,width=475,top=0,left=0');
remote.location.href = dateiname
if (remote.opener == null) remote.opener = window;
remote.opener.name = "opener";
}
function go(url) {
opener.location.href = url;
}

var i=0, sw=screen.width*100/100, sh=screen.height*100/100;
function resize() {
if (navigator.appName == 'Netscape') i=0;
nw = 385 + ((document.closeButton.width > document.articleImage.width) ? document.closeButton.width : document.articleImage.width);
nh = document.articleImage.height + 340 - i;
if(nw>sw) nw = sw;
if(nh>sh) nh = sh;
window.resizeTo(nw, nh);
nx = screen.width/2 - nw/2;
ny = screen.height/2 - nh/2;
window.moveTo(nx, ny);
}

function resizePopup(h) {
	if(h>285){
		if(navigator.appName.substring(0,8)=="Netscape"){
			window.self.innerHeight=670;
			window.focus();
			Pop.focus();
		}
		else {
			window.self.resizeTo(468,725);
		}
	}
	else {
		if(navigator.appName.substring(0,8)=="Netscape"){
			if(window.self.innerHeight>590){
				window.self.innerHeight=590;
				window.focus();
				Pop.focus();
			}
		}
		else {
			window.self.resizeTo(468,660);
		}
	}
}

/* - - - - - - - - Minimieren / Maximieren - - - - - - - - - - - - - */

function outline(id)
{
 if(document.getElementById(id).style.display == 'none')
 {
  document.getElementById(id).style.display = '';
 }
 else
 {
  document.getElementById(id).style.display = 'none';
 }
}

/* - - - - - - - - Einstieg-Layer - - - - - - - - - - - - - - */
var id_merken="";
function show(id) {
	document.getElementById("ID0").style.display = "none";
	document.getElementById(id).style.display = "";
	if(id_merken!="" && id_merken!=id){
		document.getElementById(id_merken).style.display = "none";
	}
	id_merken = id;
}

/* - - - - - - - - Klappnavigation - - - - - - - - - */

function doSomethingWithClasses(theClass) {
   //Populate the array with all the page tags
   var allPageTags=document.getElementsByTagName("ul");
   //Cycle through the tags using a for loop
   for (i=0; i<allPageTags.length; i++) {
       //Pick out the tags with our class name
       if (allPageTags[i].className==filter) {
           //Manipulate this in whatever way you want
           allPageTags[i].style.display='none';
       }
   }
}


if(window.navigator.systemLanguage && !window.navigator.language) {
	//Create an array
	var allPageTags = new Array();
	function hoverIE() {
	//Populate the array with all the page tags
	var allPageTags=document.getElementsByTagName("ul");
	//Cycle through the tags using a for loop
   for (i=0; i<allPageTags.length; i++) {
       //Pick out the tags with our class name
       if (allPageTags[i].className=="filter") {
           //Manipulate this in whatever way you want
           //allPageTags[i].style.display='none';
		   var LI = allPageTags[i].firstChild;
			do {
				if (sucheUL(LI.firstChild)) {
					LI.onmouseover=einblenden; LI.onmouseout=ausblenden;
				}
				LI = LI.nextSibling;
			}
			while(LI);
       }
   }

}

function sucheUL(UL) {
do {
if(UL) UL = UL.nextSibling;
if(UL && UL.nodeName == "UL") return UL;
}
while(UL);
return false;
}

function einblenden() {
var UL = sucheUL(this.firstChild);
UL.style.display = "block"; UL.style.backgroundColor = "#fff"; UL.style.position = "absolute";
}
function ausblenden() {
sucheUL(this.firstChild).style.display = "none";
}

window.onload=hoverIE;
}