//       Define the location of count.asp
//     Using a path, you may use this code in any subfolder
       var file=strAppPath + '/asp/statestik/count.asp';
//	var file='http://www.dacsoftware.com/statestik/count.asp';
       var d=new Date();
       var s=d.getSeconds();
       var m=d.getMinutes();
       var x=s*m;
       f='' + escape(document.referrer);
       if (navigator.appName=='Netscape'){b='NS';}
       if (navigator.appName=='Microsoft Internet Explorer'){b='MSIE';}
       if (navigator.appVersion.indexOf('MSIE 3')>0) {b='MSIE';}
       u='' + escape(document.URL); w=screen.width; h=screen.height;
       v=navigator.appName;
       fs = window.screen.fontSmoothingEnabled;
       if (v != 'Netscape') {c=screen.colorDepth;}
       else {c=screen.pixelDepth;}
       j=navigator.javaEnabled();
       var info='w=' + w + '&h=' + h + '&c=' + c + '&r=' + f + '&u='+ u + '&fs=' + fs + '&b=' + b + '&x=' + x;
	
       function counter() 
       {
       document.write('<img src="' + file + '?'+info+ '" width=0 height=0 border=0 />');
       }

// function til at justere en iframe automatisk til indhold
function adjustIFrameSize (iframeWindow) {
  if (iframeWindow.document.height) {
    var iframeElement = parent.document.getElementById
(iframeWindow.name);
    iframeElement.style.height = iframeWindow.document.height + 'px';
    iframeElement.style.width = iframeWindow.document.width + 'px';
  }
  else if (document.all) {
    var iframeElement = parent.document.all[iframeWindow.name];
    if (iframeWindow.document.compatMode &&
        iframeWindow.document.compatMode != 'BackCompat') 
    {
      iframeElement.style.height = 
iframeWindow.document.documentElement.scrollHeight + 5 + 'px';
      iframeElement.style.width = 
iframeWindow.document.documentElement.scrollWidth + 5 + 'px';
    }
    else {
      iframeElement.style.height = 
iframeWindow.document.body.scrollHeight + 5 + 'px';
      iframeElement.style.width = 
iframeWindow.document.body.scrollWidth + 5 + 'px';
    }
  }
}


function callSlidepage(PageUrl) {
window.open (PageUrl, 'newwindow', config='height=600,width=740, toolbar=no, menubar=no, scrollbars=no, resizable=yes,location=no, directories=no, status=no')
}


function redirect(Url) {
if (document.images)
	location.replace(Url);
else
	location.href = Url;
}



// åbn print dialog
DA = (document.all) ? 1 : 0

//PRINT VED KALD "StartPrint ()" i Netscape og Explorer

function StartPrint() {
		if(DA){
			print();
			}
			else {
				window.print();
			}
		}


function verifySletVare(Varetekst){
    msg = "Er du sikker på at du vil SLETTE  \n \n >>> " + Varetekst + " <<< \n \n permanent fra prislisten?";
    return confirm(msg);
    }

function verifySletTilbud(Overskrift){
    msg = "Er du sikker på at du vil SLETTE varen med overskriften \n \n >>> " + Overskrift + " <<< \n \n Sletningen kan ikke senere fortrydes!!!!";
    return confirm(msg);
    }


function popUp(Url) 
    {
      newWindow = window.open(Url,'newWindow','width=800,height=600,resizable,scrollbars,location=top,top=0');
    }

MinIE4 = (document.all)? true:false
function keyDown(e) {
	if (MinIE4) 
        if (window.event.shiftKey) {
	if (window.event.ctrlKey) {
        if (window.event.keyCode == 76) //L = login
//	location.href = strAppPath + '/asp/functions/login.asp?FromUrl='+ self.location.href;
	location.href = strAppPath + '/asp/functions/adminlogin.asp?ID=' + strID;
        if (window.event.keyCode == 88) //X = logout
//	location.href = strAppPath + '/asp/functions/login.asp?logout=1&FromUrl=' + self.location.href;
	location.href = strAppPath + '/default.asp?ID=1999';
//	location.href = strAppPath + '/asp/function/admin.asp';
        if (window.event.keyCode == 65) //A = Gå til Admin
	location.href = strAppPath + '/asp/functions/admin.asp';
        if (window.event.keyCode == 82) //R = Reset Application
	location.href = strAppPath + '/asp/functions/application_reset.asp?FromUrl=' + self.location.href;
        if (window.event.keyCode == 69) //E = Skift mellem Edit mode og normal mode
	location.href = strAppPath + '/asp/functions/login.asp?EditMode=Edit&FromUrl=' + self.location.href;
}	
}
}

if (MinIE4) document.onkeydown = keyDown
