//Denna javaScriptsfil används på de statiska sidorna på hemsidan.

/* Denna lilla funktion genomför så att man kan se vilken webläsare så att rätt metod
*  för javascriptet används.
*/

ie = (document.all) ? true:false; // IE4+
dom = ((document.getElementById) && (!ie)) ? true:false; // Mozilla

/*
 * Lägger till en händelse lyssnare som skall fördela rätt funktion 
 * beroende på vilken webbläsare klienten använder
 */

function setEventById(id, ev, fu) {
  
  if(dom) {
    document.getElementById(id).addEventListener(ev, fu, false);
  } 

  if(ie) {
    document.getElementById(id).attachEvent('on' + ev, fu);
  }

}//setEventById


//lägger till lyssnare för sidlänkarna....
//Dessa anrop gör så att ett nytt fönster öppnas när någon av dessa id-nummer anropas

setEventById('b1', 'click', 
	new Function("window.open('http://www.dsv.su.se/~rebe-hol/ges/ridlager/bilder/bild1.jpg', 'bild', 'height=400,width=400,resizable=no,toolbars=no')"));

setEventById('b2', 'click', 
	new Function("window.open('http://www.dsv.su.se/~rebe-hol/ges/ridlager/bilder/bild2.jpg', 'bild', 'height=400,width=400,resizable=no,toolbars=no')"));

setEventById('b3', 'click', 
	new Function("window.open('http://www.dsv.su.se/~rebe-hol/ges/ridlager/bilder/bild3.jpg', 'bild', 'height=400,width=400,resizable=no,toolbars=no')"));

setEventById('b4', 'click', 
	new Function("window.open('http://www.dsv.su.se/~rebe-hol/ges/ridlager/bilder/bild4.jpg', 'bild', 'height=400,width=400,resizable=no,toolbars=no')"));

setEventById('b5', 'click', 
	new Function("window.open('http://www.dsv.su.se/~rebe-hol/ges/ridlager/bilder/bild5.jpg', 'bild', 'height=400,width=400,resizable=no,toolbars=no')"));

setEventById('b6', 'click', 
	new Function("window.open('http://www.dsv.su.se/~rebe-hol/ges/ridlager/bilder/bild6.jpg', 'bild', 'height=400,width=400,resizable=no,toolbars=no')"));

setEventById('b7', 'click', 
	new Function("window.open('http://www.dsv.su.se/~rebe-hol/ges/ridlager/bilder/bild7.jpg', 'bild', 'height=400,width=400,resizable=no,toolbars=no')"));

setEventById('b8', 'click', 
	new Function("window.open('http://www.dsv.su.se/~rebe-hol/ges/ridlager/bilder/bild8.jpg', 'bild', 'height=400,width=400,resizable=no,toolbars=no')"));

setEventById('b9', 'click', 
	new Function("window.open('http://www.dsv.su.se/~rebe-hol/ges/ridlager/bilder/bild9.jpg', 'bild', 'height=400,width=400,resizable=no,toolbars=no')"));

setEventById('b10', 'click', 
	new Function("window.open('http://www.dsv.su.se/~rebe-hol/ges/ridlager/bilder/bild10.jpg', 'bild', 'height=400,width=400,resizable=no,toolbars=no')"));

setEventById('b11', 'click', 
	new Function("window.open('http://www.dsv.su.se/~rebe-hol/ges/ridlager/bilder/bild11.jpg', 'bild', 'height=400,width=400,resizable=no,toolbars=no')"));

setEventById('b12', 'click', 
	new Function("window.open('http://www.dsv.su.se/~rebe-hol/ges/ridlager/bilder/bild12.jpg', 'bild', 'height=400,width=400,resizable=no,toolbars=no')"));

setEventById('b13', 'click', 
	new Function("window.open('http://www.dsv.su.se/~rebe-hol/ges/ridlager/bilder/bild13.jpg', 'bild', 'height=400,width=400,resizable=no,toolbars=no')"));

setEventById('b14', 'click', 
	new Function("window.open('http://www.dsv.su.se/~rebe-hol/ges/ridlager/bilder/bild14.jpg', 'bild', 'height=400,width=400,resizable=no,toolbars=no')"));

setEventById('b15', 'click', 
	new Function("window.open('http://www.dsv.su.se/~rebe-hol/ges/ridlager/bilder/bild15.jpg', 'bild', 'height=400,width=400,resizable=no,toolbars=no')"));

setEventById('b16', 'click', 
	new Function("window.open('http://www.dsv.su.se/~rebe-hol/ges/ridlager/bilder/baksida1.jpg', 'bild', 'height=400,width=400,resizable=no,toolbars=no')"));

