/* Function openPicture(file, width, height) Opens picture in new window */ function openPicture(file, width, height) { var myWinWidth = 0; var myWinHeight = 0; var myWinPosLeft = 0; var myWinPosTop = 0; if (width > (screen.width - 100)) myWinWidth = screen.width - 100; else myWinWidth = width; if (height > (screen.height - 150)) myWinHeight = screen.height - 150; else myWinHeight = height; myWinPosLeft = (screen.width - myWinWidth) / 2; myWinPosTop = (screen.height - myWinHeight) / 2; win = window.open("openpic.php?file=" + file, "etPicShow", "height=" + myWinHeight + ",width=" + myWinWidth + ",top=" + myWinPosTop + ",left=" + myWinPosLeft + ",scrollbars=auto,toolbar=no,statusbar=no"); if (win.window.focus) win.window.focus(); } /* Function doTipFriend(id) Opens window for the tip-a-friend function */ function doTipFriend(id) { var myWinWidth = 275; var myWinHeight = 175; var myWinPosLeft = 0; var myWinPosTop = 0; myWinPosLeft = (screen.width - myWinWidth) / 2; myWinPosTop = (screen.height - myWinHeight) / 2; winTip = window.open("tipafriend.php?aid=" + id, "etTipFriend", "height=" + myWinHeight + ",width=" + myWinWidth + ",top=" + myWinPosTop + ",left=" + myWinPosLeft + ",scrollbars=auto,toolbar=no,statusbar=no"); if (winTip.window.focus) winTip.window.focus(); } /* Function onClickUserSearch() onClickUserSearch */ function onClickUserSearch() { if (document.doSearch.userSearch.value == 0) { document.all.searchUser.src = 'images/d_searchbox_checkbox_on.gif'; document.all.searchArticle.src = 'images/d_searchbox_checkbox_off.gif'; document.doSearch.userSearch.value = 1; document.doSearch.articleSearch.value = 0; } else { document.all.searchUser.src = 'images/d_searchbox_checkbox_off.gif'; document.doSearch.userSearch.value = 0; } } /* Function onClickArticleSearch() onClickArticleSearch */ function onClickArticleSearch() { if (document.doSearch.articleSearch.value == 0) { document.all.searchUser.src = 'images/d_searchbox_checkbox_off.gif'; document.all.searchArticle.src = 'images/d_searchbox_checkbox_on.gif'; document.doSearch.userSearch.value = 0; document.doSearch.articleSearch.value = 1; } else { document.all.searchArticle.src = 'images/d_searchbox_checkbox_off.gif'; document.doSearch.articleSearch.value = 0; } } /* Function onAutoLogin() Does some tricks when a user choose auto login on/off */ function onAutoLogin() { if (document.login.lAutologin.value == 0) { if(confirm("Bemærk venligst:\n\nSidder du ved en offentlig tilgængelig computer\n- f.eks. på et bibliotek eller på arbejde - vil vi\nstærkt fraråde at denne funktion benyttes.\n\nKlik \"Ok\" hvis du ønsker at benytte dig af autologin\neller \"Annuller\" hvis du ikke ønsker at benytte det!")) { document.all.loginCheckbox.src = 'images/d_checkbox_orange_on.gif'; document.login.lAutologin.value = 1; } else { document.all.loginCheckbox.src = 'images/d_checkbox_orange_off.gif'; document.login.lAutologin.value = 0; } } else { document.all.loginCheckbox.src = 'images/d_checkbox_orange_off.gif'; document.login.lAutologin.value = 0; } } /* Function onAutoLoginSite() Does some tricks when a user choose auto login on/off */ function onAutoLoginSite() { if (document.loginSite.lAutologin.value == 0) { if(confirm("Bemærk venligst:\n\nSidder du ved en offentlig tilgængelig computer\n- f.eks. på et bibliotek eller på arbejde - vil vi\nstærkt fraråde at denne funktion benyttes.\n\nKlik \"Ok\" hvis du ønsker at benytte dig af autologin\neller \"Annuller\" hvis du ikke ønsker at benytte det!")) { document.all.loginSiteCheckbox.src = 'images/d_checkbox_orange_on.gif'; document.loginSite.lAutologin.value = 1; } else { document.all.loginSiteCheckbox.src = 'images/d_checkbox_orange_off.gif'; document.loginSite.lAutologin.value = 0; } } else { document.all.loginSiteCheckbox.src = 'images/d_checkbox_orange_off.gif'; document.loginSite.lAutologin.value = 0; } } /* Function onCreateNewsletter() Does some tricks when a user choose newsletter on/off in the registerUser form */ function onCreateNewsletter() { if (document.registerUser.regNewsletter.value == 0) { document.all.onoffNewsletter.src = 'images/d_checkbox_orange_on.gif'; document.registerUser.regNewsletter.value = 1; } else { document.all.onoffNewsletter.src = 'images/d_checkbox_orange_off.gif'; document.registerUser.regNewsletter.value = 0; } } /* Function onChangeNewsletter() Does some tricks when a user choose newsletter on/off in the changeInfo form */ function onChangeNewsletter() { if (document.changeInfo.chgNewsletter.value == 0) { document.all.onoffNewsletter.src = 'images/d_checkbox_orange_on.gif'; document.changeInfo.chgNewsletter.value = 1; } else { document.all.onoffNewsletter.src = 'images/d_checkbox_orange_off.gif'; document.changeInfo.chgNewsletter.value = 0; } } /* Function onCreateConditions() Does some tricks when a user choose conditions on/off in the registerUser form */ function onCreateConditions() { if (document.registerUser.regAcceptedConditions.value == 0) { document.all.onoffConditions.src = 'images/d_checkbox_orange_on.gif'; document.registerUser.regAcceptedConditions.value = 1; } else { document.all.onoffConditions.src = 'images/d_checkbox_orange_off.gif'; document.registerUser.regAcceptedConditions.value = 0; } } /* Function onAucEfterkrav() createAuction */ function onAucEfterkrav() { if (document.createAuction.aucEfterkrav.value == 0) { document.all.picEfterkrav.src = 'images/d_checkbox_orange_on.gif'; document.createAuction.aucEfterkrav.value = 1; } else { document.all.picEfterkrav.src = 'images/d_checkbox_orange_off.gif'; document.createAuction.aucEfterkrav.value = 0; } } /* Function onAucAfhentning() createAuction */ function onAucAfhentning() { if (document.createAuction.aucAfhentning.value == 0) { document.all.picAfhentning.src = 'images/d_checkbox_orange_on.gif'; document.createAuction.aucAfhentning.value = 1; } else { document.all.picAfhentning.src = 'images/d_checkbox_orange_off.gif'; document.createAuction.aucAfhentning.value = 0; } } /* Function onAucBankoverforsel() createAuction */ function onAucBankoverforsel() { if (document.createAuction.aucBankoverforsel.value == 0) { document.all.picBankoverforsel.src = 'images/d_checkbox_orange_on.gif'; document.createAuction.aucBankoverforsel.value = 1; } else { document.all.picBankoverforsel.src = 'images/d_checkbox_orange_off.gif'; document.createAuction.aucBankoverforsel.value = 0; } } /* Function onAucPersonligcheck() createAuction */ function onAucPersonligcheck() { if (document.createAuction.aucPersonligcheck.value == 0) { document.all.picPersonligcheck.src = 'images/d_checkbox_orange_on.gif'; document.createAuction.aucPersonligcheck.value = 1; } else { document.all.picPersonligcheck.src = 'images/d_checkbox_orange_off.gif'; document.createAuction.aucPersonligcheck.value = 0; } } /* Function confirmDelMes(messageid, type) Confirm delete message */ function confirmDelMes(messageid, type) { if(confirm("Er du sikker på, at du vil du slette denne besked?")) { document.location.href="mail_delete.php?type=" + type + "&did=" + messageid; } } /* Function doBlink(x) Blinks "Nye beskeder (x)" on new messages */ function doBlink(x) { if (x != 2) document.all.newMessages.className='doBlink'; else document.all.newMessages.className=''; if (x == 1) x = 2; else x = 1; window.setTimeout("doBlink(" + x + ")", 1000); }