var ns = (navigator.appName == "Netscape");
var ns4 = (ns && (parseInt(navigator.appVersion)==4));
var ns6 = (ns && (parseInt(navigator.appVersion)==5));
var layerRef = "document.all";
var styleRef = ".style";	
var Dynamic = ((document.layers || document.all || document.getElementById));
var clickedArray=new Array(9);
var layersArray=new Array(0);
var layersFound=0
var openmenus= '';
if (!ns4) {
			var imgs = new Array(2);
			imgs[0] = new Image(); imgs[0].src = "image/icons/close.gif"
			imgs[1] = new Image(); imgs[1].src = "image/icons/open.gif"
			imgs[2] = new Image(); imgs[2].src = "image/icons/lock.gif"
			}
if (ns)
{
	if (ns6)
		{
		var layerRef = (ns6) ? "document.getElementById" : "document.all";
		}
	else
		{
		var layerRef = (ns) ? "document" : "document.all";
		var styleRef = (ns) ? "" : ".style";
		}
}

function openmenu(ID) 
{
	if (Dynamic)
	{
		if (clickedArray[ID]==null){disp='block';clickedArray[ID]=1;openmenus = openmenus + ''+ID +',';}
		else
		{
			if (clickedArray[ID]==0){disp='block';clickedArray[ID]=1;openmenus = openmenus + ''+ID +',';}
			else {disp='none';clickedArray[ID]=0;openmenus = openmenus.replace(ID +',','');}
		}
		if (ns) 
		{
			if (ns6)
			{
				eval(layerRef + '("group' + ID + '")' + styleRef + '.display = disp');
				document['menu'+ID].src=imgs[clickedArray[ID]].src;
			}
			else 
			{
				eval(layerRef + '["group' + ID + '"]' + styleRef + '.display = disp');
			}
		} 
		else 
		{
			thelayer=(eval(layerRef + '["group' + ID + '"]')==null)
			if (thelayer==false) 
			{
				eval(layerRef + '["group' + ID + '"]' + styleRef + '.display = disp');
				document['menu'+ID].src=imgs[clickedArray[ID]].src;
			}
		}
	}
	var openmenus_array=openmenus.split(",");
	if (document.getElementById('menuerne').offsetHeight>(document.body.offsetHeight-90)) {
		if (openmenus_array.length-1>1) {
			openmenu(openmenus_array[0]);
		}
	}
}

function changefont() {
    if( document.all ){	
		document.all('content').style.fontSize = (document.all('content').style.fontSize=='15px') ? "11px" : "15px";
    }
    else if(document.getElementById ){
        document.getElementById('content').style.fontSize = (document.getElementById('content').style.fontSize=='15px') ? "11px" : "15px";
    }
}

function PopupWindow(URL) {
  Window=open(""+ URL +"","Popup","status=no,navigation=no,scrollbars=no,resizable=no,width=450,height=300");
}
  
function NetBankPopup(URL) {
  Window=open(""+ URL +"","Popup","status=no,navigation=no,scrollbars=no,resizable=no,width=770,height=530");
}
function popupURL(URL,width,height) {
  Window=open(""+ URL +"","Popup","status=no,navigation=no,scrollbars=no,resizable=no,width="+ width +",height="+ height +"");
}
function popup(ID,width,height) {
  Window=open("popup.asp?includefile="+ ID +"","Popup","status=no,navigation=no,scrollbars=no,resizable=no,width="+ width +",height="+ height +"");
}
function popup_eboks() {
  Window=open("http://www.e-boks.dk/demo/default.htm","Popup","status=no,navigation=no,scrollbars=no,resizable=no,width=600,height=400");
}
function popup_loenservice() {
  window.open('netbankdemo/LoenService/index.htm','popupexit','width=770,height=530')
}
function popupgf() {
  Window=open("https://aktiebog2.prod.bec.dk/00000/aktionaer_portal.asp?ASIdent=06160","Popup","status=no,navigation=no,scrollbars=yes,resizable=no,width=800,height=520");
}
function popup_gf() {
  Window=open('https://aktiebog2.prod.bec.dk/00000/aktionaer_portal.asp?ASIdent=06160','portal','toolbar=no,width=785,height=500, screenX=100, screenY=100,scrollbars=auto,resizable=yes');
}
function fullwin() {
	if (document.all) {
	var wide = window.screen.availWidth-20;
	var high = window.screen.availHeight-50;
	} 
	else {
	var wide = '1000';
	var high = '720';
	}
  Window=open("http://asp.roskildebank.dk/microsite","Popup","status=no,navigation=no,scrollbars=yes,resizable=no,width="+ wide +",height="+ high +"");
}

function elevpopup() {
		Window=open("https://www.roskildebank.dk/bankelev.asp","elev","status=no,navigation=no,scrollbars=no,resizable=no,width=800,height=600");
}

function tipenven() {
  Window=open("https://www.roskildebank.dk/tipenven/tipform.asp","Popup","status=no,navigation=no,scrollbars=no,resizable=no,address=no,width=640,height=480");
}
            
/*Bruges til at åbne NetBank Hjælpen */
function BECOpenHelp(URL)
{
  BECOpenWindow(URL, 'BECHelp', '0', (screen.availWidth-410), '400', (screen.availHeight-30), 'resizable,scrollbars');
}  

function BECOpenWindow(URL, name, top, left, width, height, moreParams)
{
  var params = "";
  if (top != null)
  {
    params = "top=" + top; 
  }
  if (left != null)
  {
    params += ",left=" + left; 
  }
  if (width != null)
  {
    params += ",width=" + width; 
  }
  if (height != null)
  {
    params += ",height=" + height; 
  }
  if (moreParams != null)
  {
    params += "," + moreParams; 
  }
  window.open(URL, name, params);
}

function MC_erv_confirmation() {
	var answer = confirm("Jeg har læst og accepterer kortbestemmelser og prisliste.")
	if (answer){
		window.open('https://www.roskildebank.dk/filarkiv/MC_ans_erh.pdf');
	}
}

function MC_pri_confirmation() {
	var answer = confirm("Jeg har læst og accepterer kortbestemmelser og prisliste.")
	if (answer){
		window.open('https://www.roskildebank.dk/filarkiv/MC_ans_pri.pdf');
	}
}

function buildemail(p) {
a = 'roskildebank.dk';
document.write("<a href='&#109;a&#105;l&#116;o:"+ p +"&#064;"+ a +"'>"+ p +"&#064;"+ a +"</a>");
}

