masterspeed = 1500;
arrText = new Array("leefbare dorpen", "lage lasten, eerlijk verdeeld", "open en eerlijk bestuur", "voor alle dorpen", "huizen voor starters", "aangepaste ouderenhuisvesting", "oog voor natuur en milieu", "goede wegen tussen de dorpen", "basisvoorzieningen in eigen dorp", "zuinig op streek en historie", "minder praten, meer doen", "verzorgd openbaar groen", "goed onderhoud van wegen");
var i = 0;

function dynTextBox()
{
	appendDiv("idBody", "idBox", "absolute", 440, 13, 2, 300, 29, "#ffffff");
	appendDiv("idBox", "idTxtDiv", "absolute", 10, 5);
	buildTxtPar("idTxtDiv", "idPar1", "left", styArialBold12, "minder praten, meer doen");
}

function showText() 
{
	removeAllChilds("idPar1");
	appendText("idPar1", arrText[i]);
	
	if(i < arrText.length - 1) i++;
	else i=0;
	
	setTimeout("showText()", masterspeed);
};

// ***** Document Element Library *****

function buildTxtPar(motherName, idPar, alignPar, arrFontStyle, text)
{
	par = document.createElement("p");
	par.setAttribute("id", idPar);
	par.setAttribute("align", alignPar);
	for(q=0; q<arrFontStyle.length; q++) par.style[arrFontAttr[q]] = arrFontStyle[q];
	par.style.marginTop = 0;
	par.style.marginBottom = 0;
	childTxt = document.createTextNode(text);
	par.appendChild(childTxt);
	
	mother = document.getElementById(motherName);
	mother.appendChild(par);
}

function removeAllChilds(mother)
{
	par = document.getElementById(mother);
	
	while(par.childNodes.length != 0)
	{		
		for(j=0; j<par.childNodes.length; j++)
		{
			oldChild = par.childNodes[j];
			//alert("child " + par.childNodes[j].id + " removed");
			if(oldChild) par.removeChild(oldChild);
		}
	}
}

function appendText(motherName, text)
{
	//alert("txt= " + motherName);
	txt = document.getElementById(motherName);
	//for(j=0; j<arrFontStyle.length; j++) txt.style[arrFontAttr[j]] = arrFontStyle[j];
	childTxt = document.createTextNode(text);
	txt.appendChild(childTxt);
}

function appendDiv(motherName, idDiv, divPosition, divLeft, divTop, divZ, divWidth, divHeight, divBckgndColor)
{
	div = document.createElement("div");
	div.setAttribute("id", idDiv);
	//div.style.position = divPos;
	div.style.position = divPosition;
	div.style.left = divLeft + "px";
	div.style.top = divTop + "px";
	if(divZ) div.style.zIndex = divZ;
	if(divWidth) div.style.width = divWidth + "px";
	if(divHeight) div.style.height = divHeight + "px";
	if(divBckgndColor) div.style.backgroundColor = divBckgndColor;

	mother = document.getElementById(motherName);
	mother.appendChild(div);
}

// *** Style array's for font styles

arrFontAttr = new Array("fontFamily", "fontSize", "color", "fontWeight", "fontStyle");

styArial = new Array
(
	"Arial, Sans Serif",
	"10pt",
	"#000000",
	"normal",
	"normal"
);

styArialBold = new Array
(
	"Arial, Sans Serif",
	"10pt",
	"#000000",
	"bold",
	"normal"
);

styArialBold12 = new Array
(
	"Arial, Sans Serif",
	"12pt",
	"#000000",
	"bold",
	"normal"
);

