/* adON 2007 - e.brehmer */

/*************************************
# INIT ROLLOVERS
- function wird on pageLoad aufgerufen
- hier sind die Rolloiver aktionen vorhanden
*************************************/

function showPage() {
	document.getElementById('bodyid').style.display = "block";
	document.getElementById('loadid').style.display = "none";
}

function showSubPage() {
	document.getElementById('bodyid').style.display = "block";
}

function initRollovers() {
	
	if (document.getElementById('divLoginButt')) {
	
		/* loginSwitch */
		document.getElementById('divLoginButt').onmouseover = function() {
			document.getElementById('loginSwitch').src = "/img/start_header_login_butt_s.jpg";
			document.getElementById('tdLoginText').style.textDecoration = 'underline';
			
		}
		document.getElementById('divLoginButt').onmouseout = function() {
			document.getElementById('loginSwitch').src = "/img/start_header_login_butt.jpg";
			document.getElementById('tdLoginText').style.textDecoration = 'none';
		}
		
	}
	
	if (document.getElementById('divLoginButtSub')) {
	
		/* loginSwitch Subs */
		
		// Bilder werden noch von den ASP-Seiten aus benutzt ::: nach Update der ASP-Seiten sind alle
		// Bilder auch inder ASP Umgebung vorhanden ...
		document.getElementById('divLoginButtSub').onmouseover = function() {
			document.getElementById('loginSwitchSub').src = "http://www.fachanwaltsmodule.de/img/start_header_login_butt_s.jpg";
			document.getElementById('tdLoginTextSub').style.textDecoration = 'underline';
			
		}
		document.getElementById('divLoginButtSub').onmouseout = function() {
			document.getElementById('loginSwitchSub').src = "http://www.fachanwaltsmodule.de/img/start_header_login_butt.jpg";
			document.getElementById('tdLoginTextSub').style.textDecoration = 'none';
		}
	
	}
	
	if (document.getElementById('divTeaserButton')) {
	
		/* start teaserButt */
		document.getElementById('divTeaserButton').onmouseover = function() {
			this.className = "divTeaserButtSel";
		}
		document.getElementById('divTeaserButton').onmouseout = function() {
			this.className = "divTeaserButt";
		}
		
		/* start headerLogos */
		document.getElementById('imgHeaderLogo1').onmouseover = function() {
			this.className = "transON";
		}
		document.getElementById('imgHeaderLogo1').onmouseout = function() {
			this.className = "transOFF";
		}
		
		/* start headerLogos */
		document.getElementById('imgHeaderLogo2').onmouseover = function() {
			this.className = "transON";
		}
		document.getElementById('imgHeaderLogo2').onmouseout = function() {
			this.className = "transOFF";
		}
		
		/* start headerLogos */
		document.getElementById('imgHeaderLogo3').onmouseover = function() {
			this.className = "transON";
		}
		document.getElementById('imgHeaderLogo3').onmouseout = function() {
			this.className = "transOFF";
		}
	
	}
	
	
	/* others */
	var elements = document.getElementsByTagName("div");
	for (i = 0; i < elements.length; i++) {
		
		
		// GREEN BUTTONS - USED IN ALL WKD PAGES >>
		//
		// implement this in def. functions for all pages
		//
		if (elements[i].className == "buttGreenDiv") {
			
			elements[i].onmouseover = function () {
				this.className = "buttGreenDivSel"
			}
			elements[i].onmouseout = function () {
				this.className = "buttGreenDiv"
			}
			
			// TEST //
			/*
			elements[i].onmouseover = function () {
				
				if (navigator.appName == "Microsoft Internet Explorer") {
					this.childNodes[0].childNodes[0].childNodes[0].childNodes[0].innerHTML = "<img src='/img/butt_green_left_sel.jpg' border='0'>";
					this.childNodes[0].childNodes[0].childNodes[0].childNodes[1].className = "buttGreenMiddleSel";
					this.childNodes[0].childNodes[0].childNodes[0].childNodes[2].innerHTML = "<img src='/img/butt_green_right_sel.jpg' border='0'>";
				} else {
					this.childNodes[1].childNodes[1].childNodes[0].childNodes[1].innerHTML = "<img src='/img/butt_green_left_sel.jpg' border='0'>";
					this.childNodes[1].childNodes[1].childNodes[0].childNodes[3].className = "buttGreenMiddleSel";
					this.childNodes[1].childNodes[1].childNodes[0].childNodes[5].innerHTML = "<img src='/img/butt_green_right_sel.jpg' border='0'>";
				}
				
			}
			elements[i].onmouseout = function () {
				
				if (navigator.appName == "Microsoft Internet Explorer") {
					this.childNodes[0].childNodes[0].childNodes[0].childNodes[0].innerHTML = "<img src='/img/butt_green_left.jpg' border='0'>";
					this.childNodes[0].childNodes[0].childNodes[0].childNodes[1].className = "buttGreenMiddle";
					this.childNodes[0].childNodes[0].childNodes[0].childNodes[2].innerHTML = "<img src='/img/butt_green_right.jpg' border='0'>";
				} else {
					this.childNodes[1].childNodes[1].childNodes[0].childNodes[1].innerHTML = "<img src='/img/butt_green_left.jpg' border='0'>";
					this.childNodes[1].childNodes[1].childNodes[0].childNodes[3].className = "buttGreenMiddle";
					this.childNodes[1].childNodes[1].childNodes[0].childNodes[5].innerHTML = "<img src='/img/butt_green_right.jpg' border='0'>";
				}
				
			}
			
			*/
			
		}
		// /GREEN BUTTONS - USED IN ALL WKD PAGES <<
		
		
		if (elements[i].className == "divStartNav") {
			elements[i].onmouseover = function () {
				this.className = "divStartNavSel"
			}
			elements[i].onmouseout = function () {
				this.className = "divStartNav"
			}
		}
		if (elements[i].className == "divStartNavGrey") {
			elements[i].onmouseover = function () {
				this.className = "divStartNavGreySel"
				
			}
			elements[i].onmouseout = function () {
				this.className = "divStartNavGrey"
			}
		}
		if (elements[i].className == "subSubMainNavi") {
			elements[i].onmouseover = function () {
				this.className = "subSubMainNaviSel"
				
			}
			elements[i].onmouseout = function () {
				this.className = "subSubMainNavi"
			}
		}
		
		
		
		
		if (elements[i].className == "subContentButtRight1") {
			elements[i].onmouseover = function () {
				this.className = "subContentButtRight1Sel"
				
			}
			elements[i].onmouseout = function () {
				this.className = "subContentButtRight1"
			}
		}
		if (elements[i].className == "subContentButtRight2") {
			elements[i].onmouseover = function () {
				this.className = "subContentButtRight2Sel"
				
			}
			elements[i].onmouseout = function () {
				this.className = "subContentButtRight2"
			}
		}
		if (elements[i].className == "subContentButtRight3") {
			elements[i].onmouseover = function () {
				this.className = "subContentButtRight3Sel"
				
			}
			elements[i].onmouseout = function () {
				this.className = "subContentButtRight3"
			}
		}
		
		if (elements[i].className == "subContentButt") {
			elements[i].onmouseover = function () {
				this.className = "subContentButtSel"
				
			}
			elements[i].onmouseout = function () {
				this.className = "subContentButt"
			}
		}
		if (elements[i].className == "modulButtGrau") {
			elements[i].onmouseover = function () {
				this.className = "modulButtGrauSel"
				
			}
			elements[i].onmouseout = function () {
				this.className = "modulButtGrau"
			}
		} 
		
		if (elements[i].className == "modulButtBlau") {
			elements[i].onmouseover = function () {
				this.className = "modulButtBlauSel"
				
			}
			elements[i].onmouseout = function () {
				this.className = "modulButtBlau"
			}
		} 
		
		
	}
	
	/* FUCKING TD BUTTONS */
	var elements = document.getElementsByTagName("td");
	for (i = 0; i < elements.length; i++) {
	
		if (elements[i].className == "subHeaderMainNavi") {
			elements[i].onmouseover = function () {
				this.className = "subHeaderMainNaviSel"
				
			}
			elements[i].onmouseout = function () {
				this.className = "subHeaderMainNavi"
			}
		}
	
	}

		
}
 

function showInfo(mitgliederinfoid) {
	setTimeout("new Effect.Highlight(document.getElementById('" + mitgliederinfoid + "'), {startcolor:'#A2FA49', endcolor:'#FFFFFF'});", 300);
}


function showModulName(){
	
	var modulname = "";
	
	var url   = window.location.search;
	
	if (url != "")  {
	
		if (url.indexOf('info1') > -1) {
			modulname = "Das Fachanwaltsmodul Erbrecht ist Ende November 2007 Verf&uuml;gbar ";
		}
		if (url.indexOf('info2') > -1) {
			modulname = "Das Fachanwaltsmodul Familienrecht ist Ende M&auml;rz 2008 Verf&uuml;gbar ";
		}
		if (url.indexOf('info3') > -1) {
			modulname = "Das Fachanwaltsmodul Handels- und Gesellschaftsrecht ist Ende November 2007 Verf&uuml;gbar ";
		}
		if (url.indexOf('info4') > -1) {
			modulname = "Das Fachanwaltsmodul Insolvenzrecht ist Ende M&auml;rz 2008 Verf&uuml;gbar ";
		}
		if (url.indexOf('info5') > -1) {
			modulname = "Das Fachanwaltsmodul Miet- und Wohnungseigentumsrecht ist Mitte Dezember 2007 Verf&uuml;gbar ";
		}
		if (url.indexOf('info6') > -1) {
			modulname = "Das Fachanwaltsmodul Sozialrecht ist Mitte Dezember 2007  Verf&uuml;gbar ";
		}
		if (url.indexOf('info7') > -1) {
			modulname = "Das Fachmodul Bauwesen ist im Fr&uuml;hjahr 2008 Verf&uuml;gbar ";
		}
		if (url.indexOf('info8') > -1) {
			modulname = "Das Fachmodul Patentanw&auml;lte ist Mitte Oktober 2007 Verf&uuml;gbar ";
		}
	
	}
	
	return modulname;

}

function getModulName(){
	
	var modulname = "";
	
	var url   = window.location.search;
	
	if (url != "")  {
	
		if (url.indexOf('info1') > -1) {
			modulname = "Erbrecht ";
		}
		if (url.indexOf('info2') > -1) {
			modulname = "Familienrecht";
		}
		if (url.indexOf('info3') > -1) {
			modulname = "Handels- und Gesellschaftsrecht";
		}
		if (url.indexOf('info4') > -1) {
			modulname = "Insolvenzrecht";
		}
		if (url.indexOf('info5') > -1) {
			modulname = "Miet- und Wohnungseigentumsrecht";
		}
		if (url.indexOf('info6') > -1) {
			modulname = "Sozialrecht";
		}
		if (url.indexOf('info7') > -1) {
			modulname = "Bauwesen";
		}
		if (url.indexOf('info8') > -1) {
			modulname = "Patentanw&auml;lte";
		}
	
	}
	
	return modulname;

}

function showModulCheck(){
	
	var modulname = "";
	
	var url   = window.location.search;
	
	if (url != "")  {	

	
		if (url.indexOf('info1') > -1) {
			document.getElementById('info1').checked = true;
		}
		if (url.indexOf('info2') > -1) {
			document.getElementById('info2').checked = true;
		}
		if (url.indexOf('info3') > -1) {
			document.getElementById('info3').checked = true;
		}
		if (url.indexOf('info4') > -1) {
			document.getElementById('info4').checked = true;
		}
		if (url.indexOf('info5') > -1) {
			document.getElementById('info5').checked = true;
		}
		if (url.indexOf('info6') > -1) {
			document.getElementById('info6').checked = true;
		}
		if (url.indexOf('info7') > -1) {
			document.getElementById('info7').checked = true;
		}
		if (url.indexOf('info8') > -1) {
			document.getElementById('info8').checked = true;
		}
		
	 }



}
 
function hideInfo(what) {
	setTimeout("new Effect.toggle(document.getElementById('" + what + "'), 'Blind', {duration:.4});", 3800);
}

function toggleInfos(what){
	/*
	
	for (i = 1; i < 9; i++){
		
		if (document.getElementById('info' + i).style.display != 'none') {
		
			//new Effect.SlideUp(document.getElementById('info' + i), {duration:.4});
			new Effect.toggle(document.getElementById('info' + i),'Slide',  {duration:.4});
		
		}
	
	}
	
	
	
	new Effect.toggle(document.getElementById(what),'Slide',  {duration:.4});
	var objDiv = document.getElementById("startMainNaviBoxx1");
	objDiv.scrollTop = objDiv.scrollHeight;
	//setTimeout("func('" + what + "')", 4000);
	*/
	
	document.location.href = "/modulnachricht.shtml?modulname=" + what;
	
}

function func(what) {
	
	if (document.getElementById(what).style.display != 'none') {

		new Effect.SlideUp(document.getElementById(what),  {duration:.4});
	
	}
	
}

/* UEBERNOMMENE FUNKTIONEN */

function linkTo(where) {
	
	document.location.href = where;

}

function goTo(where) {
	
	window.open(where,"new","");

}

function goToSized(where) {

	window.open(where,"newin","width=500,height=350,scrollbars=yes,resizable=yes");

}

function goToSpecial(where, width, height, winname) {

	window.open(where,winname,"width=" + width + ",height=" + height + ",scrollbars=yes,resizable=yes");

}










