var content="<BODY ";
var start="TEXT=#000000 LINK=#89deff VLINK=#89deff onresize='self.location.href=self.location.href;'>";
var standartBorder=" BORDER=0 CELLSPACING=0 CELLPADDING=0";
var type="";
var border="";
var atributes="vcbv";
var cellStandart="";
var head="halb";
var head1m='halb';
var head1r="halb";
var NEW="NEW";
var ADD="ADD";
var CELL="CELL";
var DUO="DUO";


layerX=0;
last=0;
gear=100;

function contentAdd(newContent){
	content+=newContent;
	if (content.length>0){
		document.write(content);
		content="";
	}
}
//
//tables section
//   vertical
//
function tVopen(type,tAtributes,tAtributes2){
	cellExtension="";
	//alert(type+tVatributes+atributes);
	if (type==null) atributes=standartBorder;
	if (type=="NEW") atributes=tAtributes;
	if (type=="ADD") atributes= standartBorder+" "+tAtributes;
	if (type=="CELL") {atributes=standartBorder;cellExtension=tAtributes;}
	if (type=="DUO") {atributes=tAtributes;cellExtension=tAtributes2;}
	//alert(atributes+cellExtension);
	contentAdd("<TABLE "+atributes+"><TR><TD "+cellExtension+">");
}

function tVnext(tAtributes){
	if (tAtributes!=null) atributes=tAtributes;
	else atributes="";
	contentAdd("</TD></TR><TR><TD "+atributes+">");
}

function tVclose(){
	contentAdd("</TD></TR></TABLE>");
}
//
//   horizontal
//
function tHopen(type,tAtributes){
	cellExtension="";
	//alert(type+tAtributes+atributes);
	if (type==null) atributes=standartBorder;
	if (type=="NEW") atributes=tAtributes;
	if (type=="ADD") atributes= standartBorder+" "+tAtributes;
	if (type=="CELL") {atributes=standartBorder;cellExtension=tAtributes;}
	if (type=="DUO") {atributes=tAtributes;cellExtension=tAtributes2;}
	//alert(atributes+cellExtension);
	contentAdd("<TABLE "+atributes+"><TR><TD "+cellExtension+">");
}

function tHnext(tAtributes){
	if (tAtributes!=null) atributes=tAtributes;
	else atributes="";
	contentAdd("</TD><TD "+atributes+">");
}

function tHclose(){
	contentAdd("</TD></TR></TABLE>");
}

function nb(){
	contentAdd("&nbsp;");
}

function head1(type,titel){
	tHopen("NEW","BORDER=0 Cellspacing=0 cellpadding=0");
		contentAdd("<img src='"+type+"Links.gif'>");
	tHnext("background='"+type+"Mitte.gif' style='font-size:20;'");
		contentAdd(titel);
	tHnext();
		contentAdd("<img src='"+type+"Rechts.gif'>");
	tHclose();
}

function c1open(type,contentLocal){
	tHopen();
		contentAdd("<img src='"+type+"ol.gif'>");
	tHnext("background='"+type+"o.gif'");
		nb();
	tHnext();
		contentAdd("<img src='"+type+"or.gif'>");
	tVnext("background='"+type+"l.gif'");
		nb();
	tHnext("bgcolor=white");
		if (contentLocal!=null){
			contentAdd(contentLocal);
			c1close(type);
		}
}
function c1close(type){
	tHnext("background='"+type+"r.gif'");
	        nb();
	tVnext();
		contentAdd("<img src='"+type+"ul.gif'>");
	tHnext("background='"+type+"u.gif'");
		nb();
	tHnext();
		contentAdd("<img src='"+type+"ur.gif'>");
	tHclose();
}

function startHTML(type){
	if (type==null) contentAdd(start);
	else contentAdd(type+">");
}
function endHTML(){
	contentAdd('</BODY>');
	document.write(content);
}
function scollDown(circleX)
{	change=circleX-last;
	if (change==1) layerX+=gear;
	else if (change==-1) layerX-=gear;
	else if (change<0)layerX+=gear;
	else if (change>0)layerX-=gear;

	document.frames["content"].scrollTo(layerX,layerX);
	last=circleX;
}

