				
			//HideLink();
			//SetDropDownVisible();
			//SetSelectedItem();

			function HideLink(){
				var link;
				
				link = document.getElementById("LanguageLink");
				link.style.display = "none";
			}

			function SetDropDownVisible(){
				var span = document.getElementById("LanguageSpan");
				
				span.style.display = "inline";
				//span.style.position="relative";	
				//span.style.left="-30px";
			}
				
			function SetSelectedItem(){
				var dropDown = document.getElementById("languageDropDown");
				var ampersand = "&";
				var propertyText = "LanguageId=";
				var langPosInURL;
				var URLLanguage = "";  
				var startPos;
				var endPos;
				var addChar;
				var singleChar;
				var index = 0;
				
				URL=window.location.href;
				langPosInURL = URL.indexOf(propertyText);
				
				if (langPosInURL>0){
					startPos = langPosInURL+propertyText.length;
					endPos = URL.length;
					addChar = 0;
					
					for (i=startPos; i < endPos; i=i+1){
						singleChar = URL.charAt(i);
						if (singleChar == ampersand && addChar == 0){
							addChar = 1;					
						}
						if (addChar == 0){
							URLLanguage = URLLanguage + singleChar;
						}
					}
				}else{
		     			URLLanguage = 1;
				}

				for (i=0; i < dropDown.length; i=i+1){
					if (dropDown.options[i].value == URLLanguage){
						index = i;					
					}
				}
				// alert(index);
				dropDown.selectedIndex = index;
			}
			

			function SubmitDropDown(source, propertyText){
		          
				var ampersand = "&";
				var questionMark = "?";
				var addChar;
				var chosenValue;
				var propPosInURL;
				var newURL
				var newURL1 = "";
				var newURL2 = "";
				var startPos;
				var endPos;
				var singleChar;
						
				oldURL=window.location.href;
				propPosInURL = oldURL.indexOf(propertyText);
				if (propPosInURL>0){
	     			newURL1 = oldURL.substring(0,propPosInURL+propertyText.length);
	     			startPos = propPosInURL+propertyText.length;
					endPos = oldURL.length;
					addChar = 1
					
					for (i=startPos; i < endPos; i=i+1){
						singleChar = oldURL.charAt(i);
						if (singleChar == ampersand){
							addChar = 0;
						}
						if (addChar == 0){
							newURL2 = newURL2 + singleChar;
						}
					}
				}else{
		     			newURL1 = oldURL;
             			if (newURL1.indexOf(questionMark)<=0){
							newURL1 = newURL1 + questionMark;
						}
						if (newURL1.charAt(newURL1.length-1) == questionMark) {
							newURL1 = newURL1 + propertyText; 
						}else{
							newURL1 = newURL1 + ampersand + propertyText;
						}
				}
		               
				chosenValue = source.options[source.selectedIndex].value;
				newURL = newURL1 + chosenValue + newURL2;
				window.location.href= newURL;
			}

			function SetLogOnText(){
			
				var NoScript = document.getElementById("NoScript");
				var Login = document.getElementById("Login");
				var Logout = document.getElementById("Logout");
				var loginCookie = getCookie("Login");
				
				NoScript.style.display = "none";
				if (loginCookie == "True") {
					Login.style.display = "none";
					Logout.style.display = "inline";
				}
				else {
					Login.style.display = "inline";
					Logout.style.display = "none";
				}
			}
			
			function SetTabLogOnText(){
			
				var NoScript = document.getElementById("NoScriptTabLink");
				var Login = document.getElementById("LoginTabLink");
				var Logout = document.getElementById("LogoutTabLink");
				var loginCookie = getCookie("Login");
				
				NoScript.style.display = "none";
				if (loginCookie == "True") {
					Login.style.display = "none";
					Logout.style.display = "inline";
				}
				else {
					Login.style.display = "inline";
					Logout.style.display = "none";
				}
			}
			
			function getCookie(name) {
				var dc = document.cookie;
				var prefix = name + "=";
				var begin = dc.indexOf("; " + prefix);
				if (begin == -1)
				{
					begin = dc.indexOf(prefix);
					if (begin != 0) return null;
				}
				else
				{
					begin += 2;
				}
				var end = document.cookie.indexOf(";", begin);
				if (end == -1)
				{
					end = dc.length;
				}
				return unescape(dc.substring(begin + prefix.length, end));
			}

function getPos(elm) {
    for(var zx=zy=0;elm!=null;zx+=elm.offsetLeft,zy+=elm.offsetTop,elm=elm.offsetParent);
    return {x:zx,y:zy}
	}
function skjulBillede(){
	 				 document.getElementById("billedekasse").visibility="hidden";
	 				 document.getElementById("billedekasse").innerHTML ="";
	 				 SwitchVisibility('filterControl_itemGroupDropDownList', 'false');
	 				 SwitchVisibility('filterControl_timeFilterDropDownList', 'false');
	 				 SwitchVisibility('filterLinkListControl_filterDataList', 'false');
	}
function VisBillede(obj,sti){
					var position = getPos(obj);
					var bk = document.getElementById("billedekasse");
					bk.style.visibility="visible";
					bk.style.position="absolute";
					bk.style.left = position.x + "px"  ;
					bk.style.top = CalcTopPos(position.y, obj) + "px";
					document.getElementById("billedekasse").innerHTML= " <img src=" + sti + " class=gulboks>"
	}
function CalcTopPos(yPos, obj){
	var availHeight = getWindowHeight();
	var imgPopHeight = getPopupHeight(obj.height, obj.width);
	var scrollY = getScrollY();
	var sum = yPos + obj.height + imgPopHeight - scrollY;
	
	if (sum > availHeight) {
		//hide filterboxes if popup image covers them 
		if (document.getElementById('filterControl_itemGroupDropDownList') != null) {
			var filterBox = document.getElementById('filterControl_itemGroupDropDownList');
			var posFilterBox = getPos(filterBox);
			if ((yPos - imgPopHeight) < posFilterBox.y) {
				SwitchVisibility('filterControl_itemGroupDropDownList', 'true');
				SwitchVisibility('filterControl_timeDropDownList', 'true');
			}
		}
		return yPos - imgPopHeight;
	}
	else {
		//hide myLists if they are visible and lowest popup image covers it
		if (document.getElementById('filterLinkListControl_filterDataList') != null) {
			var myListBox = document.getElementById('filterLinkListControl_filterDataList');
			var posMyListBox = getPos(myListBox);
			if ((yPos + obj.height + imgPopHeight) > posMyListBox.y) {
				SwitchVisibility('filterLinkListControl_filterDataList', 'true');
			}
		}
		return yPos + obj.height;
	}
}
function getPopupHeight(imgHeight, imgWidth){
	var rel = imgHeight / imgWidth;
	var imgPopHeight;
	if (imgWidth == 60) {
		imgPopHeight = rel * 160;
	}
	else if (imgWidth == 160) {
		imgPopHeight = rel * 300;
	}
	else {
		//do nothing as its an illegal height
		imgPopHeight = 0;
	} 
	return imgPopHeight;
}
function getWindowHeight() {
	var myWidth = 0, myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	} 
	else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	} 
	else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	}
	return myHeight;
}
function getScrollY() {
	var scrOfY = 0;
	if( typeof( window.pageYOffset ) == 'number' ) {
		//Netscape compliant
		scrOfY = window.pageYOffset;
	} 
	else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
		//DOM compliant
		scrOfY = document.body.scrollTop;
	}
	else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
	    //IE6 standards compliant mode
		scrOfY = document.documentElement.scrollTop;
	}
	return scrOfY;
}
function isObject(a) {
    return (a && typeof a == 'object') || isFunction(a);
}
function SwitchVisibility(element, hide) {
	if (document.getElementById(element) != null) {
		if (hide == 'true') {
			document.getElementById(element).style.visibility = 'hidden';
		}
		else {
			document.getElementById(element).style.visibility = 'visible';
		}
		
	}
}


function TextSearch() { 
	var searchText;
	var searchTextParsed;

	searchText = document.getElementById('searchTextBox').value;
	searchText = encodeURI(searchText);
	searchTextParsed = searchText.replace(/&/g, '%26');
	document.location.href = 'ItemList/ItemList.Aspx?STA=3&FText=' + searchTextParsed ;
} 
        
        
function DoEnter(event) {
    if (event && event.keyCode == 13){
        TextSearch();
    }
    return !(event && event.keyCode == 13);
}

function DoArticleSearch(event) {
    if (event && event.keyCode == 13){
        ArticleSearch();
    }
    return !(event && event.keyCode == 13);
}

function ArticleSearch() { 
	var searchText;
	var searchTextParsed;

	searchText = document.getElementById('articleMenuSearchText').value;
	searchText = encodeURI(searchText);
	searchTextParsed = searchText.replace(/&/g, '%26');
	document.location.href = 'Article/Article.Aspx?ArticleGroupId=&SelectedTab=&article=&search=' + searchTextParsed ;
}
