function TelenorChangeBG(elem,bg){elem.tempBG=elem.style.backgroundImage;elem.style.backgroundImage='url('+bg+')';}
function TelenorRevertBG(elem){elem.style.backgroundImage=elem.tempBG;}
var Sonofon={$:function(sId){return document.getElementById(sId)!=null?document.getElementById(sId):false;},createElement:function(sType,oConfig){var elm=document.createElement(sType);for(p in oConfig){if(p=="CSSClass"){elm.className=oConfig[p];}else if(p=="content"){try{elm.innerHTML=oConfig[p];}catch(e){}}else{elm.setAttribute(p,oConfig[p]);}}
document.body.appendChild(elm);return elm;},getAbsLeft:function(o){var iY=0;while(o.offsetParent){iY+=o.offsetLeft;o=o.offsetParent;}
return iY;},getAbsTop:function(o){var iX=0;while(o.offsetParent){iX+=o.offsetTop;o=o.offsetParent;}
return iX;},Page:{Flow:{initialize:function(){$(".options").addClass("hidden");var curtains={open:""};$("#choice01-radio").click(function(){if(curtains.open!=this.id){$("#choice01-options").removeClass("hidden");$("#choice01-options").slideDown("slow");$("#choice01").removeClass("dimmed");if(curtains.open!=""){$("#choice02-options").slideUp("slow");}
$("#choice02").addClass("dimmed");curtains.open=this.id;}});$("#choice02-radio").click(function(){if(curtains.open!=this.id){if(curtains.open!=""){$("#choice01-options").slideUp("slow");}
$("#choice01").addClass("dimmed");$("#choice02-options").removeClass("hidden");$("#choice02-options").slideDown("slow");$("#choice02").removeClass("dimmed");curtains.open=this.id;}});}},GenericExpandList:{initialize:function(){$("ul.list-element-expand div.answer").hide();$("ul.list-element-expand div.hr-dotted").hide();$("ul.list-element-expand a.open").each(function(){this.setAttribute("status","collapsed")});$("ul.list-element-expand a.open").click(function(){if(this.getAttribute("status")=="collapsed"){$(".answer",this.parentNode).slideDown("slow");$(".hr-dotted",this.parentNode).show();this.setAttribute("status","expanded");}else{$(".answer",this.parentNode).slideUp("slow");$(".hr-dotted",this.parentNode).hide();this.setAttribute("status","collapsed");}
return false;});$("ul.list-element-expand a.close").click(function(){$(this.parentNode).slideUp("slow");$(".hr-dotted",this.parentNode.parentNode).hide();$(".open",this.parentNode.parentNode).attr("status","collapsed");return false;});}},Switcher:{show:function(oConfig){$("#"+oConfig.mother+" .hidden").removeClass("hidden");return false;},hide:function(oConfig){$("#"+oConfig.mother+" .toggle-target").addClass("hidden");return false;},toggleCheckBox:function(oConfig){var o=oConfig.thisRef;if(o.getAttribute("state")!="expanded"){$("#"+oConfig.mother).removeClass("hidden");o.setAttribute("state","expanded");}else
{$("#"+oConfig.mother).addClass("hidden");o.setAttribute("state","");}
return false;},toggle:function(oConfig){if(typeof oConfig.mother=="string"){if(oConfig.deep===false){$("#"+oConfig.mother+" > .toggle-target.hidden").removeClass("hidden");}else{$("#"+oConfig.mother+" .toggle-target.hidden").removeClass("hidden");}
var o=oConfig.thisRef;if(o.getAttribute("state")!="expanded"){if(oConfig.swapText!=undefined){o.origText=o.firstChild.nodeValue;o.firstChild.nodeValue=oConfig.swapText;}
if(oConfig.addClass!=undefined){$(o).addClass(oConfig.addClass);}
o.setAttribute("state","expanded");}else{if(oConfig.swapText!=undefined){o.firstChild.nodeValue=o.origText;}
if(oConfig.addClass!=undefined){$(o).removeClass(oConfig.addClass);}
o.setAttribute("state","");if(oConfig.deep===false){$("#"+oConfig.mother+" > .toggle-target").addClass("hidden");}else{$("#"+oConfig.mother+" .toggle-target").addClass("hidden");}}}else{for(var i=0;i<oConfig.mother.length;i++){var elm=oConfig.mother[i];window.console.log(elm)
$("#"+elm+" .toggle-target.hidden").removeClass("hidden");var o=oConfig.thisRef;if(o.getAttribute("state")!="expanded"){if(oConfig.swapText!=undefined){o.origText=o.firstChild.nodeValue;o.firstChild.nodeValue=oConfig.swapText;}
if(oConfig.addClass!=undefined){$(o).addClass(oConfig.addClass);}
o.setAttribute("state","expanded");}else{if(oConfig.swapText!=undefined){o.firstChild.nodeValue=o.origText;}
if(oConfig.addClass!=undefined){$(o).removeClass(oConfig.addClass);}
o.setAttribute("state","");$("#"+elm+" .toggle-target").addClass("hidden");}}}
try{Sonofon.Page.Layout.resizeRightCol();}catch(e){}
return false;}},Tabs:{imgStdPath:new Array(),imgSelPath:new Array(),tempStdPath:new Array(),tempSelPath:new Array(),deepLinkHashCollectionPrefix:"tab-coll-",initialize:function(){$(".tabs").each(function(collCount){var sId=Sonofon.Page.Tabs.deepLinkHashCollectionPrefix+collCount;$(this).attr('id',sId);if(typeof($(this).attr("openTab"))=='undefined')$(this).attr("openTab",1);$(".tab-btn",$(this)).each(function(counter){$(this).attr("container",collCount);$(this).attr("imageon",Sonofon.Page.Tabs.imgSelPath[counter]);$(this).attr("imageoff",Sonofon.Page.Tabs.imgStdPath[counter]);$(this).click(function(){Sonofon.Page.Tabs.gotoTab($(this).attr("container"),counter+1);});});Sonofon.Page.Tabs.hideAllContent(sId);Sonofon.Page.Tabs.gotoTab(collCount,$(this).attr("openTab"));});},reInitTabCollection:function(o){$(".tabs",o).each(function(collCount){var sId=Sonofon.Page.Tabs.deepLinkHashCollectionPrefix+1000;$(this).attr('id',sId);if(typeof($(this).attr("openTab"))=='undefined')$(this).attr("openTab",1);$(".tab-btn",$(this)).each(function(counter){$(this).attr("imageon",Sonofon.Page.Tabs.imgSelPath[counter]);$(this).attr("imageoff",Sonofon.Page.Tabs.imgStdPath[counter]);$(this).attr("container",1000);$(this).click(function(){Sonofon.Page.Tabs.gotoTab($(this).attr("container"),counter+1);});});Sonofon.Page.Tabs.hideAllContent(sId);Sonofon.Page.Tabs.gotoTab(1000,$(this).attr("openTab"));});var sc=document.getElementById(o.attr('id')).getElementsByTagName("SCRIPT");for(var i=0;i<sc.length;i++){eval(sc[i].innerHTML)}
this.resetImgSrc(o.attr('id'));this.gotoTab(1000,1);},gotoTab:function(iCollection,iStep){var container=this.deepLinkHashCollectionPrefix+iCollection;this.resetImgSrc(container);this.hideAllContent(container);this.resetZIndices(container);this.setTopZIndex($(".tab-btn",$("#"+container)).eq(iStep-1));this.setImgSrc(container,iStep-1);$(".tab-content",$("#"+container)).eq(iStep-1).show();$("#"+container).attr("openTab",iStep);return false;},resetZIndices:function(container){$(".tab-btn",$("#"+container)).each(function(counter){$(this).css({zIndex:(100-counter)});});},resetImgSrc:function(container){$(".tab-btn img",$("#"+container)).each(function(counter){$(this).attr('src',$("#"+container+" .tab-btn").eq(counter).attr("imageoff"));});},setImgSrc:function(container,i){$("img",$("#"+container+" .tab-btn").eq(i)).attr('src',$("#"+container+" .tab-btn").eq(i).attr("imageon"));},setTopZIndex:function(o){$(o).css({zIndex:101});},hideAllContent:function(sId){$(".tab-content",$("#"+sId)).hide();},saveTabs:function(){this.tempStdPath=(new Array()).concat(this.imgStdPath);this.tempSelPath=(new Array()).concat(this.imgSelPath);},restoreTabs:function(){this.imgStdPath=this.tempStdPath;this.imgSelPath=this.tempSelPath;}},Tooltips:{initialize:function(){$(".tooltip-text").hide();$(".tooltip-text").css({visibility:"hidden"});$(".tooltip").each(function(){$(this).click(function(e){$(".tooltip-text").hide();$(".tooltip-text",this).show();$(".tooltip-text",this).css({visibility:"visible"});var i=$(".tooltip-text",this).get(0);$(".tooltip-text",this).top("-"+(i.offsetHeight-5)+"px");if(!e)var e=window.event;if(e.stopPropagation){e.stopPropagation();}else{e.cancelBubble=true;}});$(this).mouseover(function(e){$(".tooltip-text").hide();});});}},Cookie:{create:function(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}else{expires="";}
document.cookie=name+"="+value+expires+"; path=/";},read:function(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}
return null;}},Popup:function(thisRef){var win=window.open(thisRef.href);return false;},print:function(){try{window.print();}catch(e){}
return false;},Forms:{emptyOnFocus:function(oThis){try{if(!oThis.getAttribute('defaultValue'))oThis.setAttribute('defaultValue',oThis.value);if(oThis.value==oThis.defaultValue)oThis.value="";if(oThis.className.indexOf("input-em")!=-1){oThis.setAttribute("special-class",true);oThis.className=oThis.className.replace("input-em","");}
if(oThis.onblur!='undefined'){oThis.onblur=function(){if(this.value==""){this.value=this.defaultValue;if(this.getAttribute("special-class")){this.className+=" input-em";}}}}}catch(e){}}},start:function(){Sonofon.Page.Flow.initialize();Sonofon.Page.Tabs.initialize();Sonofon.Page.GenericExpandList.initialize();Sonofon.Page.Tooltips.initialize();}}}
$(function(){Sonofon.Page.start();});function tabInit(){}
function DomWindowInit(){Sonofon.Page.Tabs.saveTabs();Sonofon.Page.Tabs.reInitTabCollection($('#DOMWindow'));$('#DOMWindow').corner("cc:000");}
function flashClick(element){$(element).click();}
$(document).ready(function(){$('.roundcorners').each(function(){$(this).corner("cc:#fff")});});function phoneOver(elem){if(elem.className!='phoneMenuActive'){elem.style.border='2px solid #000000';elem.style.padding='0px';}}
function phoneOut(elem){if(elem.className!='phoneMenuActive'){elem.style.border='none';elem.style.padding='2px';}}
function setPhoneMenuClass(elem){var i;if(elem.hasChildNodes()){for(i=0;i<elem.childNodes.length;i++){if(elem.childNodes[i].className=='phoneMenuActive'){elem.childNodes[i].className='phoneMenu';elem.childNodes[i].style.border='none';elem.childNodes[i].style.padding='2px';}
setPhoneMenuClass(elem.childNodes[i])}}}
function phoneClick(elem){setPhoneMenuClass(document.getElementById('phoneMenuContainer'));elem.style.border='2px solid #0099ff';elem.style.padding='0px';elem.className='phoneMenuActive';}
function utf8_encode(argString){var string=(argString+'');var utftext='';var start,end;var stringl=0;start=end=0;stringl=string.length;for(var n=0;n<stringl;n++){var c1=string.charCodeAt(n);var enc=null;if(c1<128){end++;}else if(c1>127&&c1<2048){enc=String.fromCharCode((c1>>6)|192)+String.fromCharCode((c1&63)|128);}else{enc=String.fromCharCode((c1>>12)|224)+String.fromCharCode(((c1>>6)&63)|128)+String.fromCharCode((c1&63)|128);}
if(enc!==null){if(end>start){utftext+=string.substring(start,end);}
utftext+=enc;start=end=n+1;}}
if(end>start){utftext+=string.substring(start,string.length);}
return utftext;}
function continueBuyFlow(){return true;}
function stepBackInFlow(){return true;}
$(function(){$lightboxDialog=null;$('.smallLightbox, .mediumLightbox, .largeLightbox, .popup, .customSizeLightbox').live("click",function(){var url=$(this).attr('href');if($lightboxDialog==null){$lightboxDialog=$('<div id="lightbox-dialog"></div>').dialog({autoOpen:false,modal:true,resizable:false,draggable:false,position:['center',100],dialogClass:'lightbox',zIndex:12001});}
if($(this).hasClass('smallLightbox')){$lightboxDialog.dialog("option",'width',380);}else if($(this).hasClass('mediumLightbox')){$lightboxDialog.dialog("option",'width',868);}else if($(this).hasClass('largeLightbox')){$lightboxDialog.dialog("option",'width',960);}else if($(this).hasClass('popup')){$lightboxDialog.dialog("option",'width',607);}else{var size=$(this).attr('rel');$lightboxDialog.dialog("option",'position',['center',30]);$lightboxDialog.dialog("option",'width',size);}
$lightboxDialog.html('<img src="/Images/lightboxloader2_tcm69-110107.gif" alt="" class="ajaxloader" />');$lightboxDialog.dialog('open');$lightboxDialog.load(url,function(response,status,xhr){if(status=="error"){$lightboxDialog.html('Beklager, men der er en fejl: '+msg+xhr.status+" "+xhr.statusText);}
$(window).resize();});return false;});$('.popup_inline').click(function(){var url=$(this).attr('href');$(url).dialog({autoOpen:true,modal:true,resizable:false,draggable:false,position:['center',100],dialogClass:'lightbox',zIndex:12001,width:868});return false;});$('.closeDOMWindow').live('click',function(){$(this).closest('.lightbox').find('.ui-dialog-titlebar-close').click();return false;});});
function ChangeLabelColorForValidator(val){var lbl=document.getElementById(val.controltovalidate+'_lbl');if(lbl!=null){var k,value;var vals=new Array();for(k=0;k<Page_Validators.length;k++){if(Page_Validators[k].controltovalidate==val.controltovalidate)
vals.push(Page_Validators[k]);}
value=true;for(k=0;k<vals.length;k++)
value=(value&&vals[k].isvalid);ChangeLabelColor(lbl,value);var req=document.getElementById(val.controltovalidate+'_req');if(req!=null){ChangeLabelColor(req,value);}}}
function SetErrorLabelColor(labelName){var lbl=document.getElementById(labelName+'_lbl');if(lbl!=null){ChangeLabelColor(lbl,false);}
var req=document.getElementById(labelName+'_req');if(req!=null){ChangeLabelColor(req,false);}}
function ChangeLabelColor(lbl,valid){if(valid){lbl.style.color='';lbl.style.fontWeight='';}else{lbl.style.color='red';}}
/*!
 * jQuery corner plugin: simple corner rounding
 * Examples and documentation at: http://jquery.malsup.com/corner/
 * version 2.09 (11-MAR-2010)
 * Requires jQuery v1.3.2 or later
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 * Authors: Dave Methvin and Mike Alsup
 */

/**
 *  corner() takes a single string argument:  $('#myDiv').corner("effect corners width")
 *
 *  effect:  name of the effect to apply, such as round, bevel, notch, bite, etc (default is round). 
 *  corners: one or more of: top, bottom, tr, tl, br, or bl.  (default is all corners)
 *  width:   width of the effect; in the case of rounded corners this is the radius. 
 *           specify this value using the px suffix such as 10px (yes, it must be pixels).
 */
;(function($) { 

var style = document.createElement('div').style;
var moz = style['MozBorderRadius'] !== undefined;
var webkit = style['WebkitBorderRadius'] !== undefined;
var radius = style['borderRadius'] !== undefined || style['BorderRadius'] !== undefined;
var mode = document.documentMode || 0;
var noBottomFold = $.browser.msie && (($.browser.version < 8 && !mode) || mode < 8);

var expr = $.browser.msie && (function() {
    var div = document.createElement('div');
    try { div.style.setExpression('width','0+0'); div.style.removeExpression('width'); }
    catch(e) { return false; }
    return true;
})();
    
function sz(el, p) { 
    return parseInt($.css(el,p))||0; 
};
function hex2(s) {
    var s = parseInt(s).toString(16);
    return ( s.length < 2 ) ? '0'+s : s;
};
function gpc(node) {
    while(node) {
        var v = $.css(node,'backgroundColor');
        if (v && v != 'transparent' && v != 'rgba(0, 0, 0, 0)') {
	        if (v.indexOf('rgb') >= 0) { 
	            var rgb = v.match(/\d+/g); 
	            return '#'+ hex2(rgb[0]) + hex2(rgb[1]) + hex2(rgb[2]);
	        }
            return v;
		}
		node = node.parentNode; // keep walking if transparent
    }
    return '#ffffff';
};

function getWidth(fx, i, width) {
    switch(fx) {
    case 'round':  return Math.round(width*(1-Math.cos(Math.asin(i/width))));
    case 'cool':   return Math.round(width*(1+Math.cos(Math.asin(i/width))));
    case 'sharp':  return Math.round(width*(1-Math.cos(Math.acos(i/width))));
    case 'bite':   return Math.round(width*(Math.cos(Math.asin((width-i-1)/width))));
    case 'slide':  return Math.round(width*(Math.atan2(i,width/i)));
    case 'jut':    return Math.round(width*(Math.atan2(width,(width-i-1))));
    case 'curl':   return Math.round(width*(Math.atan(i)));
    case 'tear':   return Math.round(width*(Math.cos(i)));
    case 'wicked': return Math.round(width*(Math.tan(i)));
    case 'long':   return Math.round(width*(Math.sqrt(i)));
    case 'sculpt': return Math.round(width*(Math.log((width-i-1),width)));
	case 'dogfold':
    case 'dog':    return (i&1) ? (i+1) : width;
    case 'dog2':   return (i&2) ? (i+1) : width;
    case 'dog3':   return (i&3) ? (i+1) : width;
    case 'fray':   return (i%2)*width;
    case 'notch':  return width; 
	case 'bevelfold':
    case 'bevel':  return i+1;
    }
};

$.fn.corner = function(options) {
    // in 1.3+ we can fix mistakes with the ready state
	if (this.length == 0) {
        if (!$.isReady && this.selector) {
            var s = this.selector, c = this.context;
            $(function() {
                $(s,c).corner(options);
            });
        }
        return this;
	}

    return this.each(function(index){
		var $this = $(this);
		// meta values override options
		var o = [$this.attr($.fn.corner.defaults.metaAttr) || '', options || ''].join(' ').toLowerCase();
		var keep = /keep/.test(o);                       // keep borders?
		var cc = ((o.match(/cc:(#[0-9a-f]+)/)||[])[1]);  // corner color
		var sc = ((o.match(/sc:(#[0-9a-f]+)/)||[])[1]);  // strip color
		var width = parseInt((o.match(/(\d+)px/)||[])[1]) || 10; // corner width
		var re = /round|bevelfold|bevel|notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dogfold|dog/;
		var fx = ((o.match(re)||['round'])[0]);
		var fold = /dogfold|bevelfold/.test(o);
		var edges = { T:0, B:1 };
		var opts = {
			TL:  /top|tl|left/.test(o),       TR:  /top|tr|right/.test(o),
			BL:  /bottom|bl|left/.test(o),    BR:  /bottom|br|right/.test(o)
		};
		if ( !opts.TL && !opts.TR && !opts.BL && !opts.BR )
			opts = { TL:1, TR:1, BL:1, BR:1 };
			
		// support native rounding
		if ($.fn.corner.defaults.useNative && fx == 'round' && (radius || moz || webkit) && !cc && !sc) {
			if (opts.TL)
				$this.css(radius ? 'border-top-left-radius' : moz ? '-moz-border-radius-topleft' : '-webkit-border-top-left-radius', width + 'px');
			if (opts.TR)
				$this.css(radius ? 'border-top-right-radius' : moz ? '-moz-border-radius-topright' : '-webkit-border-top-right-radius', width + 'px');
			if (opts.BL)
				$this.css(radius ? 'border-bottom-left-radius' : moz ? '-moz-border-radius-bottomleft' : '-webkit-border-bottom-left-radius', width + 'px');
			if (opts.BR)
				$this.css(radius ? 'border-bottom-right-radius' : moz ? '-moz-border-radius-bottomright' : '-webkit-border-bottom-right-radius', width + 'px');
			return;
		}
			
		var strip = document.createElement('div');
		$(strip).css({
			overflow: 'hidden',
			height: '1px',
			minHeight: '1px',
			fontSize: '1px',
			backgroundColor: sc || 'transparent',
			borderStyle: 'solid'
		});
	
        var pad = {
            T: parseInt($.css(this,'paddingTop'))||0,     R: parseInt($.css(this,'paddingRight'))||0,
            B: parseInt($.css(this,'paddingBottom'))||0,  L: parseInt($.css(this,'paddingLeft'))||0
        };

        if (typeof this.style.zoom != undefined) this.style.zoom = 1; // force 'hasLayout' in IE
        if (!keep) this.style.border = 'none';
        strip.style.borderColor = cc || gpc(this.parentNode);
        var cssHeight = $(this).outerHeight();

        for (var j in edges) {
            var bot = edges[j];
            // only add stips if needed
            if ((bot && (opts.BL || opts.BR)) || (!bot && (opts.TL || opts.TR))) {
                strip.style.borderStyle = 'none '+(opts[j+'R']?'solid':'none')+' none '+(opts[j+'L']?'solid':'none');
                var d = document.createElement('div');
                $(d).addClass('jquery-corner');
                var ds = d.style;

                bot ? this.appendChild(d) : this.insertBefore(d, this.firstChild);

                if (bot && cssHeight != 'auto') {
                    if ($.css(this,'position') == 'static')
                        this.style.position = 'relative';
                    ds.position = 'absolute';
                    ds.bottom = ds.left = ds.padding = ds.margin = '0';
                    if (expr)
                        ds.setExpression('width', 'this.parentNode.offsetWidth');
                    else
                        ds.width = '100%';
                }
                else if (!bot && $.browser.msie) {
                    if ($.css(this,'position') == 'static')
                        this.style.position = 'relative';
                    ds.position = 'absolute';
                    ds.top = ds.left = ds.right = ds.padding = ds.margin = '0';
                    
                    // fix ie6 problem when blocked element has a border width
                    if (expr) {
                        var bw = sz(this,'borderLeftWidth') + sz(this,'borderRightWidth');
                        ds.setExpression('width', 'this.parentNode.offsetWidth - '+bw+'+ "px"');
                    }
                    else
                        ds.width = '100%';
                }
                else {
                	ds.position = 'relative';
                    ds.margin = !bot ? '-'+pad.T+'px -'+pad.R+'px '+(pad.T-width)+'px -'+pad.L+'px' : 
                                        (pad.B-width)+'px -'+pad.R+'px -'+pad.B+'px -'+pad.L+'px';                
                }

                for (var i=0; i < width; i++) {
                    var w = Math.max(0,getWidth(fx,i, width));
                    var e = strip.cloneNode(false);
                    e.style.borderWidth = '0 '+(opts[j+'R']?w:0)+'px 0 '+(opts[j+'L']?w:0)+'px';
                    bot ? d.appendChild(e) : d.insertBefore(e, d.firstChild);
                }
				
				if (fold && $.support.boxModel) {
					if (bot && noBottomFold) continue;
					for (var c in opts) {
						if (!opts[c]) continue;
						if (bot && (c == 'TL' || c == 'TR')) continue;
						if (!bot && (c == 'BL' || c == 'BR')) continue;
						
						var common = { position: 'absolute', border: 'none', margin: 0, padding: 0, overflow: 'hidden', backgroundColor: strip.style.borderColor };
						var $horz = $('<div/>').css(common).css({ width: width + 'px', height: '1px' });
						switch(c) {
						case 'TL': $horz.css({ bottom: 0, left: 0 }); break;
						case 'TR': $horz.css({ bottom: 0, right: 0 }); break;
						case 'BL': $horz.css({ top: 0, left: 0 }); break;
						case 'BR': $horz.css({ top: 0, right: 0 }); break;
						}
						d.appendChild($horz[0]);
						
						var $vert = $('<div/>').css(common).css({ top: 0, bottom: 0, width: '1px', height: width + 'px' });
						switch(c) {
						case 'TL': $vert.css({ left: width }); break;
						case 'TR': $vert.css({ right: width }); break;
						case 'BL': $vert.css({ left: width }); break;
						case 'BR': $vert.css({ right: width }); break;
						}
						d.appendChild($vert[0]);
					}
				}
            }
        }
    });
};

$.fn.uncorner = function() { 
	if (radius || moz || webkit)
		this.css(radius ? 'border-radius' : moz ? '-moz-border-radius' : '-webkit-border-radius', 0);
	$('div.jquery-corner', this).remove();
	return this;
};

// expose options
$.fn.corner.defaults = {
	useNative: true, // true if plugin should attempt to use native browser support for border radius rounding
	metaAttr:  'data-corner' // name of meta attribute to use for options
};
    
})(jQuery);
(function($){$.fn.closeDOMWindow=function(settings){if(!settings){settings={};}
var run=function(passingThis){if(settings.anchoredClassName){$('.'+settings.anchoredClassName).fadeOut('fast',function(){if($.fn.draggable){$('.'+settings.anchoredClassName).draggable('destory').trigger("unload").remove();}else{$('.'+settings.anchoredClassName).trigger("unload").remove();}});if(settings.functionCallOnClose){settings.functionCallAfterClose();}}else{$('#DOMWindowOverlay').fadeOut('fast',function(){$('#DOMWindowOverlay').trigger('unload').unbind().remove();});$('#DOMWindow').fadeOut('fast',function(){if($.fn.draggable){$('#DOMWindow').draggable("destroy").trigger("unload").remove();}else{$('#DOMWindow').trigger("unload").remove();}});$(window).unbind('scroll.DOMWindow');$(window).unbind('resize.DOMWindow');if($.fn.openDOMWindow.isIE6){$('#DOMWindowIE6FixIframe').remove();}
if(settings.functionCallOnClose){settings.functionCallAfterClose();}}};if(settings.eventType){return this.each(function(index){$(this).bind(settings.eventType,function(){run(this);return false;});});}else{run();}};$.closeDOMWindow=function(s){$.fn.closeDOMWindow(s);};$.fn.openDOMWindow=function(instanceSettings){var shortcut=$.fn.openDOMWindow;shortcut.defaultsSettings={anchoredClassName:'',anchoredSelector:'',borderColor:'#ccc',borderSize:'4',draggable:0,eventType:null,fixedWindowY:100,functionCallOnOpen:null,functionCallOnClose:null,height:500,loader:0,loaderHeight:0,loaderImagePath:'',loaderWidth:0,modal:0,overlay:1,overlayColor:'#000',overlayOpacity:'85',positionLeft:0,positionTop:0,positionType:'centered',width:500,windowBGColor:'#fff',windowBGImage:null,windowHTTPType:'get',windowPadding:10,windowSource:'inline',windowSourceID:'',windowSourceURL:''};var settings=$.extend({},$.fn.openDOMWindow.defaultsSettings,instanceSettings||{});shortcut.viewPortHeight=function(){return self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;};shortcut.viewPortWidth=function(){return self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;};shortcut.scrollOffsetHeight=function(){return self.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop;};shortcut.scrollOffsetWidth=function(){return self.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft;};shortcut.isIE6=typeof document.body.style.maxHeight==="undefined";var sizeOverlay=function(){if(shortcut.isIE6){var overlayViewportHeight=document.documentElement.offsetHeight+document.documentElement.scrollTop-4;var overlayViewportWidth=document.documentElement.offsetWidth-21;$('#DOMWindowOverlay').css({'height':overlayViewportHeight+'px','width':overlayViewportWidth+'px'});}else{$('#DOMWindowOverlay').css({'height':'100%','width':'100%','position':'fixed'});}};var sizeIE6Iframe=function(){var overlayViewportHeight=document.documentElement.offsetHeight+document.documentElement.scrollTop-4;var overlayViewportWidth=document.documentElement.offsetWidth-21;$('#DOMWindowIE6FixIframe').css({'height':overlayViewportHeight+'px','width':overlayViewportWidth+'px'});};var centerDOMWindow=function(){if(settings.height+50>shortcut.viewPortHeight()){$('#DOMWindow').css('left',Math.round(shortcut.viewPortWidth()/2)+shortcut.scrollOffsetWidth()-Math.round(($('#DOMWindow').outerWidth())/2));}else{$('#DOMWindow').css('left',Math.round(shortcut.viewPortWidth()/2)+shortcut.scrollOffsetWidth()-Math.round(($('#DOMWindow').outerWidth())/2));$('#DOMWindow').css('top',Math.round(shortcut.viewPortHeight()/2)+shortcut.scrollOffsetHeight()-Math.round(($('#DOMWindow').outerHeight())/2));}};var centerLoader=function(){if(shortcut.isIE6){$('#DOMWindowLoader').css({'left':Math.round(shortcut.viewPortWidth()/2)+shortcut.scrollOffsetWidth()-Math.round(($('#DOMWindowLoader').innerWidth())/2),'position':'absolute'});$('#DOMWindowLoader').css({'top':Math.round(shortcut.viewPortHeight()/2)+shortcut.scrollOffsetHeight()-Math.round(($('#DOMWindowLoader').innerHeight())/2),'position':'absolute'});}else{$('#DOMWindowLoader').css({'left':'50%','top':'50%','position':'fixed'});}};var fixedDOMWindow=function(){$('#DOMWindow').css('left',settings.positionLeft+shortcut.scrollOffsetWidth());$('#DOMWindow').css('top',+settings.positionTop+shortcut.scrollOffsetHeight());};var showDOMWindow=function(instance){if(arguments[0]){$('.'+instance+' #DOMWindowLoader').remove();$('.'+instance+' #DOMWindowContent').append('<div id="DOMWindowClose"></div>');$('.'+instance+' #DOMWindowContent').fadeIn('fast',function(){if(settings.functionCallOnOpen){settings.functionCallOnOpen();}DomWindowInit();});$('.'+instance+' .closeDOMWindow').click(function(){$.closeDOMWindow();return false;});$('#DOMWindowClose').click(function(){$.closeDOMWindow();});}else{$('#DOMWindowLoader').remove();$('#DOMWindow').append('<div id="DOMWindowClose"></div>');$('#DOMWindow').fadeIn('fast',function(){if(settings.functionCallOnOpen){settings.functionCallOnOpen();}DomWindowInit();});$('#DOMWindow .closeDOMWindow').click(function(){$.closeDOMWindow();return false;});$('#DOMWindowClose').click(function(){$.closeDOMWindow();});}
centerDOMWindow();};var urlQueryToObject=function(s){var query={};s.replace(/\b([^?&=]*)=([^&=]*)\b/g,function(m,a,d){if(typeof query[a]!='undefined'){query[a]+=','+d;}else{query[a]=d;}});return query;};var run=function(passingThis){settings.windowSourceID=$(passingThis).attr('href')||settings.windowSourceID;settings.windowSourceURL=$(passingThis).attr('href')||settings.windowSourceURL;settings.windowBGImage=settings.windowBGImage?'background-image:url('+settings.windowBGImage+')':'';var urlOnly,urlQueryObject;if(settings.positionType=='anchored'){var anchoredPositions=$(settings.anchoredSelector).position();var anchoredPositionX=anchoredPositions.left+settings.positionLeft;var anchoredPositionY=anchoredPositions.top+settings.positionTop;$('body').append('<div class="'+settings.anchoredClassName+'" style="'+settings.windowBGImage+';background-repeat:no-repeat;padding:'+settings.windowPadding+'px;overflow:auto;position:absolute;top:'+anchoredPositionY+'px;left:'+anchoredPositionX+'px;height:'+settings.height+'px;width:'+settings.width+'px;background-color:'+settings.windowBGColor+';border:'+settings.borderSize+'px solid '+settings.borderColor+';z-index:12001"><div id="DOMWindowContent" style="display:none"></div></div>');if(settings.loader&&settings.loaderImagePath!==''){$('.'+settings.anchoredClassName).append('<div id="DOMWindowLoader" style="width:'+settings.loaderWidth+'px;height:'+settings.loaderHeight+'px;"><img src="'+settings.loaderImagePath+'" /></div>');}
if($.fn.draggable){if(settings.draggable){$('.'+settings.anchoredClassName).draggable({cursor:'move'});}}
switch(settings.windowSource){case'inline':$('.'+settings.anchoredClassName+" #DOMWindowContent").append($(settings.windowSourceID).children());$('.'+settings.anchoredClassName).unload(function(){$('.'+settings.anchoredClassName+" #DOMWindowContent #DOMWindowClose").remove();$('.'+settings.windowSourceID).append($('.'+settings.anchoredClassName+" #DOMWindowContent").children());});showDOMWindow(settings.anchoredClassName);break;case'iframe':$('.'+settings.anchoredClassName+" #DOMWindowContent").append('<iframe frameborder="0" hspace="0" wspace="0" src="'+settings.windowSourceURL+'" name="DOMWindowIframe'+Math.round(Math.random()*1000)+'" style="width:100%;height:100%;border:none;background-color:#fff;" class="'+settings.anchoredClassName+'Iframe" ></iframe>');$('.'+settings.anchoredClassName+'Iframe').load(showDOMWindow(settings.anchoredClassName));break;case'ajax':if(settings.windowHTTPType=='post'){if(settings.windowSourceURL.indexOf("?")!==-1){urlOnly=settings.windowSourceURL.substr(0,settings.windowSourceURL.indexOf("?"));urlQueryObject=urlQueryToObject(settings.windowSourceURL);}else{urlOnly=settings.windowSourceURL;urlQueryObject={};}
$('.'+settings.anchoredClassName+" #DOMWindowContent").load(urlOnly,urlQueryObject,function(){showDOMWindow(settings.anchoredClassName);});}else{if(settings.windowSourceURL.indexOf("?")==-1){settings.windowSourceURL+='?';}
$('.'+settings.anchoredClassName+" #DOMWindowContent").load(settings.windowSourceURL+'&random='+(new Date().getTime()),function(){showDOMWindow(settings.anchoredClassName);});}
break;}}else{if(settings.overlay){$('body').append('<div id="DOMWindowOverlay" style="z-index:12000;display:none;position:absolute;top:0;left:0;background-color:'+settings.overlayColor+';filter:alpha(opacity='+settings.overlayOpacity+');-moz-opacity: 0.'+settings.overlayOpacity+';opacity: 0.'+settings.overlayOpacity+';"></div>');if(shortcut.isIE6){$('body').append('<iframe id="DOMWindowIE6FixIframe"  src="blank.html"  style="width:100%;height:100%;z-index:9999;position:absolute;top:0;left:0;filter:alpha(opacity=0);"></iframe>');sizeIE6Iframe();}
sizeOverlay();$('#DOMWindowOverlay').fadeIn('fast');if(!settings.modal){$('#DOMWindowOverlay').click(function(){$.closeDOMWindow();});}}
if(settings.loader&&settings.loaderImagePath!==''){$('body').append('<div id="DOMWindowLoader" style="z-index:12002;width:'+settings.loaderWidth+'px;height:'+settings.loaderHeight+'px;"><img src="'+settings.loaderImagePath+'" /></div>');centerLoader();}
$('body').append('<div id="DOMWindow" style="background-repeat:no-repeat;'+settings.windowBGImage+';overflow:auto;padding:'+settings.windowPadding+'px;display:none;height:'+settings.height+'px;width:'+settings.width+'px;background-color:'+settings.windowBGColor+';border:'+settings.borderSize+'px solid '+settings.borderColor+'; position:absolute;z-index:12001"></div>');switch(settings.positionType){case'centered':centerDOMWindow();if(settings.height+50>shortcut.viewPortHeight()){$('#DOMWindow').css('top',(settings.fixedWindowY+shortcut.scrollOffsetHeight())+'px');}
break;case'absolute':$('#DOMWindow').css({'top':(settings.positionTop+shortcut.scrollOffsetHeight())+'px','left':(settings.positionLeft+shortcut.scrollOffsetWidth())+'px'});if($.fn.draggable){if(settings.draggable){$('#DOMWindow').draggable({cursor:'move'});}}
break;case'fixed':fixedDOMWindow();break;}
$(window).bind('scroll.DOMWindow',function(){if(settings.overlay){sizeOverlay();}
if(shortcut.isIE6){sizeIE6Iframe();}
if(settings.positionType=='centered'){centerDOMWindow();}
if(settings.positionType=='fixed'){fixedDOMWindow();}});$(window).bind('resize.DOMWindow',function(){if(shortcut.isIE6){sizeIE6Iframe();}
if(settings.overlay){sizeOverlay();}
if(settings.positionType=='centered'){centerDOMWindow();}});switch(settings.windowSource){case'inline':$("#DOMWindow").append($(settings.windowSourceID).children());$("#DOMWindow").unload(function(){$("#DOMWindow #DOMWindowClose").remove();$(settings.windowSourceID).append($("#DOMWindow").children());});showDOMWindow();break;case'iframe':$('#DOMWindow').append('<iframe frameborder="0" hspace="0" wspace="0" src="'+settings.windowSourceURL+'" name="DOMWindowIframe'+Math.round(Math.random()*1000)+'" style="width:100%;height:100%;border:none;background-color:#fff;" id="DOMWindowIframe" ></iframe>');$('#DOMWindowIframe').load(showDOMWindow());break;case'ajax':if(settings.windowHTTPType=='post'){if(settings.windowSourceURL.indexOf("?")!==-1){urlOnly=settings.windowSourceURL.substr(0,settings.windowSourceURL.indexOf("?"));urlQueryObject=urlQueryToObject(settings.windowSourceURL);}else{urlOnly=settings.windowSourceURL;urlQueryObject={};}
$("#DOMWindow").load(urlOnly,urlQueryObject,function(){showDOMWindow();});}else{if(settings.windowSourceURL.indexOf("?")==-1){settings.windowSourceURL+='?';}
$("#DOMWindow").load(settings.windowSourceURL+'&random='+(new Date().getTime()),function(){showDOMWindow();});}
break;}}};if(settings.eventType){return this.each(function(index){$(this).bind(settings.eventType,function(){run(this);return false;});});}else{run();}};$.openDOMWindow=function(s){$.fn.openDOMWindow(s);};})(jQuery);
var FormBusy_Timer=null;var FormBusy_StartedFromOutside=false;var FormBusy_AjaxEnabled=false;var FormBusy_refSubmit=new Array();var FormBusy_Log="";var FormBusy_EnableLog=false;var FormBusy_LogObject=null;function FormBusyLog(str)
{if(FormBusy_EnableLog)
FormBusy_LogObject.innerHTML+=str+"<br>"}
function FormBusyInitializeLog()
{if(FormBusy_EnableLog)
{FormBusy_LogObject=document.body.appendChild(document.createElement("div"));FormBusyLog("<br>");}}
function AjaxEndRequestHandler(sender,args)
{if(FormBusy_StartedFromOutside)return;FormBusyLog("Ajax ended");busyStop('');}
function AjaxBeginRequestHandler(sender,args)
{if(FormBusy_StartedFromOutside)return;FormBusyLog("Ajax started");formBusy();}
function AjaxPageUnloaded()
{formBusy();}
function showFormBusy(){FormBusyLog("Form busy displayed");createWorkBox('');return true;}
function formBusy(){if(!FormBusy_Timer)
{FormBusy_Timer=setTimeout("showFormBusy()",2000)
FormBusyLog("Form busy started. Timer: "+FormBusy_Timer);}
return true;}
function busyStop()
{if(FormBusy_Timer)
{FormBusyLog("Form busy ended. Timer: "+FormBusy_Timer);clearTimeout(FormBusy_Timer);FormBusy_Timer=null;}
if(document.getElementById("modalContainer")!=null)
document.getElementsByTagName("body")[0].removeChild(document.getElementById("modalContainer"));}
function createWorkBox(txt){d=document;if(d.getElementById("modalContainer"))return;mObj=d.getElementsByTagName("body")[0].appendChild(d.createElement("div"));mObj.id="modalContainer";mObj.style.height=d.documentElement.scrollHeight+"px";alertObj=mObj.appendChild(d.createElement("div"));alertObj.id="workBox";if(d.all&&!window.opera)alertObj.style.top=document.documentElement.scrollTop+"px";alertObj.style.left="0px"
alertObj.style.visiblity="visible";msg=alertObj.appendChild(d.createElement("p"));msg.appendChild(d.createTextNode(txt));}
function FormBusyStart(){FormBusyLog("Started from outside");FormBusy_StartedFromOutside=true;formBusy();}
function FormBusyStop()
{FormBusyLog("Stoped from outside");FormBusy_StartedFromOutside=false;busyStop();}
function FormBusyAjaxAddRequestHandlers()
{try{Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(AjaxBeginRequestHandler);Sys.WebForms.PageRequestManager.getInstance().add_endRequest(AjaxEndRequestHandler);Sys.Application.add_unload(AjaxPageUnloaded);FormBusyLog("Ajax enabled");}
catch(ex)
{}}
function FormBusy_Submit_IE()
{if(event)
return FormBusy_Submit(event.srcElement.getAttribute("refSubmitIndex"));else
return true;}
function FormBusy_Submit(formIndex)
{if(typeof(Page_IsValid)!="undefined"&&Page_IsValid==false)return false;var blnDoSubmit=true;FormBusyLog("Form "+formIndex+" submitted! ");if(!FormBusy_AjaxEnabled)
FormBusyAjaxAddRequestHandlers();FormBusyLog("Submit event called: "+FormBusy_refSubmit[formIndex]);if(FormBusy_refSubmit[formIndex])
{blnDoSubmit=FormBusy_refSubmit[formIndex]();}
if(blnDoSubmit&&!FormBusy_AjaxEnabled)
{formBusy();}
FormBusyLog("Form "+formIndex+" value: "+blnDoSubmit);return blnDoSubmit;}
function FormBusyAddHandlers()
{FormBusyInitializeLog();FormBusyAjaxAddRequestHandlers();for(i=0;i<document.forms.length;i++)
{var form=document.forms[i];FormBusy_refSubmit.push(form.onsubmit);FormBusyLog(form.onsubmit);form.setAttribute("refSubmitIndex",i);form.setAttribute("onsubmit","return FormBusy_Submit("+i+")");if(typeof(form.onsubmit)=="string")
form.onsubmit=FormBusy_Submit_IE;}}
function FormBusyCheckLoader()
{if(document.body!=null&&document.body.childNodes.length>0)
FormBusyAddHandlers();else
setTimeout("FormBusyCheckLoader()",500);}
FormBusyCheckLoader();
$().ready(function () {
    /*var dropdownUrl = '';
    if ($("#top .PageAreaSelect a.selected").attr("href") == "/erhverv/") {
                dropdownUrl = '/dropdown/dropdownbusiness.aspx';
    } else {
        dropdownUrl = '/dropdown/dropdownprivate.aspx';
    }

    $.get(dropdownUrl, function (data) {
        $(data).each(function (index) {
            if ($(this).hasClass("mega-drop") == true) {
                var menuItem = $(this).attr("data-menu-rel");
                $("#menu-main li." + menuItem).append($(this));
            }
        });
        initDropDowns();
        initHoverDropDown();
 
});
*/   
    /* TODO: Remove lines below when ready for production */
    /*$("#top .logo a img").attr("src", "/Images/TelenorLogo_tcm69-117344.png");
    $("#top .search input.search_submit").attr("src", "/Images/SearchButtonBackground_tcm69-117342.png");*/
});

function initDropDowns() {
    var menuRightPos = $("#menu-main").offset().left + $("#menu-main").width();

    $(".mega-drop").each(function () {
        $(this).css({ "display": "block", "visibility": "hidden" });
        var contentWidth = 0;
        var contentHeight = 0;
        $(this).find("div.wide, div.narrow").each(function () {
            contentWidth += $(this).outerWidth(true);
        });
        $(this).width(contentWidth);

        var offset = menuRightPos - ($(this).offset().left + $(this).outerWidth(true)) - 7;

        if (offset < 0) {
            $(this).css("right", "-3px");
        }

        $(this).find(".content dl").each(function () {
            var currentHeight = $(this).offset().top + $(this).height()
            if (currentHeight > contentHeight)
                contentHeight = currentHeight;
        });
        $(this).find(".content").height(contentHeight - ($(this).find(".content").offset().top));
        $(this).css({ "display": "none", "visibility": "visible" });
    });
}

function initHoverDropDown() {
    var menuTimeout;
    var animatingOpen = false;
    var animatingClose = false;

    function showMenu(menuItem) {
        var menu = menuItem.addClass("over").find(".mega-drop");
        $(".mega-drop").css("display", "none");
        menu.css("display", "block");
    }

    function hideMenu(menuItem) {
        var menu = menuItem.find(".mega-drop");
        menu.css("display", "none");
    }

    $("#top #menu-main ul li").mouseenter(function () {
        var self = $(this);
        self.siblings().removeClass("over");
        clearTimeout(menuTimeout);
        showMenu(self);
    });

    $("#top #menu-main ul li").mouseleave(function () {
        var self = $(this);
        menuTimeout = setTimeout(function () {
            self.removeClass("over");
            hideMenu(self);
        }, 500);
    });
}


