function notelink(ident,rank){
window.open("/notelink.aspx?id="+ident+"&rank="+rank,"notelink","left=10, top=10, width=400, height=400, resizable=yes, menubar=no, scrollbars=yes, status=yes, location=no");

}
function notelinkbytte(ident, path_info){
window.open("/notelinkbytte.aspx?id="+ident+"&path_info="+path_info,"notelink","left=10, top=10, width=400, height=400, resizable=yes, menubar=no, scrollbars=yes, status=yes, location=no");

}



function setFocus(){
	window.focus();
}

function setAsStartpage(){

style.behavior='url(#default#homepage)';setHomePage('http://www.ABCsiden.dk')

}


function getById(id) {
    return document.getElementById?document.getElementById(id):(document.all?document.all(id):null);
}


var timeout;
function showmenuBox(e,w,h,code) {
	var x = (window.event) ? window.event.x : e.pageX;
	var y = (window.event) ? window.event.y : e.pageY;
	if (document.all) {
		var scroll = getScroll();
		y = y + scroll.y;
	}
	getById('menuBox').style.width = w;
	getById('menuBox').style.height = h;
	getById('menuBoxShadow').style.width = w;
	getById('menuBoxShadow').style.height = h;
	getById('menuBox').style.top = y+10;
	getById('menuBox').style.left = x;
	getById('menuBoxShadow').style.top = y+12;
	getById('menuBoxShadow').style.left = x+2;
	getById('menuBox').innerHTML = code;
	showDiv('menuBox');
	showDiv('menuBoxShadow');

	timeout = setTimeout("hideDiv('menuBox');hideDiv('menuBoxShadow');", 3000);
}

function menuBoxOut(){
    timeout = setTimeout("hideDiv('menuBox');hideDiv('menuBoxShadow');", 1000);
}

function hideDiv(id) {
   getById(id).style.visibility = "hidden";
   getById(id).style.display = "none";
}

function showDiv(id) {
   	getById(id).style.visibility = "visible";
   	getById(id).style.display = "inline";
}

function showMenu() {
}

function getScroll() {
	if (document.all) {
		var ieBox = document.compatMode != "CSS1Compat";
		var cont = ieBox ? document.body : document.documentElement;
		return {x:cont.scrollLeft, y:cont.scrollTop};
	} else {
		return {x:window.pageXOffset, y:window.pageYOffset};
	}
}

/*			//
			appVer = navigator.appVersion.toLowerCase();
			browserName = navigator.appName;
			str = navigator.appVersion;
			browserVer = str.substr(21,2);

			function tb() {
			if(browserName != "Netscape"){
			if(browserVer >= 5){

			posY = findPosition( document.getElementById('img1') );
			// alert(posY);

			FloatMenu.style.top = document.body.scrollTop+posY;
			FloatMenu.style.right = 0;
			FloatMenu.style.visibility = "visible";

			}
			}
			}

			document.getElementById('PageMenu').innerHTML = document.getElementById('HeaderMenu').innerHTML;


			function findPosition( oLink ) {
			if( oLink.offsetParent ) {
				for( var posX = 0, posY = 0; oLink.offsetParent; oLink = oLink.offsetParent ) {
				posX += oLink.offsetLeft;
				posY += oLink.offsetTop;
				}

			} else {

				posX = oLink.x;
				posY = oLink.y;		
			}

			if(document.getElementById('FloatMenu'))
			{

			//	alert('FUNDET');
			}

			document.getElementById('FloatMenu').style.left = posX +'px';
			document.getElementById('FloatMenu').style.top = posY +'px';
			// window.onresize = tb;

			return posY;

			}


			function SetScrollingAd()
			{
				findPosition( document.getElementById('img1'));
			}
*/

// scrolling
var iedom = document.all||document.getElementById

if (iedom) {
document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px"></span>')
}

var names = new Array("clear","partial_clear","partial_cloudy","cloudy","overcast","rain","snow","rain_and_snow","rain_shower","snow_shower","rain_and_snow_shower","thunder","fog","light_snow","light_rain","light_rain_and_snow","thunderstorm_shower","thunderstorm")
var icons = new Array(names.lenght)
                                                                                                                             
for (i=0; i<names.length; i++) {
        icons[names[i]] = new Image()
        icons[names[i]].src = "images/"+names[i]+".gif"
}
                                                                                                                             
function loadCached(name) {
        return icons[name].src
}


function scroll(id, width, height, color, speed, content) {
	this.scrollwidth = width
	this.scrollheight = height
	this.scrollbgcolor = color
	this.scrollspeed = speed
	//this.scrollspeed=(document.all)? scrollspeed : Math.max(1, scrollspeed-1) 
	this.scrollcontent=content
	this.copyspeed = this.scrollspeed
	this.iedom = document.all||document.getElementById

if (this.iedom) {
	span = document.getElementById? document.getElementById("temp") : temp
	span.innerHTML = content
	this.actualwidth=span.offsetWidth
}

if (this.iedom||document.layers){
	with (document){
		document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')
		if (this.iedom){
			write('<div style="position:relative;width:'+this.scrollwidth+';height:'+this.scrollheight+';overflow:hidden;">')
			write('<div style="position:absolute;width:'+this.scrollwidth+';height:'+this.scrollheight+';background-color:'+this.scrollbgcolor+'">')
			write('<div id=' + id +' style="position:absolute;left:0px;top:0px"></div>')
			write('</div></div>')
			this.ie_scroll=document.getElementById? document.getElementById(id) : document.all.id
			this.ie_scroll.style.left=parseInt(this.scrollwidth)+8+"px"
			this.ie_scroll.innerHTML=this.scrollcontent
		}
		else if (document.layers){
			write('<ilayer width='+this.marqueewidth+' height='+this.marqueeheight+' name="ns_marquee" bgColor='+this.marqueebgcolor+'>')
			write('<layer name=' + id + ' left=0 top=0></layer>')
			write('</ilayer>')
			this.ns_scroll=document.ns_scroll.document.id
			this.ns_scroll.left=parseInt(this.scrollwidth)+8
			this.ns_scroll.document.write(this.scrollcontent)
			this.ns_scroll.document.close()
			this.actualwidth=ns_scroll.document.width
		}
		document.write('</td></table>')
	}
}

this.scrollit = function() {
	if (this.iedom){
		if (parseInt(this.ie_scroll.style.left)>(this.actualwidth*(-1)+8)) 
			this.ie_scroll.style.left=parseInt(this.ie_scroll.style.left)-this.copyspeed+"px"
		else 
			this.ie_scroll.style.left=parseInt(this.scrollwidth)+8+"px" 
		
			
	}
	else if (document.layers) {
		if (this.ns_scroll.left>(this.actualwidth*(-1)+8))
			this.ns_scroll.left-=this.copyspeed
		else
			this.ns_scroll.left=parseInt(this.scrollwidth)+8
	}
 }
}
// scrolling end


