﻿// JScript File
var timeouttimer = null

function ResetTimeout(ATimeOut)
{
    if (timeouttimer != null) clearTimeout(timeouttimer);                                   
    timeouttimer = window.setTimeout("ShowTimeout();",ATimeOut); 
}

function ShowTimeout() {
    MR.directCall('ShowTimeout');
}

MR.directCall('StartTimeout');

function PosDropDownImg()
{
    Inputs = document.getElementsByTagName("input");
    for (var i = 0; i < Inputs.length; i++)
    {
        Id = Inputs[i].id;
        InputBox = document.getElementById(Id);
        Img = document.getElementById(Id + "DDI");
        Lbl = document.getElementById(Id + "-label");
        if ((InputBox) && (Img) && (Lbl))
            Img.style.left = (Lbl.clientWidth + InputBox.clientWidth -4)+ "px";
    }
}


function RemoveItem(AID) {
    var WcloseMe = MR.getId(AID);
	if (!WcloseMe) return
	WcloseMe.parentNode.removeChild(WcloseMe);
}

// qqqq SKAL FLYTTES TIL FormEdit.js
function ShowHide(AId, AShow)
{
    var Elem = document.getElementById(AId);
    if (Elem)
    {
        if (AShow == 1)
            Elem.style.display = 'block';
    	else
            Elem.style.display = 'none';
    }
	    
    testheight();	    
}
 

