// JavaScript Document
//
function loadUglaKubbur(divelement) {
kubbar = new Array( );
gbooks = new Array( );
nsites = new Array( );
// others
kubbar[0] = new Array(2);
kubbar[0]['mynd'] = "http://uglur.nalgun.is/uglur/kubbur/eldklar.png";
kubbar[0]['slod'] = "http://eldklar.is";
kubbar[1] = new Array(2);
kubbar[1]['mynd'] = "http://uglur.nalgun.is/uglur/kubbur/nalgun.jpg";
kubbar[1]['slod'] = "http://nalgun.is";
/*
kubbar[0] = new Array(2);
kubbar[0]['mynd'] = "http://uglur.nalgun.is/uglur/kubbur/halla-foder.png";
kubbar[0]['slod'] = "http://bendir.is";
kubbar[2] = new Array(2);
kubbar[2]['mynd'] = "http://uglur.nalgun.is/uglur/kubbur/pedigree-box.png";
kubbar[2]['slod'] = "http://www.ss.is/ss/pedigree/";
*/
// nalgun sites
nsites[0] = new Array(2);
nsites[0]['mynd'] = "http://uglur.nalgun.is/uglur/kubbur/hundasport.is.png";
nsites[0]['slod'] = "http://hundasport.is";
nsites[1] = new Array(2);
nsites[1]['mynd'] = "http://uglur.nalgun.is/uglur/kubbur/hvolpar.is.png";
nsites[1]['slod'] = "http://hundasport.is";
// gudjon audio books
gbooks[0] = new Array(2);
gbooks[0]['mynd'] = "http://uglur.nalgun.is/uglur/kubbur/not.is.jpg";
gbooks[0]['slod'] = "http://not.is";
gbooks[1] = new Array(2);
gbooks[1]['mynd'] = "http://uglur.nalgun.is/uglur/kubbur/hljodvarp.png";
gbooks[1]['slod'] = "http://media.not.is/ferlid";
gbooks[2] = new Array(2);
gbooks[2]['mynd'] = "http://uglur.nalgun.is/uglur/kubbur/vardmenn.png";
gbooks[2]['slod'] = "http://media.not.is/vardmenn";
gbooks[1] = new Array(2);
gbooks[1]['mynd'] = "http://uglur.nalgun.is/uglur/kubbur/bref.jpg";
gbooks[1]['slod'] = "http://media.not.is/bref";
gbooks[2] = new Array(2);
gbooks[2]['mynd'] = "http://uglur.nalgun.is/uglur/kubbur/ordatal-uglur.png";
gbooks[2]['slod'] = "http://media.not.is/ordatal";
gbooks[3] = new Array(2);
gbooks[3]['mynd'] = "http://uglur.nalgun.is/uglur/kubbur/kornelia.png";
gbooks[3]['slod'] = "http://not.is/kornelia";
gbooks[4] = new Array(2);
gbooks[4]['mynd'] = "http://uglur.nalgun.is/uglur/kubbur/frelsisvilji.is.png";
gbooks[4]['slod'] = "http://media.not.is/endurreist";
/*
*/
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 < kubbar.length ; i++) {
txt += "" ;
txt += "
\n";
}
document.getElementById(divelement).innerHTML=txt;
}
}
*/
var num1 = Math.floor( (Math.random()*kubbar.length) );
var num2 = Math.floor( (Math.random()*gbooks.length) );
var num3 = Math.floor( (Math.random()*nsites.length) );
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
txt += "
" ;
txt += "
" ;
txt += "
\n" ;
txt += "\n";
document.getElementById(divelement).innerHTML=txt;
}
}
xmlhttp.send();
}