function windowOpener(target, width, height){ controlWindow=window.open(target,"","toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=" + width + ",height=" + height + ""); } function setHeightcontent(adjustVal){ var adjustBy=adjustVal; if (adjustBy==undefined){adjustBy=0} var x = document.getElementById('section2'); var y = document.getElementById('contentcontainer'); if(typeof(x)==undefined | typeof(y)== undefined){ return false; } if ((x.offsetHeight) < 100 ){ y.style.height = (x.offsetHeight+130+adjustBy)+"px"; } else { y.style.height = (x.offsetHeight+10+adjustBy)+"px"; } } var forms_sErrorCheck = "angiv"; var forms_sErrorEmail = "navn@adresse.dk"; var forms_sErrorDigits = "skriv kun tal" function forms_validate ( oForm ) { if ( window.opera ) return; var bSubmit = true; var bValid = true; var bPWOld = true; var bPWNew = false; var aInputs = oForm.getElementsByTagName ( "input" ); for ( var i=0; i < aInputs.length; i++ ) { bValid = true; if ( aInputs [ i ].id.indexOf ( "check" ) !=-1 && aInputs [ i ].value == "" || aInputs [ i ].value == forms_sErrorCheck ) { aInputs [ i ].style.color = "red"; aInputs [ i ].value = forms_sErrorCheck; aInputs [ i ].onmousedown = forms_resetField; bSubmit = false; bValid = false; } else if ( aInputs [ i ].id.indexOf ( "digits" ) !=-1 && ( isNaN ( aInputs [ i ].value ) || aInputs [ i ].value == forms_sErrorDigits || aInputs [ i ].value == "" )) { aInputs [ i ].style.color = "red"; aInputs [ i ].value = forms_sErrorDigits; aInputs [ i ].onmousedown = forms_resetField; bSubmit = false; } else if ( aInputs [ i ].id.indexOf ( "email" ) !=-1 ) { if ( aInputs [ i ].value == "" || aInputs [ i ].value.indexOf ( "@" ) ==-1 || aInputs [ i ].value.indexOf ( "." ) ==-1 || aInputs [ i ].value == forms_sErrorEmail ) { aInputs [ i ].style.color = "red"; aInputs [ i ].value = forms_sErrorEmail; aInputs [ i ].onmousedown = forms_resetField; bSubmit = false; } } if(oForm.name=='_ChangePassword'){ if(bValid != true && aInputs [ i ].id == 'check3') bPWOld = false; if(bValid != true && (aInputs [ i ].id == 'check4' || aInputs [ i ].id == 'check6')) bPWOld = true; if(bValid != true && (aInputs [ i ].id == 'check3' || aInputs [ i ].id == 'check4')) bPWNew = true; if(bValid != true) displayMessage(aInputs [ i ], 'block'); else displayMessage(aInputs [ i ], 'none'); } } if(oForm.name=='_ChangePassword'){ var valMes0=document.getElementById('valcheck0'); var valMes1=document.getElementById('valcheck1'); var valMes2=document.getElementById('valcheck2'); var valMes5=document.getElementById('valcheck5'); var valMes7=document.getElementById('valcheck7'); valMes1.style.display='none'; if(oForm.Password.value == oForm.NewPassword.value && (bSubmit == true || bPWNew == false)){ bSubmit=false; valMes5.style.display='block'; } else valMes5.style.display='none'; if(oForm.NewPassword.value != oForm.VerifyPassword.value && (bSubmit == true || bPWOld == false)){ bSubmit=false; valMes7.style.display='block'; } else valMes7.style.display='none'; if(bSubmit != true){ valMes0.style.display='block'; valMes2.style.display='block'; } else{ valMes0.style.display='none'; valMes2.style.display='none'; } } if (bSubmit == true && oForm.name=='LoginForm') qpLogin(); else return bSubmit; } function forms_resetField ( e ) { if ( !e ) var e = window.event; var node = e.target ? e.target : e.srcElement; if ( node.nodeType == 3 ) node = node.parentNode; node.value = ""; node.style.color = "#003E80"; node.onmousedown = "return;"; if(oForm.name=='_ChangePassword'){ var valMes=document.getElementById('val'+node.id); valMes.style.display='none'; } } function displayMessage(valId, disp){ if (valId.id.indexOf ( "check" ) !=-1){ var valMes=document.getElementById('val'+valId.id); valMes.style.display=disp; } } function qpLogin(){ var uname=document.forms['LoginForm'].Username.value; var un1=uname.replace("@", "_"); var un2=un1.replace(".","_"); if (un2!="") { document.forms['LoginForm'].Username.value=un2; var chname=document.forms['LoginForm'].PeopleChangePassword.value; var pos=chname.indexOf(un2); if (pos>=0) { var diaWidth=330; var diaHeight=210; var diaLeft=(screen.width-diaWidth)/2; var diaTop=(screen.height-diaHeight)/2; var winopts="toolbar=no, directories=no, status=no, menubar=no, copyhistory=no, width="+diaWidth+", height="+diaHeight+", left="+diaLeft+", top="+diaTop window.open("../ChangePassword?OpenForm&Seq=1&UserID="+un2,"ChangeDialog",winopts); } } document.forms['LoginForm'].submit(); } function sendLink(target, width, height){ var diaLeft=(screen.width-width)/2; var diaTop=(screen.height-height)/2; var winopts="toolbar=no, directories=no, status=no, menubar=no, copyhistory=no, width="+width+", height="+height+", left="+diaLeft+", top="+diaTop // var winopts="toolbar=yes, directories=no, status=yes, menubar=yes, copyhistory=no, width="+width+", height="+height+", left="+diaLeft+", top="+diaTop window.open(target,"SendLink",winopts); } function clearSearch() { if (document.forms['SoegForm'].Soeg.value == document.forms['SoegForm'].Soeg.defaultValue) document.forms['SoegForm'].Soeg.value = ""; } function DoSearch() { if ( !document.forms['SoegForm'].Soeg.value.length == 0) { //SearchStr = escape( document.forms['SoegForm'].Soeg.value ); SearchStr = GetQueryString(); document.location.href="../SearchView/SearchResult?SearchView&Query=" + SearchStr; } } function GetQueryString() { var gqs = ""; var qsv = escape(document.forms['SoegForm'].Soeg.value); var sfv = document.forms['SoegForm'].SearchFields.value; var spl = sfv.split("; "); if (!spl.length == 0) { for(i=1; i < spl.length; i++) { //Query string should not be longer than 512 caracters - Domino does not accept it; if (512 <= (gqs.length+4+14+qsv.length)) break; if (!gqs == "") gqs = gqs + "+OR+"; gqs = gqs + "[" + spl[i] + "]+CONTAINS+(" + qsv + ")"; } } return gqs; } function windowWidth() { var myWidth = 0; if( typeof( window.innerWidth ) == 'number' ) { //Non-IE myWidth = window.innerWidth; } else { if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode' myWidth = document.documentElement.clientWidth; } else { if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible myWidth = document.body.clientWidth; } } } return myWidth; } function Oldsurfto(form) { var myindex=form.select1.selectedIndex if (form.select1.options[myindex].value != 0) { location=form.select1.options[myindex].value;} } function surfto(thisItem) { var myindex=thisItem.selectedIndex; if (thisItem.options[myindex].value != 0) { location=thisItem.options[myindex].value;} } function WebPath(){ var Path = location.pathname; var nsfLocation = Path.indexOf(".nsf")+4; var nsfPath = Path.substr(0,nsfLocation); return nsfPath } function printme(unique){ var target = '/broen/CMSdocuk.nsf/content/prodprint?Readform&Unique='+unique; sendLink(target, 500, 600) }