// JavaScript Document
function loadUglaBordi(divelement, num) {
bordar = new Array( );
bordar[0] = new Array(2);
bordar[0]['mynd'] = "http://uglur.nalgun.is/uglur/bordi/pedigree-sida.jpg";
bordar[0]['slod'] = "https://www.pedigree.is/";
bordar[1] = new Array(2);
bordar[1]['mynd'] = "http://uglur.nalgun.is/uglur/bordi/eldklar-banner-690x55.png";
bordar[1]['slod'] = "https://www.facebook.com/slokkvitaeki/";
/*
bordar[2] = new Array(2);
bordar[2]['mynd'] = "http://uglur.nalgun.is/uglur/bordi/josera-banner.jpg";
bordar[2]['slod'] = "https://www.facebook.com/JoseraIsland/";
bordar[0] = new Array(2);
bordar[0]['mynd'] = "http://uglur.nalgun.is/uglur/bordi/dyrheimar_web.jpg";
bordar[0]['slod'] = "http://royalcanin.is";
bordar[0] = new Array(2);
bordar[0]['mynd'] = "http://uglur.nalgun.is/uglur/bordi/bendir-banner-690x55.png";
bordar[0]['slod'] = "http://bendir.is";
bordar[4] = new Array(2);
bordar[4]['mynd'] = "http://uglur.nalgun.is/uglur/bordi/pedigree.png";
bordar[4]['slod'] = "http://pedigree.is";
*/
// if not selected a certain one
if(num == null)
num = Math.floor( (Math.random()*bordar.length) );
var xmlhttp;
var txt,xx,x,i;
txt = "";
if (window.XMLHttpRequest) {
// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
} else {
// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET","/inc/uglur.txt",true);
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
// for(var i = 0; i < bordar.length ; i++) { }
txt += "" ;
txt += "
\n";
document.getElementById(divelement).innerHTML=txt;
}
}
xmlhttp.send();
}