// SWF var page=""; var warning=""; var cQuery=""; var cLastQuery=""; var globalHook=""; var fhQuery=""; var onloadMain=false; var appearEffect=false; var fadeEffect=false; var lastFade=false; var lastAppear=false; var visible=0; var activeFade=0; var activeAppear=0; var objListeReady=true; var lybOpen=""; var initTableSort=""; var setLoadPageNum=false; function warnme(warning) { if(warning!="") { window.setTimeout("alert('"+warning+"')",1); } } function blur_it() { var alla=document.getElementsByTagName('a'); if(alla) { for(var i=0; i>> function openForm(url) { if(url=="" || window.location.hash=='clFH') return ''; new Ajax.Request(url, { method:'POST', requestHeaders:{'Cache-control':'no-cache'}, onComplete: function (obj) { out=obj.responseText.split('|'); if(out[0]=="ERROR") { alert(out[1]); } else if(obj.responseText!="") { $(targetContainer).innerHTML=obj.responseText; $(targetContainer).style.top = (getPageScrollY() + (getPageSize()[3] / 6)) + "px"; $(targetContainer).style.display='block'; /* if(window.location.hash!='') { window.location.hash='#formHover'; } */ } else { alert('Fehler!'); } }, onFailure: function (obj) { alert('Fehler'); } }); } function closeForm() { if($(targetContainer)) { $(targetContainer).style.display='none'; } } function deleteKeyword(id) { if(confirm('Diese Keyword-Seite wirklich löschen?')) { new Ajax.Request('index.php?c=ad_goo_s&dk='+id, { method:'POST', requestHeaders:{'Cache-control':'no-cache'}, onComplete: function (obj) { out=obj.responseText.split('|'); if(out[0]=="ERROR") { alert(out[1]); } else if(out[0]=="SUCCESS") { $('kw'+id).remove(); } else { alert('Fehler!'); } } }); } } function delPers2Ep(id) { if(confirm("Diese zugeordnete Rolle wirklich entfernen?")) { window.location.href='index.php?c=admin_s&act=delPerson2Ep&id='+id; } } function delInfo2Ep(id) { if(confirm("Diese Feld wirklich entfernen?")) { window.location.href='index.php?c=admin_s&act=delInfo2Ep&id='+id; } } function delPerson(id) { if(confirm("Diese Person wirklich entfernen? HINWEIS: Alle Zuteilungen zu Episoden werden ebenso gelöscht!")) { window.location.href='index.php?c=admin_s&act=delPerson&id='+id; } } function delPersonBild(id) { if(confirm("Das Bild dieser Person löschen?")) { window.location.href='index.php?c=admin_s&act=delPersonBild&id='+id; } } function updateMw2EpPos(typ,obj) { string='&'+Sortable.serialize(obj.id,{tag:'div'}); new Ajax.Request('index.php?c=admin_s&act=updateMw2EpPos&artype='+obj.id+'&ed=updatePos'+string, { method:'POST', requestHeaders:{'Cache-control':'no-cache'}, onComplete: function (obj) { if(obj.responseText!="SUCCESS") { alert('Fehler beim Ändern der Reihenfolge!'); } } }); } function updateInfo2EpPos(obj) { string='&'+Sortable.serialize(obj.id,{tag:'div'}); new Ajax.Request('index.php?c=admin_s&act=updateInfo2EpPos&artype='+obj.id+'&ed=updatePos'+string, { method:'POST', requestHeaders:{'Cache-control':'no-cache'}, onComplete: function (obj) { if(obj.responseText!="SUCCESS") { alert('Fehler beim Ändern der Reihenfolge!'); } } }); } function updateMwPos(obj) { string='&'+Sortable.serialize(obj.id,{tag:'div'}); new Ajax.Request('index.php?c=admin_s&act=updateMwPos&artype='+obj.id+'&ed=updatePos'+string, { method:'POST', requestHeaders:{'Cache-control':'no-cache'}, onComplete: function (obj) { if(obj.responseText!="SUCCESS") { alert('Fehler beim Ändern der Reihenfolge!'); } } }); } function updateProdPos(obj) { string='&'+Sortable.serialize(obj.id,{tag:'div'}); new Ajax.Request('index.php?c=admin_s&act=updateProdPos&ed=updatePos'+string, { method:'POST', requestHeaders:{'Cache-control':'no-cache'}, onComplete: function (obj) { if(obj.responseText!="SUCCESS") { alert('Fehler beim Ändern der Reihenfolge!'); } } }); } // <<< ADMIN ENDE function checkCurLength(str) { sLength=500; if(str.length>sLength) { window.setTimeout('alert("Ihr Text wird auf '+sLength+' Zeichen gekürzt!");',50); } if(str.length>sLength) { $('textar').value=$('textar').value.substr(0,sLength); } str=$('textar').value; $('tz').innerHTML=str.length; } function checkAddressChange() { for(var i=1; i<7; i++) { adrStr+=$('ac'+i).value; } } var changeQueue=false; function changeAmount(item) { var id=parseInt(item.id.substr(6)); var val=item.value; if(val>100) val=100; item.value=val; return ''; new Ajax.Request('index.php?c=data&act=changeWKamount&id='+id+'&val='+val, { method:'POST', requestHeaders:{'Cache-control':'no-cache'}, onCreate: function(obj) { //$('orderList').style.visibility='hidden'; $('orderList').className='wk opaque'; }, onSuccess: function (obj) { out=obj.responseText.split('|'); if(out[0]=="ERROR") { alert(out[1]); } else if(out[0]!="") { //if(changeQueue!=false) window.clearTimeout(changeQueue); //changeQueue=window.setTimeout("$('orderList').innerHTML=out[0]",400); $('orderList').innerHTML=out[0]; //$('orderList').style.visibility='visible'; } else { alert('Fehler #616!'); } $('orderList').className='wk'; //$('prodid'+id).focus(); } }); } function updateWK(ids) { var pidAr=ids.split('|'); var amount=arStr=prodid=''; for(i=0;i Lightbox // Additional methods for Element added by SU, Couloir // - further additions by Lokesh Dhakar (huddletogether.com) // Object.extend(Element, { getWidth: function(element) { element = $(element); return element.offsetWidth; }, setWidth: function(element,w) { element = $(element); element.style.width = w +"px"; }, setHeight: function(element,h) { element = $(element); element.style.height = h +"px"; }, setTop: function(element,t) { element = $(element); element.style.top = t +"px"; }, setLeft: function(element,l) { element = $(element); element.style.left = l +"px"; }, setSrc: function(element,src) { element = $(element); element.src = src; }, setHref: function(element,href) { element = $(element); element.href = href; }, setInnerHTML: function(element,content) { element = $(element); element.innerHTML = content; } }); function getPageSize(){ var xScroll, yScroll; if (window.innerHeight && window.scrollMaxY) { xScroll = window.innerWidth + window.scrollMaxX; yScroll = window.innerHeight + window.scrollMaxY; } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac xScroll = document.body.scrollWidth; yScroll = document.body.scrollHeight; } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari xScroll = document.body.offsetWidth; yScroll = document.body.offsetHeight; } var windowWidth, windowHeight; // console.log(self.innerWidth); // console.log(document.documentElement.clientWidth); if (self.innerHeight) { // all except Explorer if(document.documentElement.clientWidth){ windowWidth = document.documentElement.clientWidth; } else { windowWidth = self.innerWidth; } windowHeight = self.innerHeight; } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode windowWidth = document.documentElement.clientWidth; windowHeight = document.documentElement.clientHeight; } else if (document.body) { // other Explorers windowWidth = document.body.clientWidth; windowHeight = document.body.clientHeight; } // for small pages with total height less then height of the viewport if(yScroll < windowHeight){ pageHeight = windowHeight; } else { pageHeight = yScroll; } // console.log("xScroll " + xScroll) // console.log("windowWidth " + windowWidth) // for small pages with total width less then width of the viewport if(xScroll < windowWidth){ pageWidth = xScroll; } else { pageWidth = windowWidth; } // console.log("pageWidth " + pageWidth) arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) return arrayPageSize; } function getPageScrollY() { if (self.pageYOffset) { return this.isFrame ? parent.pageYOffset : self.pageYOffset; } else if (document.documentElement && document.documentElement.scrollTop){ return document.documentElement.scrollTop; } else if (document.body) { return document.body.scrollTop; } } // // // // <=== Lightbox function flvPlayer(file,titel) { document.title=document.title.replace(/#.*/g,''); if($('overlay')) $('overlay').remove(); var objBody = window.top.document.getElementsByTagName("body").item(0); var objOverlay = document.createElement("div"); objOverlay.setAttribute('id','overlay'); objOverlay.style.display = 'none'; objOverlay.onclick = function() { closeFlvPlayer();} objBody.appendChild(objOverlay); if($('flvPlayer')) $('flvPlayer').remove(); var objFlvPlayer = document.createElement("div"); objFlvPlayer.setAttribute('id','flvPlayer'); objFlvPlayer.style.display = 'none'; objBody.appendChild(objFlvPlayer); var arrayPageSize = getPageSize(); Element.setWidth('overlay', arrayPageSize[0]); Element.setHeight('overlay', arrayPageSize[1]); new Effect.Appear('overlay', { duration: 0.2, from: 0.0, to: 0.4 }); new Ajax.Request('c.php?c=flvplay&f='+file+'&t='+titel, { method:'POST', requestHeaders:{'Cache-control':'no-cache'}, onComplete: function (obj) { if(obj.responseText!="") { $('flvPlayer').innerHTML=obj.responseText; if($('flvCloseLink')) { $('flvCloseLink').onfocus=new Function('if(this.blur)this.blur();'); } $('flvPlayer').style.display='block'; window.location.hash='#'; } else { alert('Fehler!'); } } }); } function closeFlvPlayer() { if($('vPlayer')) $('vPlayer').remove(); if($('flvPlayer')) $('flvPlayer').remove(); if($('overlay')) $('overlay').remove(); } var imgwindow; function showimage(url,w,h) { if(imgwindow) { if(imgwindow.closed==false) { imgwindow.close(); } } h=h+112; features ='toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0' window_top = 10 window_left = 10 imgwindow=window.open(url,'img_window','width='+w+',height='+h+',top='+window_top+',left='+window_left+',features='+features+''); imgwindow.focus(); } var gltext=new Array; function ghover(replace_id,begriff_id) { pos=findPos($(replace_id)); if(gltext[begriff_id]=="" || gltext[begriff_id]==undefined) { new Ajax.Request('c.php?c=gloss&glid='+begriff_id, { method:'get', requestHeaders:{'Cache-control':'no-cache'}, onComplete: function (obj) { if(obj.responseText!="") { gltext[begriff_id]=obj.responseText; $('glcont').innerHTML=gltext[begriff_id]; positionGL(pos); } else { return ''; } } }); } else { $('glcont').innerHTML=gltext[begriff_id]; positionGL(pos); } //$('gl').innerHTML=gltext[begriff_id]; } function positionGL(pos) { $('gl').style.top=pos[0]+16+'px'; if((pos[1]+24)<724) { $('gl').style.left=pos[1]+16+'px'; } else { $('gl').style.left=724+'px'; } $('gl').style.display='block'; } function ghide() { $('gl').style.display='none'; } function setFontSize(sid) { if(sid==-1) { var fSize='8px'; } else if(sid==0) { var fSize='10px'; } else { var fSize='14px'; } document.getElementsByTagName('body')[0].style.fontSize=fSize; document.cookie='fSize='+fSize+'; expires=Sun, 31 May 2015 23:59:59 UTC; path=/'; }