// Bekrefter brukerens aktiviteter med en alert basert på url. // For eksempe vil http://www.amnesty.no/web.nsf/pages/01A70088B13AA39FC1256EC4002E1018?open&confirm=Tipset er sendt // presentere brukeren med en alert med teksten: Tipset er sendt url = location.href; if (url.indexOf('confirm=') > -1) { //var regexp = /%20/g alert(unescape(url.substring(url.indexOf('confirm=')+8,url.length))) } function getObj(obj) { if (document.getElementById) {return document.getElementById(obj).style;} else if (document.all) {return document.all[obj].style;} else if (document.layers) {return document.layers[obj];} } function setZindex(layr,num) { obj = getObj(layr); obj.zIndex = num; } function show(layr) { obj = getObj(layr); obj.visibility = "visible"; } function hide(layr) { obj = getObj(layr); obj.visibility = "hidden"; } function TipsEnVenn( email, sender, docTitle, docIngress, docUrl ){ if ( email == "" || !checkEmail(email) ) {alert( 'Vennligst bruk en gyldig e-postadresse i til-feltet' ); return;} if ( sender == "" ) {alert( 'Vennligst skriv inn avsender i fra-feltet' ); return;} if ( docTitle == "" ) {docTitle = "Amnesty International Norge";} if ( docIngress == "" ) {docIngress = "IngenIngress";} if ( docUrl == "" ) {docUrl = "http://www.amnesty.no";} else {temp = docUrl.split("/"); docUrl = temp[temp.length-1];} window.location = '/web.nsf/TipsEnVenn/?openAgent&'+email+'&'+sender+'&'+docTitle+'&'+docIngress+'&'+docUrl } function openPopup(url,width,height) { var myPopup; if (width == "full") width = screen.width; if (height == "full") { height = screen.height; windowprops = "width=" + width + ",height=" + height + ",scrollbars=yes"; } else { windowprops = "width=" + width + ",height=" + height; } if (!myPopup || myPopup.closed){ myPopup = window.open(url ,"popup" ,windowprops); } else{ myPopup.focus(); } } function nyhetsbrev(form,referer) { if ( form.Epost.value == "" || form.Epost.value == "E-postadresse her" ) { alert("Skriv inn e-postadresse"); form.Epost.focus(); return; } if ( ! checkEmail(form.Epost.value) ) { alert("Bruk en gyldig e-postadresse"); return; } else { window.location = '/web/medlem.nsf/SubscribeWeb/?openAgent&Referer=' + referer + '&Epost=' + form.Epost.value + '&NyhetsbrevAdresse=' + form.NyhetsbrevAdresse.value; } } function checkEmail(val) { if (val.match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/gi)) {return true;} else {return false;} } function hideEmail(user,dom) { var rec = user + "@" + dom; var sb_url = "mailto:" + rec; return rec.link(sb_url) } function randomImage() { var ran = ""; var ran = Math.floor(Math.random() * 3); if (ran == 0) {return "/web.nsf/files/FlashBox_1.gif/$File/FlashBox_1.gif";} if (ran == 1) {return "/web.nsf/files/FlashBox_2.gif/$File/FlashBox_2.gif";} if (ran == 2) {return "/web.nsf/files/FlashBox_3.gif/$File/FlashBox_3.gif";} } function popEmail(to,cc,bcc,subject,body) { var doc = "mailto:" + to + "?subject=" + escape(subject) + "&body=" + escape(body); window.location = doc; } function showMonth( shownum, hidenum ) { showname = "month" + shownum; hidename = "month" + hidenum; if (window.document.layers) { window.document.layers[showname].display = "block"; window.document.layers[hidename].display = "none"; } else { document.getElementById(showname).style.display = "block"; document.getElementById(hidename).style.display = "none"; } } function insertFlash(url, w, h) { document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); }