// JavaScript Document
function loadUglaHaus(divelement) {
hausar = new Array( );
hausar[0] = new Array(2);
hausar[0]['mynd'] = "http://uglur.nalgun.is/uglur/haus/pedigree-haus.jpg";
hausar[0]['slod'] = "https://www.pedigree.is/";
hausar[1] = new Array(2);
hausar[1]['mynd'] = "http://uglur.nalgun.is/uglur/haus/hundasport.is.jpg";
hausar[1]['slod'] = "http://hundasport.is";
/*
hausar[1] = new Array(2);
hausar[1]['mynd'] = "http://uglur.nalgun.is/uglur/haus/josera-header.jpg";
hausar[1]['slod'] = "https://www.facebook.com/JoseraIsland/";
hausar[2] = new Array(2);
hausar[2]['mynd'] = "http://uglur.nalgun.is/uglur/haus/blekhylki.png";
hausar[2]['slod'] = "http://blekhylki.is";
hausar[2] = new Array(2);
hausar[2]['mynd'] = "http://uglur.nalgun.is/uglur/haus/draumar-is.jpg";
hausar[2]['slod'] = "http://draumar.is";
*/
var num = Math.floor( (Math.random()*hausar.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) {
txt += "" ;
txt += "
\n";
document.getElementById(divelement).innerHTML=txt;
}
}
xmlhttp.send();
}