var ie = document.all?1:0;
var w3c = document.getElementById?1:0;
var ns4 = document.layers?1:0;

var nextPic = new Image();
var index = 0;

var comm = new Array();
var pix = new Array();

comm[0] = '#1: Orthopäden- und Unfallchirurgenkongress in Berlin 2006';
pix[0] = '../images/events/ref_10.jpg';
comm[1] = '#2: Orthopäden- und Unfallchirurgenkongress in Berlin 2006';
pix[1] = '../images/events/ref_11.jpg';
comm[2] = '#3: Orthopäden- und Unfallchirurgenkongress in Berlin 2006';
pix[2] = '../images/events/ref_12.jpg';
comm[3] = '#4: Orthopäden- und Unfallchirurgenkongress in Berlin 2006';
pix[3] = '../images/events/ref_13.jpg';
comm[4] = '#5: Orthopäden- und Unfallchirurgenkongress in Berlin 2006';
pix[4] = '../images/events/ref_14.jpg';
comm[5] = '#6: Mail Order World in Wiesbaden 2006';
pix[5] = '../images/events/ref_15.jpg';
comm[6] = '#7: Versandhandelskongress in Wiesbaden 2006';
pix[6] = '../images/events/ref_16.jpg';
comm[7] = '#8: ZELLCHEMING in Wiesbaden 2006';
pix[7] = '../images/events/ref_05.jpg';
comm[8] = '#9: ZELLCHEMING in Wiesbaden 2006';
pix[8] = '../images/events/ref_06.jpg';
comm[9] = '#10: ZELLCHEMING in Wiesbaden 2006';
pix[9] = '../images/events/ref_07.jpg';
comm[10] = '#11: ZELLCHEMING in Wiesbaden 2006';
pix[10] = '../images/events/ref_08.jpg';
comm[11] = '#12: ZELLCHEMING in Wiesbaden 2006';
pix[11] = '../images/events/ref_09.jpg';
comm[12] = '#13: BASLER STORE Eröffnung in Frankfurt, Aachen und Regensburg (Oktober 2005 & Januar 2006)';
pix[12] = '../images/events/ref_01.jpg';
comm[13] = '#14: BASLER STORE Eröffnung in Frankfurt, Aachen und Regensburg (Oktober 2005 & Januar 2006)';
pix[13] = '../images/events/ref_02.jpg';
comm[14] = '#15: WORLD OF EVENTS in den Rhein-Main-Hallen/<wbr>Wiesbaden (Februar 2006)';
pix[14] = '../images/events/ref_03.jpg';
comm[15] = '#16: WORLD OF EVENTS in den Rhein-Main-Hallen/<wbr>Wiesbaden (Februar 2006)';
pix[15] = '../images/events/ref_04.jpg';




function changePic(direction) {
 index += direction;
 if(index > pix.length - 1) index = 0;
 else if(index < 0) index = pix.length - 1;
 nextPic.src = pix[index];
 if(ie||w3c) {
 document.getElementsByName('change')[0].src = nextPic.src;
 document.getElementById('txt').innerHTML = comm[index];
 }

 else if(ns4) {
 document['bilder'].document.change.src = nextPic.src;
 with(document.txt.document) {
 open();
 write(comm[index]);
 close();
  }
 }
}