function gotoDefaultField(field) { if (location.href.indexOf('&Seq=')==-1) if (document.forms[0].elements[field]) document.forms[0].elements[field].focus(); } function isValidDate(value) { dt = new Date(value); if (isNaN(dt.getDate())) return false else return true; } function checkDate(fieldName,label) { var field=document.forms[0].elements[fieldName]; if (field) { if (field.value!="") { if (! isValidDate(field.value)) { alert(replaceSubString('%1 er ikke en gyldig dato.','%1',label)); field.focus(); } } } } function login(param) { if (location.href.toUpperCase().indexOf('&LOGIN')!=-1) return; var arr = new Array(); var found=false; var pos=0; var i=0; var loc=location.href.toUpperCase(); arr=param.split(';'); for (i=0; i'+text+''); } function writeResponseLink(unId,text) { if (unId==curUnId) document.write(text+' Du er her.'); else document.write(text); } function setDlgSizePos(left,top,width,height,centerInParent,centerOnScreen) { winLeft = (browser.isIE) ? window.screenLeft : window.screenX; winTop = (browser.isIE) ? window.screenTop : window.screenY; winWidth = (browser.isIE) ? document.body.offsetWidth : window.innerWidth; winHeight = (browser.isIE) ? document.body.offsetHeight : window.innerHeight; if (width!='-1') { winWidth=eval(width); if (browser.isIE) winWidth=winWidth+10 } if (height!='-1') { winHeight=eval(height); if (browser.isIE) winHeight=winHeight+29; } if (centerInParent=='.Yes') { parentLeft = (browser.isIE) ? window.opener.screenLeft : window.opener.screenX; parentTop = (browser.isIE) ? window.opener.screenTop : window.opener.screenY; parentWidth = (browser.isIE) ? window.opener.document.body.offsetWidth : window.opener.innerWidth; parentHeight = (browser.isIE) ? window.opener.document.body.offsetHeight : window.opener.innerHeight; winLeft = parentLeft+(parentWidth-winWidth)/2; winTop = parentTop+(parentHeight-winHeight)/2; } else if (centerOnScreen=='.Yes') { winLeft = (screen.availWidth-winWidth)/2; winTop = (screen.availHeight-winHeight)/2; } else { if (left!='-1') if (left.substring(0,1)=='+' || left.substring(0,1)=='-') { winLeft=(browser.isIE) ? window.opener.screenLeft+eval(left) : window.opener.screenX+eval(left); if (winLeft<0) winLeft=0; } else winLeft=eval(left); if (top!='-1') if (top.substring(0,1)=='+' || top.substring(0,1)=='-') { winTop=(browser.isIE) ? window.opener.screenTop+eval(top) : window.opener.screenY+eval(top); if (winTop<0) winTop=0; } else winTop=eval(top); } if (window.left!=winLeft || window.top!=winTop) window.moveTo(winLeft,winTop); if (window.width!=winWidth || window.height!=winHeight) window.resizeTo(winWidth,winHeight); } function changeLocationValue(key,value,urlParam) { var loc = location.href; var refPage = ''; var found = false; if (loc.indexOf('&RefPage=')!=-1) { refPage=loc.substring(loc.indexOf('&RefPage='),loc.length); loc=loc.substring(0,loc.indexOf('&RefPage=')); } if (urlParam!=null && urlParam!='') { if (loc.indexOf(urlParam)==-1) { if (loc.indexOf('#')==-1) { loc=loc+urlParam; } else { loc=loc.substring(0,loc.indexOf('#'))+urlParam+loc.substring(loc.indexOf('#'),loc.length); } } } arr=loc.split('&'); for (i=0; i" : ""; var d = (document.layers) ? "document.layers[" + object + "]":"document.all[" + object +"]"; //what = "xPos>[" + event.x + "] yPos>[" + event.y + "]scrollTop>[" + document.body.scrollTop + "] scrollLeft>[" + document.body.scrollLeft.y + "]"; // create document if (document.layers) { document.layers[object].document.open(); document.layers[object].document.write(lead+what+tail); document.layers[object].document.close(); } if (document.all) { document.all[object].innerHTML=lead+what+tail; } //set position for NS and IE pop-up and display if (document.layers && document.layers[object] != null) { xPos=e.pageX + 10; yPos=e.pageY - 2; if (yPos + document.layers[object].document.height - self.pageYOffset > self.innerHeight){yPos = yPos - document.layers[object].document.height - 2} if (xPos + document.layers[object].document.width - self.pageXOffset > self.innerWidth){xPos = xPos - document.layers[object].document.width - 10} document.layers[object].moveTo(xPos,yPos); document.layers[object].visibility = 'visible'; } else { if (document.all) { xPos=event.x + 20; yPos=event.y - 10; if (yPos + document.all['pT'].clientHeight - document.body.scrollTop > document.body.offsetHeight) { yPos = yPos - (document.all['pT'].clientHeight - 10) } if (xPos + document.all['pT'].clientWidth - document.body.scrollLeft > document.body.offsetWidth) { xPos = xPos - (document.all['pT'].clientWidth + 30) if (browser.ie4) yPos=yPos+20; } document.all[object].style.pixelLeft = xPos + document.body.scrollLeft; document.all[object].style.pixelTop = yPos + document.body.scrollTop; document.all[object].style.visibility = 'visible'; } } // var message; // (typeof s == "number") ? message=m[s]:message = s; // window.status=message; return true; } function hide(object) { if (document.layers && document.layers[object] != null) document.layers[object].visibility = 'hidden'; else if (document.all) { if (object == 'pU1'){document.all[object].innerHTML="";} document.all[object].style.visibility = 'hidden'; } window.status=""; }