// JavaScript Document

// Konstruktor für Foto()
function Foto(pwidth, pheight) {
	this.width = pwidth;
	this.height = pheight;
	this.title = '';
	this.src = '';
	this.author = '';
	this.copyright = '';
	this.comment = '';
	this.date = '';
	this.thumb = new Image();
} 

function toggleDisplay(id, id2) {
  if(document.getElementById(id).style.display == "none") {
    document.getElementById(id).style.display = "inline"
	document.getElementById(id2).class = "togglelink_min"
  } else {
    document.getElementById(id).style.display = "none"
	document.getElementById(id2).class = "togglelink_max"
  }
}

// für Filmstreifen
// vor und zurückblättern
function blaettern(richtung) {
  lastpage = Math.ceil((imageinfo.length - 1) / anz);
  page = page + richtung;
  if (page > lastpage) { page = 1; }
  else if (page < 1) { page = lastpage ; }
  
  document.getElementById('filmstrip_border_oben').innerHTML = "N&deg;" + page +"/"+ lastpage;

  change_thumbs(page, anz, imageinfo);  
}

function alertTest() { alert('Test') }

function changeFontSize(size) {
	if (!document.styleSheets) return;
	if (document.styleSheets[1].cssRules) {
		var theRule = document.styleSheets[1].cssRules[0];
		}
	else if (document.styleSheets[1].rules) {
		var theRule = document.styleSheets[1].rules[0]
		}
	else { return; }
	theRule.style.fontSize = size;
}
