/*********************************************** * REDIGERA INNEHÅLL * ************************************************/ function _editContent(contentTitle,w, wysiwyg){ var ww = (w+80); if(ww < 400) ww = 400; winAdmin = window.open('/_editor/editContent.asp?ct=' + contentTitle + '&w=' + (w+62) + '&wysiwyg=' + wysiwyg, '','toolbar=0,resizable=1,scrollbars=auto,width=' + ww + ',height=500'); return winAdmin; } function _contentHover(contentTitle, b){ var cid = document.getElementById(contentTitle); if(b) cid.style.border = '1px solid #6C6'; else cid.style.border = '1px solid #FFF'; return true; } /*********************************************** * VISA/GÖM ADMINISTRATION * ************************************************/ var adminhide = false; function _doAdminTools(){ if(!adminhide) { var display = 'none'; adminhide = true; var c = 'deactive'; } else { var display = ''; adminhide = false; var c = ''; } // Spara inställningen if (window.XMLHttpRequest) var xml = new XMLHttpRequest(); else if (window.ActiveXObject) var xml = new ActiveXObject("Microsoft.XMLHTTP"); if(xml){ xml.open('POST','/_admin/_admin.asp?action=setAdminTools&display=' + adminhide,true); xml.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xml.send('display=' + adminhide); } var adminNav = document.getElementById('admin-nav').getElementsByTagName('a'); adminNav[1].style.display = display; adminNav[2].style.display = display; //adminNav[3].style.display = display; document.getElementById('formStats').style.display = display; document.getElementById('newnav').style.display = display; document.getElementById('newsubnav').style.display = display; document.getElementById('admin-menu').style.display = display; var editBtns = document.getElementsByTagName('div'); var editBtnsL = document.getElementsByTagName('span'); var menuBtns = document.getElementsByTagName('a'); for(var i=0; i 100) stopDrag(); } else { if((diffY < -3 || diffY > 3)){ drag = true; startDrag(); } } } function startDrag(){ if(press && drag && m && (e.srcElement.tagName == 'IMG' || e.srcElement.tagName == 'A')){ m = document.getElementById('m-' + dragID); m.style.display = 'block'; m.style.top = eval(e.y-10) + 'px'; //window.status=e.srcElement.id; //window.status=eval(e.y) + ' - ' + dragID; window.status=e.srcElement.tagName; var s = e.srcElement; } else stopDrag(); } function stopDrag(){ e.cancelBubble; drag = false; press = false; if(m) m.style.display = 'none'; m = null; document.ondragstart=new Function("return true") document.onselectstart=new Function("return true") dragID = null; _doMenuDrop(mID); return true; } } function _doMenuDrop(mID){ if(mID){ var mm = document.getElementById('mm-' + mID); e = window.event; if(dragID){ mm.style.borderTop = '1px solid #000'; document.onmouseout=getOut; } else { getOut(); } } else getOut(); function getOut(){ mm.style.borderTop = '0'; } } function _doMenuMove(up,pageId){ } /********************************************* * SORTERA MENYN * **********************************************/ function _doMoveMenu(w, pid, cat){ var oldPid = document.getElementById('mli-' + cat + '-' + pid); var newPid = null; var lis = document.getElementsByTagName('li'); var prevPid = null; var captureNext = false; for(var i=0; i= 0) loadBigImg(imgs[i]); } } function popup(url, w, h){ var win = window.open(url,'jhh','toolbar=0,scrollbars=1,resizable=1,width=' +w+ ',height=' +h); win.focus(); return win; } function help(a){ }