var session = 'n1bmqk56drfalpk5n5sjl4hh5393v2ur'; /*Array ( ) */var page='impressions'; var style='impressions'; var scripts = new Array(); function Request(url,param,func,sync) { var async = true; if( sync == true ) async = false; var req = newXMLHttpRequest(); if(async && func) { var handlerFunc = getReadyStateHandler(req,func); req.onreadystatechange = handlerFunc; } req.open('GET', url+'?'+param, async); req.send(null); if(!async && func) func(req); } function newXMLHttpRequest() { var http_request = false; if (window.XMLHttpRequest) { // Mozilla, Safari,... http_request = new XMLHttpRequest(); if (http_request.overrideMimeType) { http_request.overrideMimeType('text/xml'); // zu dieser Zeile siehe weiter unten } } else if (window.ActiveXObject) { // IE try { http_request = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { http_request = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} } } if (!http_request) { alert('Ende :( Kann keine XMLHTTP-Instanz erzeugen'); return false; } return http_request; } function getReadyStateHandler(req, responseXmlHandler) { // Return an anonymous function that listens to the // XMLHttpRequest instance return function () { // If the request's status is "complete" if (req.readyState == 4) { // Check that a successful server response was received if (req.status == 200) { //todo: catch 404 error. // Pass the XML payload of the response to the // handler function responseXmlHandler(req); }else{ // An HTTP problem has occurred alert("Couldn't process data.\nError code: "+req.status+"\nMessage: "+req.responseText); } } } } var slide = false; function StartSlide() { document.getElementById('sl_inner').innerHTML = ''; //document.getElementById('slider').style.width = 100+'px'; //document.getElementById('sl_inner').style.width = 80+'px'; //slide = true; addEvent(document.body,"mousemove",Slide); addEvent(document.body,"mouseup",StopSlide); } function StopSlide() { var npos; var field; //slide = false; var pos = parseInt(document.getElementById('slider').style.left); if(pos + 90 < 181) { npos = 0; field = document.getElementById('sl_first'); } else if(pos + 90 < 362) { npos = 181; field = document.getElementById('sl_second'); } else if(pos + 90 < 3*181) { npos = 2*181; field = document.getElementById('sl_third'); } else if(pos + 90 < 4*181) { npos = 3*181; field = document.getElementById('sl_fourth'); } else { npos = 4*181; field = document.getElementById('sl_last'); } document.getElementById('slider').style.left = npos+'px'; document.getElementById('sl_inner').innerHTML = field.innerHTML; removeEvent(document.body,"mousemove",Slide); removeEvent(document.body,"mouseup",StopSlide); setMenu((npos/181)+1); } function setSlider(pos,elem) { document.getElementById('slider').style.left = pos+'px'; document.getElementById('sl_inner').innerHTML = elem.innerHTML; setMenu((pos/181)+1); } function Slide(event) { //if(slide) { var width = document.getElementById('slider').offsetWidth; var newx = event.clientX - Math.round(width/2);; // pointer in der Mitte; newx -= document.getElementById('sl_menu_block').offsetLeft; if(newx < 0) newx = 0; var pwidth = 905; if( (newx + width) > (pwidth) ) newx = (pwidth-width); //if(newx < 49) newx = 49; document.getElementById('slider').style.left = newx+"px"; //document.getElementById('sl_inner').innerHTML = newx; //} } function setMenu(num) { var params = new Array(); params.push("slider="+num); params.push("page="+page); Request("slidemenu.php",params.join("&"),setMenuHTML); } function setMenuHTML(req) { document.getElementById("head").innerHTML = req.responseText; } function addEvent( obj, type, fn ) { if (obj.addEventListener) { if(type=="mousewheel") { obj.addEventListener("SOMMouseScroll", fn, false ); } obj.addEventListener( type, fn, false ); } else if (obj.attachEvent) { obj["e"+type+fn] = fn; obj[type+fn] = function() { obj["e"+type+fn]( window.event ); } obj.attachEvent( "on"+type, obj[type+fn] ); } } function removeEvent( obj, type, fn ) { if (obj.removeEventListener) { if(type=="mousewheel") { obj.removeEventListener("SOMMouseScroll", fn, false ); } obj.removeEventListener( type, fn, false ); } else if (obj.detachEvent) { obj.detachEvent( "on"+type, obj[type+fn] ); obj[type+fn] = null; obj["e"+type+fn] = null; } } function mouseX(evt) { if (evt.pageX) return evt.pageX; else if (evt.clientX) return evt.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft); else return null; } function mouseY(evt) { if (evt.pageY) return evt.pageY; else if (evt.clientY) return evt.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); else return null; } function doSearch(input) { var button = document.getElementById("search_button").getElementsByTagName("button")[0]; button.className = "wait"; button.disabled = true; document.body.style.cursor = "wait"; params = new Array(); params.push("kvgoehren="+session); params.push("query="+encodeURIComponent(input.value)); params.push("page="+page); Request("search.php",params.join("&"),showSearch); } function showSearch(req) { if(req) { document.getElementById("search").innerHTML = req.responseText; openSearch(); } document.body.style.cursor = "auto"; } function openSearch() { document.getElementById("search_show").className = "show"; document.getElementById("overlay").style.display = "block"; document.getElementById("search").style.display = "block"; } function closeSearch() { var button = document.getElementById("search_button").getElementsByTagName("button")[0]; button.className = "ready"; button.disabled = false; document.getElementById("search").style.display = "none"; document.getElementById("overlay").style.display = "none"; } function reloadPage2(link) { var time1 = new Date(); if(link.length == 0) { link = "page:impressions"; } var queries = link.split("|"); var attr = new Array(); var params = new Array(); for(var i=0;i pos.left + width) { dim.right--; dim.left--; } while(dim.left < pos.left) { dim.left++; dim.right++; } while(dim.bottom > pos.top + height) { dim.bottom--; dim.top--; } while(dim.top < pos.top) { dim.top++; dim.bottom++; } /*goal.left = dim.left - anchor.left; goal.top = dim.top - anchor.top; goal.width = fullWidth; goal.height = fullHeight;*/ goal.left = dim.left; goal.top = dim.top; goal.width = fullWidth; goal.height = fullHeight; var step = {x:0,y:0,w:0,h:0}; step.x = (goal.left - act.left)/numSteps; step.y = (goal.top - act.top)/numSteps; step.w = (fullWidth - act.width)/numSteps; step.h = (fullHeight - act.height)/numSteps; //int = window.setInterval(resizeImg,50); img.style.position = "absolute"; img.style.left = act.left+"px"; img.style.top = act.top+"px"; img.style.zIndex = "10000"; document.body.appendChild(img); var act2 = new cloneObject(goal); var goal2 = new cloneObject(act); addEvent(img,"click",function() { shrink(img,act2,goal2,step,interval);}); //var func = function() { expand($img,$act,$goal)}; window.setTimeout(function() { expand(img,act,goal,step,interval);},interval); } function expand(img,act,goal,step,interval) { act.left += step.x; act.top += step.y; act.width += step.w; act.height += step.h; if(act.left > goal.left && step.x > 0) { act.left = goal.left; } if(act.left < goal.left && step.x < 0) { act.left = goal.left; } if(act.top > goal.top && step.y > 0) { act.top = goal.top; } if(act.top < goal.top && step.y < 0) { act.top = goal.top; } if(act.width > goal.width && step.w > 0) { act.width = goal.width; } if(act.width < goal.width && step.w < 0) { act.width = goal.width; } if(act.height > goal.height && step.h > 0) { act.height = goal.height; } if(act.height < goal.height && step.h < 0) { act.height = goal.height; } if(act.height==goal.height && act.width==goal.width && act.left==goal.left && act.top==goal.top) { //window.clearInterval(int); } else { window.setTimeout(function() { expand(img,act,goal,step,interval);},interval); } img.style.left = Math.round(act.left)+"px"; img.style.top = Math.round(act.top)+"px"; img.width = Math.round(act.width); img.height = Math.round(act.height); } function shrink(img,act,goal,step,interval) { act.left -= step.x; act.top -= step.y; act.width -= step.w; act.height -= step.h; if(act.left < goal.left && step.x > 0) { act.left = goal.left; } if(act.left > goal.left && step.x < 0) { act.left = goal.left; } if(act.top < goal.top && step.y > 0) { act.top = goal.top; } if(act.top > goal.top && step.y < 0) { act.top = goal.top; } if(act.width < goal.width && step.w > 0) { act.width = goal.width; } if(act.width > goal.width && step.w < 0) { act.width = goal.width; } if(act.height < goal.height && step.h > 0) { act.height = goal.height; } if(act.height > goal.height && step.h < 0) { act.height = goal.height; } //alert(act.left+" "+act.top+" "+act.width+" "+act.height); //alert(goal.left+" "+goal.top+" "+goal.width+" "+goal.height); if(act.height==goal.height && act.width==goal.width && act.left==goal.left && act.top==goal.top) { img.parentNode.removeChild(img); } else { img.style.left = Math.round(act.left)+"px"; img.style.top = Math.round(act.top)+"px"; img.width = Math.round(act.width); img.height = Math.round(act.height); window.setTimeout(function() { shrink(img,act,goal,step,interval);},interval); } } function pageOffset(win) { if(!win) win = window; var pos = {left:0,top:0}; if(typeof win.pageXOffset != 'undefined') { // Mozilla/Netscape pos.left = win.pageXOffset; pos.top = win.pageYOffset; } else { var obj = (win.document.compatMode && win.document.compatMode == "CSS1Compat") ? win.document.documentElement : win.document.body || null; pos.left = obj.scrollLeft; pos.top = obj.scrollTop; } return pos; } function cloneObject(what) { for (i in what) { this[i] = what[i]; } } function getStyle(oElm, strCssRule){ var strValue = ""; if(document.defaultView && document.defaultView.getComputedStyle){ strValue = document.defaultView.getComputedStyle(oElm, "").getPropertyValue(strCssRule); } else if(oElm.currentStyle){ strCssRule = strCssRule.replace(/\-(\w)/g, function (strMatch, p1){ return p1.toUpperCase(); }); strValue = oElm.currentStyle[strCssRule]; } return strValue; } function trackPageError(epage) { var href = encodeURIComponent(document.URL); var referrer = encodeURIComponent(document.referrer); var params = new Array(); params.push('page='+epage); params.push('url='+href); params.push('referrer='+referrer); Request('/trackerror.php',params.join('&')); } function sendMail(address) { location.href = "mailto:"+(address.replace(/AT/,"@")); } function closeGalLayer() { document.getElementById("local_gallery").innerHTML = ""; document.getElementById("local_gallery").style.display = "none"; } function loadGalleryItem(id,query) { var params = new Array(); params.push("id="+id); params.push("remote_query="+encodeURIComponent(query)); Request("loadgallery.php",params.join("&"),openGalleryItem); } function openGalleryItem(req) { var con = document.getElementById("local_gallery"); con.innerHTML = req.responseText; con.style.display = "block"; var layer = document.getElementById("gal_detail_layer"); var height = layer.offsetHeight; var width = layer.offsetWidth; var regEx = /MSIE\s(\d+\.\d+)/; if((result = regEx.exec(navigator.appVersion)) && parseInt(result[1]) < 7) { var pos = pageOffset(); var vp_width = window.document.documentElement.clientWidth || window.document.body.clientWidth || window.innerWidth; var vp_height = window.document.documentElement.clientHeight || window.document.body.clientHeight || window.innerHeight; var anchor = {left:0,top:0}; var obj = layer; while(obj = obj.offsetParent) { anchor.left += obj.offsetLeft; anchor.top += obj.offsetTop; } var left = parseInt(vp_width/2)+pos.left-anchor.left; var top = parseInt(vp_height/2)+pos.top-anchor.top; layer.style.top = top+"px"; layer.style.marginTop = "-"+parseInt(height/2)+"px"; } else { layer.style.top = '50%'; layer.style.marginTop = "-"+parseInt(height/2)+"px"; layer.style.position = "fixed"; } } function openGTV() { var strValue = ""; var con = document.getElementById("local_gallery"); strValue = "
"; strValue =strValue +""; strValue =strValue +""; strValue =strValue +""; strValue =strValue +""; strValue =strValue +""; strValue =strValue +""; strValue =strValue +"
"; strValue =strValue +"

Göhren-TV von Ostseelive.tv'

[Fenster schließen]"; strValue =strValue +"
"; con.innerHTML=strValue; con.style.display = "block"; var layer = document.getElementById("gal_detail_layer"); var height = layer.offsetHeight; var width = layer.offsetWidth; var regEx = /MSIE\s(\d+\.\d+)/; if((result = regEx.exec(navigator.appVersion)) && parseInt(result[1]) < 7) { var pos = pageOffset(); var vp_width = window.document.documentElement.clientWidth || window.document.body.clientWidth || window.innerWidth; var vp_height = window.document.documentElement.clientHeight || window.document.body.clientHeight || window.innerHeight; var anchor = {left:0,top:0}; var obj = layer; while(obj = obj.offsetParent) { anchor.left += obj.offsetLeft; anchor.top += obj.offsetTop; } var left = parseInt(vp_width/2)+pos.left-anchor.left; var top = parseInt(vp_height/2)+pos.top-anchor.top; layer.style.top = top+"px"; layer.style.marginTop = "-"+parseInt(height/2)+"px"; } else { layer.style.top = '50%'; layer.style.marginTop = "-"+parseInt(height/2)+"px"; layer.style.position = "fixed"; } }