//Standard-Header
var home_link 			= "http://www.vowikron.de/index.html";
var me_link   			= "http://www.vowikron.de/me.html";
var literatur_link		= "http://www.vowikron.de/literatur/literatur.html";
var blog_link			= "http://blog.vowikron.de";
var fotos_link			= "http://www.vowikron.de/fotos/fotos.html";
var links_link			= "http://www.vowikron.de/links.html";
var sonstiges_link		= "http://www.vowikron.de/sonstiges/sonstiges.html";

//Literatur-Sub-Header
var overview_link		= "http://www.vowikron.de/literatur/literatur.html";
var sonstiges_lit_link		= "http://www.vowikron.de/literatur/literatur.html";//sonstiges.html";
var romane_link			= "http://www.vowikron.de/literatur/romane/romane.html";
var publish_link		= "http://www.vowikron.de/literatur/literatur.html";//public.html";
var public_stories_link	= "http://www.vowikron.de/literatur/puplic_stories.html";
var private_stories_link= "http://www.vowikron.de/literatur/literatur.html";//private_stories.html";

//Standard-Footer
var impressumlink		= "http://www.vowikron.de/impressum.html";
var haft_auss_link		= "http://www.vowikron.de/haft_ausschluss.html";
var kontact_link		= "http://www.vowikron.de/kontakt.html";



function getHeader(bereich)
{
	var header_code = "";
	var blank = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";

	header_code = "<table border=0 width=\"980\" >";
	header_code += "<tr>";
	header_code += "	<th colspan=\"9\"><img  border=\"0\" src=\"http://www.vowikron.de/images/header.png\"></th>";
	header_code += "</tr>";
	header_code += "<tr height=\"5\"></tr>";
	header_code += "<tr>";
	header_code += "	<td width=\"100\"></td>";
	header_code += "	<td align=\"center\">";

	header_code += getLink("Home",bereich);
	header_code += blank;
	header_code += getLink("Me",bereich);
	header_code += blank;
	header_code += getLink("Literatur",bereich);
	header_code += blank;
	header_code += getLink("Kronblog",bereich);
	header_code += blank;
	header_code += getLink("Fotos",bereich);
	header_code += blank;
	header_code += getLink("Links",bereich);
	header_code += blank;
	header_code += getLink("Sonstiges",bereich);

	header_code += "</td>";
	header_code += "<td>";
	header_code += "</td>";
	header_code += "<td width=\"100\"></td>";
	header_code += "</tr>";
	header_code += "</table>";

	return header_code;
}

function getSubHeader(bereich, sub_bereich)
{
	var header_code = "";
	var blank = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";

	header_code = "<table border=0 width=\"980\" >";
	header_code += "<tr height=\"5\"></tr>";
	header_code += "<tr>";
	header_code += "<td width=\"100\"></td>";
	header_code += "<td align=\"center\">";

	header_code += getSubLink("Overview",bereich,sub_bereich);
	header_code += blank;
	header_code += getSubLink("Public_Stories",bereich,sub_bereich);
	header_code += blank;
	header_code += getSubLink("Private_Stories",bereich,sub_bereich);
	header_code += blank;
	header_code += getSubLink("Romane",bereich,sub_bereich);

	header_code += "</td>";
	header_code += "<td width=\"100\"></td>";
	header_code += "</tr>";
	header_code += "<tr height=\"25\"></tr>";
	header_code += "</table>";


	return header_code;
}


function getFooter()
{
	var footer_code = "";

	footer_code = "<tr height = \"80\">";
	footer_code += "<td width=\"190\" bgcolor = \"#FFFFFF\"></td>";
	footer_code += "<td width=\"10\" bgcolor = \"#FFFFFF\" ></td>";
	footer_code += "<td></td>";
	footer_code += "<td width=\"10\" bgcolor = \"#FFFFFF\" ></td>";
	footer_code += "<td width=\"190\" bgcolor = \"#FFFFFF\" ></td>";
	footer_code += "</tr>";
	footer_code += "<tr height = \"20\">";
	footer_code += "<td width=\"190\" bgcolor = \"#FFFFFF\"></td>";
	footer_code += "<td width=\"10\" bgcolor = \"#FFFFFF\" ></td>";
	footer_code += "<td align=\"right\">";
	footer_code += "<table>";
	footer_code += "<tr>";
	footer_code += "<td></td>";
	footer_code += "<td></td>";
	footer_code += "<td></td>";
	footer_code += "<td><img border=\"0\" src=\"http://www.vowikron.de/images/trenn.jpg\"></td>";
	footer_code += "</tr>";
	footer_code += "</table>";
	footer_code += "</td>";
	footer_code += "<td width=\"10\" bgcolor = \"#FFFFFF\" ></td>";
	footer_code += "<td width=\"190\" bgcolor = \"#FFFFFF\" ></td>";
	footer_code += "</tr>";
	footer_code += "<tr>";
	footer_code += "<td width=\"190\" bgcolor = \"#FFFFFF\"></td>";
	footer_code += "<td width=\"10\" bgcolor = \"#FFFFFF\" ></td>";
	footer_code += "<td align=\"right\">";
	footer_code += "<table>";
	footer_code += "<tr>";
	footer_code += "<td></td>";
	footer_code += "<td width = \"100\" id=\"Text04\">Haftungsausschluß</td>";
	footer_code += "<td width = \"70\" id=\"Text04\">Impressum</td>";
	footer_code += "<td width = \"50\" id=\"Text04\">Kontakt</td>";
	footer_code += "</tr>";
	footer_code += "</table>";
	footer_code += "</td>";
	footer_code += "<td width=\"10\" bgcolor = \"#FFFFFF\" ></td>";
	footer_code += "<td width=\"190\" bgcolor = \"#FFFFFF\" ></td>";
	footer_code += "</tr>";

	return footer_code;
}

function getSide()
{
	var side_code = "";

	side_code = "<td width=\"10\" bgcolor = \"#FFFFFF\" rowspan= \"3\"></td>";
	side_code += "<td id=\"Text03\">&nbsp;</td>";
	side_code += "<td width=\"10\" bgcolor = \"#FFFFFF\" rowspan= \"3\"></td>";
	side_code += "<td width=\"190\" bgcolor = \"#336699\" rowspan= \"3\" valign=\"bottom\"><a  href=\"http://www.kasserver.com\">_</a><a  href=\"http://www.vowikron.de/hpdata/hpdata.html\">_</a></td>";
	side_code += "</tr>";
	side_code += "<tr height = \"10\">";

	return side_code;
}




function getLink(bereich_link,bereich_on)
{
	var header_link = "";
	var name;

	header_link = "<a href=\"";
	switch(bereich_link)
	{
		/****Header**********************/
		case "Home":
			header_link += home_link;
			if(bereich_on == "Home")
			{
				header_link += "\" target=\"_top\" id=\"Text01\"><b> <font color=\"#666666\">Home Sweet Home</font> </b> </a>";
			}
			else
			{
				header_link += "\" target=\"_top\" id=\"Text01\"><b> Home Sweet Home </b> </a>";
			}
			break;
		case "Me":
			header_link += me_link;
			if(bereich_on == "Me")
			{
				header_link += "\" target=\"_top\" id=\"Text01\"><b> <font color=\"#666666\"> Über mich </font> </b> </a>";
			}
			else
			{
				header_link += "\" target=\"_top\" id=\"Text01\"><b>  Über mich  </b> </a>";
			}
			break;
		case "Literatur":
			header_link += literatur_link;
			if(bereich_on == "Literatur")
			{
				header_link += "\" target=\"_top\" id=\"Text01\"><b> <font color=\"#666666\">Literatur</font> </b> </a>";
			}
			else
			{
				header_link += "\" target=\"_top\" id=\"Text01\"><b> Literatur </b> </a>";
			}
			break;
		case "Kronblog":
			header_link += blog_link;
			if(bereich_on == "Kronblog")
			{
				header_link += "\" target=\"_top\" id=\"Text01\"><b> <font color=\"#666666\">KRONblog</font> </b> </a>";
			}
			else
			{
				header_link += "\" target=\"_top\" id=\"Text01\"><b> KRONblog </b> </a>";
			}
			break;
		case "Fotos":
			header_link += fotos_link;
			if(bereich_on == "Fotos")
			{
				header_link += "\" target=\"_top\" id=\"Text01\"><b> <font color=\"#666666\">Fotos</font> </b> </a>";
			}
			else
			{
				header_link += "\" target=\"_top\" id=\"Text01\"><b> Fotos </b> </a>";
			}
			break;
		case "Links":
			header_link += links_link;
			if(bereich_on == "Links")
			{
				header_link += "\" target=\"_top\" id=\"Text01\"><b> <font color=\"#666666\">Links</font> </b> </a>";
			}
			else
			{
				header_link += "\" target=\"_top\" id=\"Text01\"><b> Links </b> </a>";
			}
			break;
		case "Sonstiges":
			header_link += sonstiges_link;
			if(bereich_on == "Sonstiges")
			{
				header_link += "\" target=\"_top\" id=\"Text01\"><b> <font color=\"#666666\">Sonstiges</font> </b> </a>";
			}
			else
			{
				header_link += "\" target=\"_top\" id=\"Text01\"><b> Sonstiges </b> </a>";
			}
			break;
		default:
			break;
	}

	return header_link;

}

function getSubLink(bereich_link,bereich_on,sub_bereich_on)
{
	var header_link = "";
	var name;

	if(bereich_on = "Literatur")
	header_link = "<a href=\"";
	switch(bereich_link)
	{
		/**Sub Header****************************/
		case "Overview":
			header_link += overview_link;
			if(sub_bereich_on == "Overview")
			{
				header_link += "\" target=\"_top\" id=\"Text04\"><b> <font color=\"#666666\">Übersicht</font> </b> </a>";
			}
			else
			{
				header_link += "\" target=\"_top\" id=\"Text04\"><b> Übersicht </b> </a>";
			}
			break;
		case "Public_Stories":
			header_link += public_stories_link;
			if(sub_bereich_on == "Public_Stories")
			{
				header_link += "\" target=\"_top\" id=\"Text04\"><b> <font color=\"#666666\">Geschichten (öffentl.)</font> </b> </a>";
			}
			else
			{
				header_link += "\" target=\"_top\" id=\"Text04\"><b> Geschichten (öffentl.) </b> </a>";
			}
			break;
		case "Private_Stories":
			header_link += private_stories_link;
			if(sub_bereich_on == "Private_Stories")
			{
				header_link += "\" target=\"_top\" id=\"Text04\"><b> <font color=\"#666666\"> Geschichten (privat)</font> </b> </a>";
			}
			else
			{
				header_link += "\" target=\"_top\" id=\"Text04\"><b> Geschichten (privat) </b> </a>";
			}
			break;
		case "Romane":
			header_link += romane_link;
			if(sub_bereich_on == "Romane")
			{
				header_link += "\" target=\"_top\" id=\"Text04\"><b> <font color=\"#666666\">Romane</font> </b> </a>";
			}
			else
			{
				header_link += "\" target=\"_top\" id=\"Text04\"><b> Romane </b> </a>";
			}
			break;

		default:
			alert("Error - " + bereich_link);
			break;
	}

	return header_link;

}


function OnFinish(window,document)
{

	loadLogFiles();
	//window.open("http://www.vowikron.de","_top");

}

function loadLogFiles()
{
	/*var source = "";
	document.fileopener.setFile(window.location.href,"test.txt");
	source = document.fileopener.getFile();
	alert(source);
	*/

	window.location.href = "summary.php";


}



