// EOL set to Windows/DOS; for our non-unix friends.   :)

//a=b=c=0;d=1;fs=13;min=11;max=22;   // a,b,c,d: counters; fs: fontsize

function ali(){   // Align tekst
 a=a+1;myObj=document.getElementById("inh");
 document.getElementById("align").value=a;
 switch(a){
  case 1:myObj.style.textAlign="left";break;
  case 2:a=0;myObj.style.textAlign="justify"}}

function bac(){   // Background
 b=b+1;myObj=document.getElementById("inh");
 document.getElementById("background").value=b;
 switch(b){
  case 1:myObj.style.backgroundImage="url(../images/ba2.gif)";
         myObj.style.backgroundRepeat="repeat";break;
  case 2:myObj.style.backgroundImage="url(../images/fill.gif)";
         myObj.style.backgroundRepeat="repeat";break;
  case 3:myObj.style.backgroundImage="url(../images/ba3.gif)";
         myObj.style.backgroundRepeat="repeat";break;
  case 4:myObj.style.backgroundImage="url(../images/fill_yellow.gif)";
         myObj.style.backgroundRepeat="repeat";break;
  case 5:b=0;myObj.style.backgroundImage="url(../images/ba1.gif)";
         myObj.style.backgroundRepeat="repeat-y"}}

function cfo(){   // Color font
 c=c+1;myObj=document.getElementById("inh");
 document.getElementById("color").value=c;
 switch(c){
  case 1:myObj.style.color="#000066";break;
  case 2:myObj.style.color="#002200";break;
  case 3:myObj.style.color="#440011";break;
  case 4:c=0;myObj.style.color="#000000"}}

function go() {   // Navigation trigger
window.location=document.getElementById("nav").value+".html"}

function lar(){   // "larger" font; "big"[ger] is reserved word
 if(fs<max){
	fs=fs+1;document.getElementById("inh").style.fontSize=fs+"pt";
	if ((navigate_action_links == "inhoud") || (navigate_action_links == "navigate_hoofdstuk"))
	{
		document.getElementById("inh_left").style.fontSize=fs+"pt";
	}
	if ((navigate_action_rechts == "inhoud") || (navigate_action_rechts == "navigate_hoofdstuk"))
	{
		document.getElementById("inh_right").style.fontSize=fs+"pt";
	}} 
	document.getElementById("fontsize").value=fs;
}

function sma(){   // Smaller font
 if(fs>min){
	fs=fs-1;document.getElementById("inh").style.fontSize=fs+"pt";
	if ((navigate_action_links == "inhoud") || (navigate_action_links == "navigate_hoofdstuk"))
	{
		document.getElementById("inh_left").style.fontSize=fs+"pt";
	}
	if ((navigate_action_rechts == "inhoud") || (navigate_action_rechts == "navigate_hoofdstuk"))
	{
		document.getElementById("inh_right").style.fontSize=fs+"pt";
	}} 
	document.getElementById("fontsize").value=fs; 
}

function tog(){   // Toggle font
 d=d+1;myObj=document.getElementById("inh");
 document.getElementById("fontfamily").value=d; 
 switch(d){
  case 1:myObj.style.fontFamily="Arial";break;
  case 2:myObj.style.fontFamily="Garamond";break;
  case 3:myObj.style.fontFamily="Times";break;
  case 4:myObj.style.fontFamily="Berling";break;
  case 5:myObj.style.fontFamily="Frutiger Linotype";break;
  case 6:myObj.style.fontFamily="Lucida Sans Typewriter";break;
  case 7:d=0;myObj.style.fontFamily="Courier"}}