﻿// JScript File


/*var ie = (document.all)?true:false;
var dt = new Array();
function init(){
  if(ie){
    d = document.getElementsByTagName('DIV');
    for(i=0;d.length>i;i++){
      if(d[i].style.position=='fixed'){
        d[i].style.position='absolute';
        dt[d[i].id] = parseInt(d[i].style.top);
      }
    }
  }
}*/
function reloadNewExternUrl(url){  
	var aktuelside = window.location.href.replace(window.location.search, "").replace(window.location.hash, "");
	window.location.href = aktuelside+"?siteUrl="+url;
}

function openLargePicture(strURL){
    openinytvindue(strURL, 'Billedvisning', '600', '750', 'Yes','Yes');
}

function openinytvindue(url, navn, h, w, scroll, resizable) {
	if (w == ''){
		w = 1024
	}
	if (h == ''){
		h = 768
	}
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	nytpopop = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable='+resizable+''
	w = "window";
	o = ".open";
	win = eval(w+o)(url, navn, nytpopop)

	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function janej(msg,url){
    input_box=confirm(msg);
    if (input_box==true){ 
        document.location.href=url; 
    }
    else{

    }
}

function submitForm(formName){
    var formRef = document.forms[formName];
    formRef.submit();
}
