document.emneTypeID = null; document.maerkeID = null; document.opbygningID = null; document.akselID = null; document.aargangFra = null; document.aargangTil = null; function initFields() { document.emnetypeIdSelect = document.getElementById('emneTypeID'); document.maerkeIdSelect = document.getElementById('maerkeID'); document.opbygningIdSelect = document.getElementById('opbygningID'); document.akselIdSelect = document.getElementById('akselID'); document.aargangFraIdSelect = document.getElementById('aargang_Fra'); document.aargangTilIdSelect = document.getElementById('aargang_Til'); } function ResetSearch() { var today = new Date(); var expire = new Date(); var j = 0; expire.setTime(today.getTime() - 1); var emneTypeCount = 6; for (i=0; i= AargangMin; x--) { var isSelected = ReadCookie('aargangTil'); var boolSelected = false; if (isSelected == x) { boolSelected = true; } addOption(document.aargangTilIdSelect,x,x,boolSelected); } } function isEmail( strValue) { var objRegExp = /^\w+([\-\.]\w+)*\@\w+([\-\.]\w+)*\.[a-z]{2,3}$/i; return objRegExp.test(strValue); } function displayTR() { //v2.0 var i,p,v,obj,args=displayTR.arguments; for (i=0; i<(args.length-2); i+=3) { if ((obj=document.getElementById(args[i]))!=null) { v=args[i+2]; { if (obj.style) { obj=obj.style; v=(v=='')?'':(v='none')?'none':v; } obj.display=v; } } } } function checkFileFormat (theFileUploadObj) { theFileName = theFileUploadObj.value; theFileExt = theFileName.substr(theFileName.lastIndexOf(".")); theFileExt = theFileExt.toLowerCase(); switch (theFileExt){ case ".jpg" : case ".jpeg" : case ".gif" : // alert(theFileName.substr(theFileName.lastIndexOf("."))); theFileUploadObj.style.backgroundColor = ""; return true; break; case "" : // alert(theFileName.substr(theFileName.lastIndexOf("."))); theFileUploadObj.style.backgroundColor = ""; return true; break; default : alert("Filformatet er ikke understøttet"); theFileUploadObj.style.backgroundColor = "#FFCC00"; theFileUploadObj.focus(); return false; } } function NG_displayLayers() { //v2.0 var i,p,v,obj,args=NG_displayLayers.arguments; for (i=0; i<(args.length-2); i+=3) { if ((obj=document.getElementById(args[i]))!=null) { v=args[i+2]; { if (obj.style) { obj=obj.style; v=(v=='')?'block':(v='none')?'none':v; } obj.display=v; } } } } function PLB_validateForm() { //v3.0 var i,p,q,nm,test,num,min,max,errors=false,error=false,args=PLB_validateForm.arguments; for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]); if (val) { nm=val.name; error=false; if ((val=val.value)!="") { if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@'); if (p<1 || p==(val.length-1)) error=true; } else if (test!='R') { num = parseFloat(val); if (val!=''+num) error=true; if (test.indexOf('inRange') != -1) { p=test.indexOf(':'); min=test.substring(8,p); max=test.substring(p+1); if (num"; if (imgWidth) { objDivStyle.width = (imgWidth + windowPadding); objDivStyle.height = (imgHeight + windowPadding); } clearInterval(thumpInt); } } function showPop(imgName,hideSwitch) { thumpImg.src = imgName; imgWidth = thumpImg.width; imgHeight = thumpImg.height; thumpInt = window.setInterval("checkImg('" + imgName + "')",100); windowPadding = 24; if (mouseThumpX + imgWidth + 24 + 20 >= document.body.clientWidth) { objDivStyle.left = mouseThumpX - (imgWidth + 24 + 30); } if ((mouseThumpY - document.body.scrollTop) + imgHeight + windowPadding > document.body.clientHeight) { objDivStyle.top = (mouseThumpY - (((mouseThumpY - document.body.scrollTop) + imgHeight + windowPadding + 10) - document.body.clientHeight)); } if (document.all.minibannerTabel && hideSwitch) { minibannerArray = new Array(); if (document.all.minibannerTabel.innerHTML.indexOf(".swf") != -1) { minibannerArray[minibannerArray.length] = document.all.minibannerTabel; document.all.minibannerTabel.style.visibility = "hidden" } else if (document.all.minibannerTabel.all.tags("SELECT") && document.all.minibannerTabel.all.tags("SELECT").length > 0) { for (i = 0; document.all.minibannerTabel.all.tags("SELECT")[i]; i++) { minibannerArray[minibannerArray.length] = document.all.minibannerTabel.all.tags("SELECT")[i]; document.all.minibannerTabel.all.tags("SELECT")[i].style.visibility = "hidden"; } } } document.all.thumpLayer.style.visibility = "visible"; } function hidePop() { if (document.all) { document.all.thumpLayer.style.visibility = "hidden"; document.all.thumpLayer.style.backgroundColor = strPopBG; if (minibannerArray.length > 0) for (i = 0; minibannerArray[i]; i++) minibannerArray[i].style.visibility = "visible"; document.all.thumpPic.innerHTML = ""; clearInterval(thumpInt); } } var strPopBG; function positionPop(imgName,hideSwitch,specialPopBG) { if (document.all) { mouseThumpX = event.clientX - event.offsetX + document.body.scrollLeft + 20; mouseThumpY = event.clientY - event.offsetY + document.body.scrollTop; objDivStyle = document.all.thumpLayer.style; objDivStyle.left = mouseThumpX; objDivStyle.top = mouseThumpY; strPopBG = objDivStyle.backgroundColor; if (typeof specialPopBG == "string") objDivStyle.backgroundColor = specialPopBG; objDivStyle.visibility = "visible"; if (typeof hideSwitch != "number") hideSwitch = 0; showPop(imgName,hideSwitch); } } function addFavorite(id){ SetCookie("favorit_"+id,"1",60); alert(''); } function deleteFavorite(id){ SetCookie("favorit_"+id,"1",-60); alert('Emnet er nu slettet fra din favoritliste.'); location.href = "/default.asp?pagetemp=standard&pageload=favoritlist"; }