// proCMS standard javascripts function findMenuLeftStart(){ var ie4_check = (document.all && !document.getElementById) ? true : false; var ie5_check = (document.all && document.getElementById) ? true : false; if (ie4_check || ie5_check) { width = document.body.clientWidth; } else { width = window.innerWidth; } width = width/2-490 return(parseInt(width)); } function addbookmark(bookmarkurl,bookmarktitle){ if (document.all){ window.external.AddFavorite(bookmarkurl,bookmarktitle) } } function validate_contact (frm) { var send,varAlert; varAlert = ""; var strPat = /^\w[\w\.\-]*@\w[\w\-\.]*\.\w{2}[\w\.\-\/]*$/i; var str = frm.Email.value; if (frm.Virksomhed.value == "") { varAlert = varAlert + "- Enter company name\n"; send = false; } if (frm.Navn.value == "") { varAlert = varAlert + "- No name specified.\n"; send = false; } if (frm.Land.value == "") { varAlert = varAlert + "- No country specified\n"; send = false; } if (frm.Telefon.value == "") { varAlert = varAlert + "- Please enter phone number\n"; send = false; } if ( strPat.test( str ) ) { } else { varAlert = varAlert + "- The entered email address is not valid.\n"; send = false; } if (frm.Kommentar.value == "") { varAlert = varAlert + "- No comment entered.\n"; send = false; } if (send == false) { alert(varAlert); return false; } else { return true; } } function validate_email(frm) { var send,varAlert; varAlert = ""; var strPat = /^\w[\w\.\-]*@\w[\w\-\.]*\.\w{2}[\w\.\-\/]*$/i; var str = frm.email.value; if ( strPat.test( str ) ) { } else { varAlert = "- The entered email address is not valid.\n"; send = false; } if (send == false) { alert(varAlert); return false; } else { frm.submit(); } } function validate_email2(frm) { var send,varAlert; varAlert = ""; var strPat = /^\w[\w\.\-]*@\w[\w\-\.]*\.\w{2}[\w\.\-\/]*$/i; var str = frm.email.value; if ( strPat.test( str ) ) { } else { varAlert = "- The entered email address is not valid.\n"; send = false; } if (send == false) { alert(varAlert); frm.actionMode[0].checked = false; frm.actionMode[1].checked = false; return false; } else { frm.submit(); } } function validate_recommend(frm) { var send,varAlert; varAlert = ""; var strPat = /^\w[\w\.\-]*@\w[\w\-\.]*\.\w{2}[\w\.\-\/]*$/i; var your_email = frm.your_email.value; var friend_email = frm.friend_email.value; if ( strPat.test( your_email ) ) { } else { varAlert += "- Your email address is not valid.\n"; send = false; } if ( strPat.test( friend_email ) ) { } else { varAlert += "- Your friend's email address is not valid.\n"; send = false; } if (send == false) { alert(varAlert); return false; } else { frm.submit(); } } function change(divId) { var d = document.getElementById("" + divId + ""); if (d.style.visibility == "hidden") { d.style.visibility="visible"; d.style.display=''; } else { d.style.visibility="hidden"; d.style.display='none'; } }