/* ################################################################### */ /* © 2011 MyArtSide */ /* all rights reserved */ /* ################################################################### */ function myPage_checkBrowserName(name){ var agent = navigator.userAgent.toLowerCase(); if (agent.indexOf(name.toLowerCase())>-1) { return true; } return false; } /* Popup */ var request = false; function myPage_setRequest(content) { //erzeuge div wenn nicht vorhanden! if (!$('div#ajax').length) { $("body").append('
'); } if (window.XMLHttpRequest) { request = new XMLHttpRequest(); // Mozilla, Safari, Opera } else if (window.ActiveXObject) { try { request = new ActiveXObject('Msxml2.XMLHTTP'); // IE 5 } catch (e) { try { request = new ActiveXObject('Microsoft.XMLHTTP'); // IE 6 } catch (e) {} } } if (!request) { alert("Kann keine XMLHTTP-Instanz erzeugen"); return false; } else { var url = "http://www.grenzland-immobilien-hubatsch.de/mypage/incl/ajax.php"; var value = content; request.open('post', url, true); request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); request.send('var='+value); request.onreadystatechange = myPage_interpretRequest; } } function myPage_interpretRequest() { switch (request.readyState) { case 4: if (request.status != 200) { alert("Fehler:"+request.status); } else { var xmlDoc = request.responseXML; var content = xmlDoc.getElementsByTagName('html')[0].firstChild.nodeValue; document.getElementById('ajax').style.display = 'block'; document.getElementById('ajax').innerHTML = content; document.body.style.overflowY = 'hidden'; if(myPage_checkBrowserName('MSIE')){ document.getElementById('MyPagePopup').style.top = document.body.scrollTop+'px'; } } break; default: break; } } function myPage_popupClose(){ document.getElementById('ajax').innerHTML = ''; document.body.style.overflowY = 'auto'; document.getElementById('ajax').style.display = 'none'; } function myPage_checkSlidebox(id){ if(document.getElementById('slide_'+id).style.display == 'none'){ document.getElementById('link_'+id).innerHTML = 'mehr'; }else{ document.getElementById('link_'+id).innerHTML = 'zurück'; } } function myPage_slide(id){ $("#slide_"+id).slideToggle("slow"); window.setInterval( function() {myPage_checkSlidebox(id)}, 1000); }