function OpenNewWindow(href,name,x,y,l,t,scroll,res) { mywin = window.open(href,name,"width="+x+",height="+y+",left="+l+",top="+t+",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars="+scroll+",resizable="+res); mywin.focus(); } function OpenNewKuvaWindow(href) { OpenNewWindow(href,'LPV',600,600,0,0,'yes','yes'); } function OpenNewHelpWindow(href) { OpenNewWindow(href,'LPVOhje',600,250,300,300,'yes','yes'); } function onloadfunctions() { if(parent.frames["userinfo"] != undefined) { parent.frames["userinfo"].location.reload() } } // ------------------------------------------------------------------- // autoComplete (CONTROL field, ARRAY items, BOOLEAN forcematch) // Usage: // // // Arguments: // field = text input field object // items = array of items in autocomplete // forcematch = true or false. Set to 'true' to not allow any text // in the text box that does not match an option. Only // supported in IE (possible future Netscape). // ------------------------------------------------------------------- function autoComplete (field, items, forcematch) { var found = false; for (var i = 0; i < items.length; i++) { if (items[i].toUpperCase().indexOf(field.value.toUpperCase()) == 0) { found=true; break; } } if (field.createTextRange) { if (forcematch && !found) { field.value=field.value.substring(0,field.value.length-1); return; } var cursorKeys ="8;46;37;38;39;40;33;34;35;36;45;"; if (cursorKeys.indexOf(event.keyCode+";") == -1) { var r1 = field.createTextRange(); var oldValue = r1.text; var newValue = found ? items[i] : oldValue; if (newValue != field.value) { field.value = newValue; var rNew = field.createTextRange(); rNew.moveStart('character', oldValue.length) ; rNew.select(); } } } }