var sub0 = new Array();
sub0[0] = 'Startpage,temp.html';

var sub1 = new Array();
sub1[0] = 'Startpage,100.html';
sub1[1] = 'Kritische Situationen,101.html';
sub1[2] = 'Wir helfen!,102.html';
sub1[3] = 'Wer zahlt?,103.html';
sub1[4] = 'Im Einsatz,104.html';
sub1[5] = ',';
sub1[6] = 'Downloadbereich,105.php';

var sub2 = new Array();
sub2[0] = 'Startpage,200.html';
sub2[1] = 'Was wir tun,201.html';
sub2[2] = 'Organisation und Gremien,202.html';
sub2[3] = 'Chronik,203.html';
sub2[4] = ',';
sub2[5] = 'Downloadbereich,204.php';


var sub3 = new Array();
sub3[0] = 'Startpage,300.html';
sub3[1] = 'Unsere Finanzierung,301.html';
sub3[2] = 'Spenden Sie!,302.html';
sub3[3] = 'Aktiv für Familienpflege,303.html';
sub3[4] = ',';
sub3[5] = 'Downloadbereich,304.php';


var sub4 = new Array();
sub4[0] = 'Startpage,400.html';
sub4[1] = 'Kampagnen,401.php';
sub4[2] = 'Dokumentation,402.html';
sub4[3] = 'Fortbildung,403.php';
sub4[4] = ',';
sub4[5] = 'Downloadbereich,404.php';

var sub5 = new Array();
sub5[0] = 'Startpage,500.html';
sub5[1] = 'Familienpflegestationen,501.php';
sub5[2] = 'Familienpflege in Bayern,502.php';
sub5[3] = 'Stellenangebote,503.php';
sub5[4] = 'Links,504.html';
sub5[5] = 'Impressum,505.html';

var sub6 = new Array();
sub6[0] = 'Startpage,600.html';
sub6[1] = 'Pressemitteilungen,601.php';
sub6[2] = 'Pressedokumentation,602.html';


function htmlWin(daURL, daW, daH) {
		var w = 480, h = 340;

		if (document.all || document.layers) {
 			w = screen.width;
  			h = screen.height;
		}
	
	var leftPos = (w-daW)/2, topPos = (h-daH)/2;
		
	var newwinobj = window.open(daURL,'newwin','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width=' + daW + ',height=' + daH + ',top='  + topPos + ',left='  + leftPos + '');
      	newwinobj.focus();
}

function changePos(daX,daY){
	daYoff = 63;
	daXoff = 67;
	document.getElementById('layer1').style.visibility='visible';
	document.getElementById('layer1').style.top=(daY - daYoff);
	document.getElementById('layer1').style.left=(daX - daXoff);
	document.getElementById('layer2').style.visibility='visible';
	document.getElementById('layer2').style.top=(daY - daYoff);
	document.getElementById('layer2').style.left=(daX - daXoff);
}

function closePop(){
	document.getElementById('layer1').style.visibility='hidden';
	document.getElementById('layer2').style.visibility='hidden';
}

function doHi(img,isHi){
	if(isHi){
	document.body.style.cursor='pointer';
	img.style.opacity = 1;
	img.style.filter = 'alpha(opacity=100)';
	}
	else{
	document.body.style.cursor='auto';
	img.style.opacity = .5;
	img.style.filter = 'alpha(opacity=50)';
	}
}

var lastObj = 0;

function navHi(daObj,isHi){
	if(daObj != lastObj){
		if(isHi){
			document.body.style.cursor='pointer';
			document.getElementById(daObj).style.backgroundColor = 'A1A276';
			document.getElementById(daObj).style.color = 'ffffff';
		}
		else{
			document.body.style.cursor='auto';
			document.getElementById(daObj).style.backgroundColor = '717253';
			document.getElementById(daObj).style.color = 'ffffff';
		}
	}
}



function goLink(clickObj,daLink,daSubLink){
	for(i=0;i<7;i++){
		document.getElementById(i).style.backgroundColor = '717253';
		document.getElementById(i).style.color = 'ffffff';
	}

	document.body.style.cursor='auto';
	document.getElementById(clickObj).style.backgroundColor = 'EE8B13';
	document.getElementById(clickObj).style.color = 'ffffff';
	subnav(daLink,daSubLink);
	lastObj = clickObj;
}

function setHi(section,sublink){
	for(i=0;i<7;i++){
		document.getElementById(i).style.backgroundColor = '717253';
		document.getElementById(i).style.color = 'ffffff';
	}
	document.body.style.cursor='auto';
	document.getElementById(section).style.backgroundColor = 'EE8B13';
	document.getElementById(section).style.color = 'ffffff';
	snobs = eval('sub'+section);
	output = '';
	for(i=1;i<snobs.length;i++){
		if(i == sublink){
		output += '<table width="100%" border="0" cellspacing="0" cellpadding="0" style="padding-top: 1px;"> \
			<tr> \
				<td align="center" valign="middle"><img src="images/space.gif" alt="" height="23" width="11" border="0"></td> \
				<td align="left" valign="middle" width="10"><img src="images/arrow_grau.gif" alt="" height="7" width="4" border="0"></td> \
				<td align="center" valign="middle" width="1%"><img src="images/space.gif" alt="" height="20" width="8" border="0"></td> \
				<td align="left" valign="middle" width="100%"><a href="javascript:subnav(' + section + ',' + i + ')"><font class="subhi">'+snobs[i].split(',')[0]+'</font></a></td> \
				<td align="center" valign="middle" width="1"><img src="images/space.gif" alt="" height="20" width="15" border="0"></td> \
			</tr> \
			<tr height="1"> \
				<td align="center" valign="middle" height="1"><img src="images/space.gif" alt="" height="1" width="11" border="0"></td> \
				<td colspan="3" align="left" valign="middle" bgcolor="#bfbeac" height="1"><font color="#717253"><img src="images/space.gif" alt="" height="1" width="11" border="0"></font></td> \
				<td align="center" valign="middle" width="1" height="1"><img src="images/space.gif" alt="" height="1" width="15" border="0"></td> \
			</tr> \
		</table>';
		}
		else {
		output += '<table width="100%" border="0" cellspacing="0" cellpadding="0" style="padding-top: 1px;"> \
			<tr> \
				<td align="center" valign="middle"><img src="images/space.gif" alt="" height="23" width="11" border="0"></td> \
				<td align="left" valign="middle" width="10"><img src="images/space.gif" alt="" height="7" width="4" border="0"></td> \
				<td align="center" valign="middle" width="1%"><img src="images/space.gif" alt="" height="20" width="8" border="0"></td> \
				<td align="left" valign="middle" width="100%"><a href="javascript:subnav(' + section + ',' + i + ')"><b>'+snobs[i].split(',')[0]+'</b></a></td> \
				<td align="center" valign="middle" width="1"><img src="images/space.gif" alt="" height="20" width="15" border="0"></td> \
			</tr> \
			<tr height="1"> \
				<td align="center" valign="middle" height="1"><img src="images/space.gif" alt="" height="1" width="11" border="0"></td> \
				<td colspan="3" align="left" valign="middle" bgcolor="#bfbeac" height="1"><font color="#717253"><img src="images/space.gif" alt="" height="1" width="11" border="0"></font></td> \
				<td align="center" valign="middle" width="1" height="1"><img src="images/space.gif" alt="" height="1" width="15" border="0"></td> \
			</tr> \
		</table>';
		}
	}
	document.getElementById('subnav').innerHTML = output;
}

function subnav(section,sublink){
	subs = eval('sub'+section);
	output = '';
	for(i=1;i<subs.length;i++){
		if(i == sublink){
		output += '<table width="100%" border="0" cellspacing="0" cellpadding="0" style="padding-top: 1px;"> \
			<tr> \
				<td align="center" valign="middle"><img src="images/space.gif" alt="" height="23" width="11" border="0"></td> \
				<td align="left" valign="middle" width="10"><img src="images/arrow_grau.gif" alt="" height="7" width="4" border="0"></td> \
				<td align="center" valign="middle" width="1%"><img src="images/space.gif" alt="" height="20" width="8" border="0"></td> \
				<td align="left" valign="middle" width="100%"><a href="javascript:subnav(' + section + ',' + i + ')"><font class="subhi">'+subs[i].split(',')[0]+'</font></a></td> \
				<td align="center" valign="middle" width="1"><img src="images/space.gif" alt="" height="20" width="15" border="0"></td> \
			</tr> \
			<tr height="1"> \
				<td align="center" valign="middle" height="1"><img src="images/space.gif" alt="" height="1" width="11" border="0"></td> \
				<td colspan="3" align="left" valign="middle" bgcolor="#bfbeac" height="1"><font color="#717253"><img src="images/space.gif" alt="" height="1" width="11" border="0"></font></td> \
				<td align="center" valign="middle" width="1" height="1"><img src="images/space.gif" alt="" height="1" width="15" border="0"></td> \
			</tr> \
		</table>';
		}
		else {
		output += '<table width="100%" border="0" cellspacing="0" cellpadding="0" style="padding-top: 1px;"> \
			<tr> \
				<td align="center" valign="middle"><img src="images/space.gif" alt="" height="23" width="11" border="0"></td> \
				<td align="left" valign="middle" width="10"><img src="images/space.gif" alt="" height="7" width="4" border="0"></td> \
				<td align="center" valign="middle" width="1%"><img src="images/space.gif" alt="" height="20" width="8" border="0"></td> \
				<td align="left" valign="middle" width="100%"><a href="javascript:subnav(' + section + ',' + i + ')"><b>'+subs[i].split(',')[0]+'</b></a></td> \
				<td align="center" valign="middle" width="1"><img src="images/space.gif" alt="" height="20" width="15" border="0"></td> \
			</tr> \
			<tr height="1"> \
				<td align="center" valign="middle" height="1"><img src="images/space.gif" alt="" height="1" width="11" border="0"></td> \
				<td colspan="3" align="left" valign="middle" bgcolor="#bfbeac" height="1"><font color="#717253"><img src="images/space.gif" alt="" height="1" width="11" border="0"></font></td> \
				<td align="center" valign="middle" width="1" height="1"><img src="images/space.gif" alt="" height="1" width="15" border="0"></td> \
			</tr> \
		</table>';
		}
	}
	document.getElementById('subnav').innerHTML = output;
	//daIframe = document.getElementById('main').contentDocument
	//loadout = '<html><head><title>Loading...</title></head><body bgcolor="#ffffff"></body></html>';
	//daIframe.open();
	//daIframe.write(loadout);
	//daIframe.close();
	document.getElementById('main').src = subs[sublink].split(',')[1];
}

