function picture (src, ratio) {
	this.src = src;
	this.ratio = ratio;
}

//-----------------------------------------------------------------------------

var collagenPath = 'http://people.freenet.de/cassegrain/collagen/';
var collagen = new Array();
collagen[1] = new picture(collagenPath + '01GartenEden.jpg', 1.45);
collagen[2] = new picture(collagenPath + '02InNominiVitaeMortem.jpg', 1.41);
collagen[3] = new picture(collagenPath + '02SesamSohnDesMondesOeffneDich.jpg', 1.4);
collagen[4] = new picture(collagenPath + '03Evoyage.jpg', 1.64);
collagen[5] = new picture(collagenPath + '04Makro.jpg', 1.41);
collagen[6] = new picture(collagenPath + '05LesLegionairesDesSpheres.jpg', 1.61);
collagen[7] = new picture(collagenPath + '06LeViolDeGaia.jpg', 1.55);
collagen[8] = new picture(collagenPath + '07DaeliriumTremens.jpg', 1.57);
collagen[9] = new picture(collagenPath + '08DasIchImSchossDerSeele.jpg', 1.56);
collagen[10] = new picture(collagenPath + '09LursurpationDeJahve.jpg', 1.43);
collagen[11] = new picture(collagenPath + '10DieAetherischeWiedergeburtChristi.jpg', 0.64);
collagen[12] = new picture(collagenPath + '11DaelireSalvatoral.jpg', 0.63);
collagen[13] = new picture(collagenPath + '12PiOderAmRandeDesTempels.jpg', 0.63);
collagen[14] = new picture(collagenPath + '13XXX.jpg', 0.64);
collagen[15] = new picture(collagenPath + '14Phase4.jpg', 0.63);
collagen[16] = new picture(collagenPath + '15DerSiegDesDrachensHeller.jpg', 0.72);

//-----------------------------------------------------------------------------

var collmalPath = 'http://people.freenet.de/cassegrain/collmal/';
var collmal = new Array();
collmal[1] = new picture(collmalPath + '01SoFreiNochNie.jpg', 1.37);
collmal[2] = new picture(collmalPath + '02DerriereLaRealite.jpg', 1.43);
collmal[3] = new picture(collmalPath + '03AufBruch.jpg', 1.3);
collmal[4] = new picture(collmalPath + '04SiegfriedEtIncarnatusEst.jpg', 0.7);
collmal[5] = new picture(collmalPath + '05LePenseurAbstrait.jpg', 0.71);

//-----------------------------------------------------------------------------

var fotoPath = 'http://people.freenet.de/cassegrain/fotos/';
var fotos = new Array();
fotos[1] = new picture(fotoPath + 'a001.jpg', 1.5);
fotos[2] = new picture(fotoPath + 'a002.jpg', 1.5);
fotos[3] = new picture(fotoPath + 'a003.jpg', 0.67);
fotos[4] = new picture(fotoPath + 'a004.jpg', 1.5);
fotos[5] = new picture(fotoPath + 'a005.jpg', 1.5);
fotos[6] = new picture(fotoPath + 'a006.jpg', 1.5);
fotos[7] = new picture(fotoPath + 'a007.jpg', 1.5);
fotos[8] = new picture(fotoPath + 'a008.jpg', 1.5);
fotos[9] = new picture(fotoPath + 'a009.jpg', 1.5);
fotos[10] = new picture(fotoPath + 'a010.jpg', 1.5);
fotos[11] = new picture(fotoPath + 'a011.jpg', 1.5);
fotos[12] = new picture(fotoPath + 'a012.jpg', 1.5);
fotos[13] = new picture(fotoPath + 'a012a.jpg', 0.67);
fotos[14] = new picture(fotoPath + 'a013.jpg', 0.67);
fotos[15] = new picture(fotoPath + 'a014.jpg', 0.67);
fotos[16] = new picture(fotoPath + 'a015.jpg', 0.67);
fotos[17] = new picture(fotoPath + 'a016.jpg', 1.5);
fotos[18] = new picture(fotoPath + 'a017.jpg', 1.5);
fotos[19] = new picture(fotoPath + 'a018.jpg', 1.5);
fotos[20] = new picture(fotoPath + 'a019.jpg', 1.5);
fotos[21] = new picture(fotoPath + 'a020.jpg', 1.5);
fotos[22] = new picture(fotoPath + 'a020a.jpg', 1.5);
fotos[23] = new picture(fotoPath + 'a021.jpg', 1.5);
fotos[24] = new picture(fotoPath + 'a022.jpg', 1.5);
fotos[25] = new picture(fotoPath + 'a023.jpg', 1.5);
fotos[26] = new picture(fotoPath + 'a024.jpg', 0.67);
fotos[27] = new picture(fotoPath + 'a025.jpg', 0.67);
fotos[28] = new picture(fotoPath + 'a026.jpg', 1.5);
fotos[29] = new picture(fotoPath + 'a027.jpg', 1.5);
fotos[30] = new picture(fotoPath + 'a028.jpg', 1.5);
fotos[31] = new picture(fotoPath + 'a029.jpg', 1.5);
fotos[32] = new picture(fotoPath + 'a030.jpg', 1.5);
fotos[33] = new picture(fotoPath + 'a032.jpg', 1.5);
fotos[34] = new picture(fotoPath + 'a033.jpg', 1.5);

//-----------------------------------------------------------------------------

var malereiPath  = 'http://people.freenet.de/cassegrain/malerei/';
var malereien = new Array();
malereien[1] = new picture(malereiPath + '01FeerieMatinale.jpg', 1.39);
malereien[2] = new picture(malereiPath + '02GedankenGang.jpg', 1.44);
malereien[3] = new picture(malereiPath + '03MondeElementaire2.jpg', 1.4);
malereien[4] = new picture(malereiPath + '04MondeElementaire.jpg', 1.41);
malereien[5] = new picture(malereiPath + '04vvv.jpg', 1.44);
malereien[6] = new picture(malereiPath + '05LaSylphe.jpg', 1.42);
malereien[7] = new picture(malereiPath + '06ImArchaiwardasWort.jpg',1.42 );
malereien[8] = new picture(malereiPath + '07KurzeSichtAufWeitemBlick.jpg', 1.43);
malereien[9] = new picture(malereiPath + '08ParasitesSpirituels.jpg', 1.44);
malereien[10] = new picture(malereiPath + '09DerSiegDesAdlers.jpg', 1.4);
malereien[11] = new picture(malereiPath + '10LeLotusBleuOuLaMortDeLame.jpg', 1.39);
malereien[12] = new picture(malereiPath + '11AmourPlatonienOuLaDeesseIn-vent-ee.jpg', 1.42);
malereien[13] = new picture(malereiPath + '12NaissanceDAhriman.jpg', 1.41);
malereien[14] = new picture(malereiPath + '13WillIch.jpg', 0.72);
malereien[15] = new picture(malereiPath + '14DerStolz.jpg', 0.72);

//-----------------------------------------------------------------------------

var moebelPath = 'http://people.freenet.de/cassegrain/moebel/';
var moebel = new Array();
moebel[1] = new picture(moebelPath + '01TuerBleu.jpg', 0.67);
moebel[2] = new picture(moebelPath + '02EckregalFlur.jpg', 0.6);
moebel[3] = new picture(moebelPath + '03EcktischFlur.jpg', 1.47);
moebel[4] = new picture(moebelPath + '04EcktischNat.jpg', 1.2);
moebel[5] = new picture(moebelPath + '05ComputerTisch.jpg', 0.64);
moebel[6] = new picture(moebelPath + '06TischStuehleKlar.jpg', 1.09);
moebel[7] = new picture(moebelPath + '07BettThi.jpg', 1.3);
moebel[8] = new picture(moebelPath + '08TerrassenBank1.jpg', 1.02);
moebel[9] = new picture(moebelPath + '09Drachenbett.jpg', 1.43);
moebel[10] = new picture(moebelPath + '10BettNatSilber.jpg', 1.41);
moebel[11] = new picture(moebelPath + '11StuhlNatSilber.jpg', 0.65);
moebel[12] = new picture(moebelPath + '12EcktischBad.jpg', 0.67);
moebel[13] = new picture(moebelPath + '13Fernsehhalterung.jpg', 0.66);
moebel[14] = new picture(moebelPath + '14darioregal1.jpg', 0.69);
moebel[15] = new picture(moebelPath + '15EckregalSan2.jpg', 0.69);
moebel[16] = new picture(moebelPath + '16thuerext.jpg', 0.65);
moebel[17] = new picture(moebelPath + '17thbett2.jpg', 0.67);
moebel[18] = new picture(moebelPath + '18thcomptisch1.jpg', 0.68);
moebel[19] = new picture(moebelPath + '19thcomptisch2.jpg', 1.48);
moebel[20] = new picture(moebelPath + '20thzim1.jpg', 1.45);
moebel[21] = new picture(moebelPath + '21thregal1.jpg', 0.67);

//-----------------------------------------------------------------------------

var schmuckPath = 'http://people.freenet.de/cassegrain/schmuck/';
var schmuck = new Array();
schmuck[1] = new picture(schmuckPath + '01HalsketteGrueneStein.jpg', 1.7);
schmuck[2] = new picture(schmuckPath + '02HalsketteGrueneSteinBambu.jpg', 1.62);
schmuck[3] = new picture(schmuckPath + '03HalsketteMitStacheln.jpg', 1.51);
schmuck[4] = new picture(schmuckPath + '04HalsketteOvalStein.jpg', 0.75);
schmuck[5] = new picture(schmuckPath + '05IndianaHalskette3Stueck1.jpg', 1.48);
schmuck[6] = new picture(schmuckPath + '06Halzketten.jpg', 1.46);
schmuck[7] = new picture(schmuckPath + '07SteinketteLang.jpg', 1.45);
schmuck[8] = new picture(schmuckPath + '08ChinaHalskette.jpg', 0.71);
schmuck[9] = new picture(schmuckPath + '09Palette.jpg', 0.69);
schmuck[10] = new picture(schmuckPath + '10Palette1.jpg', 1.05);
schmuck[11] = new picture(schmuckPath + '11Palette3.jpg', 0.68);
schmuck[12] = new picture(schmuckPath + '12PaletteHalzkette.jpg', 0.75);
schmuck[13] = new picture(schmuckPath + '13Palette5.jpg', 0.89);
schmuck[14] = new picture(schmuckPath + '14PaletteHalzkette93.jpg', 0.83);
schmuck[15] = new picture(schmuckPath + '15Palette4.jpg', 0.78);
schmuck[16] = new picture(schmuckPath + '16PaletteHalzkette3.jpg', 1.46);
schmuck[17] = new picture(schmuckPath + '17PaletteHalzkette4.jpg', 1.41);
schmuck[18] = new picture(schmuckPath + '18PaletteHalzkette5.jpg', 1.45);
schmuck[19] = new picture(schmuckPath + '19PaletteHalzkette6.jpg', 1.38);
schmuck[20] = new picture(schmuckPath + '20PaletteHalzkette7.jpg', 1.51);

//-----------------------------------------------------------------------------

function startAction(cellId, action, currentArray) {
  stopAction();
  parent.currentCell = 1;
  parent.contentCell = cellId;
  parent.currentArray = currentArray;
  parent.currentAction = action;
  parent.currentMethod = window.setInterval(action, parent.intervalLength);
}

//-----------------------------------------------------------------------------

function stopAction() {
  window.clearInterval(parent.currentMethod);
  parent.currentAction = null;
}

//-----------------------------------------------------------------------------

function showPictures() {
  var localArray = new Array();
  switch (parent.currentArray){
    case "collagen":
	  localArray = collagen;
	  break;
    case "collmal":
      localArray = collmal;
	  break;
    case "malereien":
      localArray = malereien;
	  break;
	case "fotos":
	  localArray = fotos;
	  break;
	case "moebel":
	  localArray = moebel;
	  break;
	case "schmuck":
	  localArray = schmuck;
	  break;
  }
  cellNode = document.getElementById(parent.contentCell);
  if (parent.currentCell >= localArray.length) {
  	parent.currentCell = 1;
  }
  cellNode.setAttribute("src", "pictures.html");
}

//-----------------------------------------------------------------------------

function writePicture() {
  switch (parent.currentArray){
    case "collagen":
	  localArray = collagen;
	  break;
    case "collmal":
      localArray = collmal;
	  break;
    case "malereien":
      localArray = malereien;
	  break;
	case "fotos":
	  localArray = fotos;
	  break;
	case "moebel":
	  localArray = moebel;
	  break;
	case "schmuck":
	  localArray = schmuck;
	  break;
  }
  imgWidth = Math.round(315 * localArray[parent.currentCell].ratio);
  imgHigth = '315';
  document.writeln("<img src=\"" + localArray[parent.currentCell].src + "\" height=\"" + imgHigth + "\" width=\"" + imgWidth + "\"");
  parent.currentCell++;
}

//-----------------------------------------------------------------------------

function changeInterval() {
  parent.intervalLength = document.getElementById("intervalInput").value * 1000;
  if (parent.currentAction) {
    startAction(parent.contentCell, parent.currentAction, parent.currentArray);
  }
}

//-----------------------------------------------------------------------------

function showStatic(CellId, src) {
  stopAction();
  parent.currentMethod = null;
  var cellNode = document.getElementById(CellId);
  cellNode.setAttribute("src", src);
}
