var _shoutLock = false; var _pTimer = 0; var _pTimer2 = 0; function openCenter(id, url, width, height, properties) { if (screen) { x = (screen.availWidth - width) / 2; y = (screen.availHeight - height) / 2; } return r = window.open(url, id, properties+',width='+width+',height='+height+',screenX='+x+',screenY='+y+',left='+x+',top='+y); } function Word() { l = document.getElementById('wordcontent'); if (l.innerHTML.length == 1) Xget('/p/xml/word_inc.php', 'wordcontent', function(){}); else { (l.style.display == "") ? l.style.display = "none" : l.style.display = ""; } } function DelWord(id) { myReady = function() { myReady2 = function(r) { l = document.getElementById('wordcontentlist'); if (r.length<=1) l.style.display = "none"; } Xget('/p/xml/wordlist.php?word_id=', 'wordcontentlist', myReady2); l = document.getElementById('wordcontentlist'); } Xpost('/p/delword.php?x=1', 'id=' + id, myReady, null); } function UpdateWord(f) { myReady = function() { Xget('/p/xml/wordlist.php?word_id=', 'wordcontentlist', function(){}); l = document.getElementById('wordcontentlist'); l.style.display=""; } XFormSubmit(f, myReady); Word(); return false; } function addCrush(crush_id) { if (confirm('Heb je een oogje op dit profiel? Een oogje blijft minimaal 3 weken actief, en is 100% anoniem.')) { myReady = function(r) { if (r) { alert (r); } else { Xget('/p/xml/crushlist.php?crush_id=' + crush_id, 'oogjescontent', function(){}); } } Xpost('/p/crush.php', 'crush_id='+crush_id, myReady, null); } } function RemOogje(id) { if (confirm('Dit oogje verwijderen?')) { myReady = function() { var l = document.getElementById('crushcontent'); Xget('./xml/mycrushlist.php?x=1', 'crushcontent', function(){}); } Xpost('/p/delcrush.php', 'id='+id, myReady); } } function UpdateAlbum(f) { f = document.forms[f]; myReady = function() { // Xget('/p/xml/wordlist.php?word_id=', 'wordcontentlist', function(){}); // l = document.getElementById('wordcontentlist'); // l.style.display=""; } XFormSubmit(f, myReady, 'albumcontent'); } function posElement(id, y) { /* var l = document.getElementById(id); if (!window.scrollY) corrY = document.documentElement.scrollTop + document.body.scrollTop; else corrY = window.scrollY; corrY = 0; l.style.pixelLeft = '0'; l.style.pixelTop = corrY; l.style.left = '0px'; l.style.top = corrY + y + 'px'; l.style.position = 'fixed'; */ } function initButton() { posButton = function() { posElement('buttonContent', 0); posElement('pEdit', 0); } window.onscroll = posButton; } function initCheckEvents() { checkEvents(); } // functie checkt verschillende events en geeft een popup function checkEvents() { myReady = function(xmlObject) { if (!xmlObject.documentElement || !xmlObject) return false; parseTree = xmlObject.documentElement; var l = document.getElementById('noticeContent'); if (!l) return; l.innerHTML = ""; //alert (parseTree.firstChild.length); // online mensen onlineTree = parseTree.getElementsByTagName('online'); if (onlineTree.length) { for (x=0; x' + username + ' is online
'; } } // nieuwe berichten msgTree = parseTree.getElementsByTagName('msg'); if (msgTree.length) { for (x=0; xbericht van ' + username + '
'; document.getElementById('fuckIE').innerHTML = ''; Xget("/p/xml/countmsg.php?x="+Math.random()*5, "countMsg", function(){}) } } // chatboxjoins chatTree = parseTree.getElementsByTagName('chat'); if (chatTree.length) { for (x=0; x' + username + ' komt de chatbox binnen
'; Xget("/p/xml/countchat.php?x="+Math.random()*5, "countChat", function(){}) } } // chatrequests chatrequestTree = parseTree.getElementsByTagName('chatrequest'); if (chatrequestTree.length) { for (x=0; x

klik hier om naar de chatbox te gaan'; if( showIbox('#modal','', parseQuery('height=80&width=420') ) ) showBG(); window.setTimeout(hideIbox, 8000); } } // nieuwe GB-berichten gbTree = parseTree.getElementsByTagName('gb'); if (gbTree.length) { for (x=0; x' + username + '
'; document.getElementById('fuckIE2').innerHTML = ''; window.setTimeout(restoreGbIcon, 50000); // dat kutplaatje maar 50 sec } } // shouts shoutTree = parseTree.getElementsByTagName('shout'); if (shoutTree.length) { for (x=0; x' + username + ' roept: ' + bericht + '
'; } } if (l.innerHTML.length >1) { l.style.display = 'block'; if (document.getElementById('pEdit').style.visibility != 'visible') { showFixedMenu('pEdit'); if (!_shoutLock) _pTimer = window.setTimeout(killPEdit, 10000); } } else { l.style.display = 'none'; } } XpostXML('/p/xml/events.php', '', myReady, 'noticeContent'); window.setTimeout(checkEvents, 10000); } // restore events: function killPEdit() { var l = document.getElementById('noticeContent'); l.innerHTML = ""; l.style.display = 'none'; window.clearTimeout(_pTimer2); killMenu('pEdit'); } function initClosePEdit() { killPEdit(); //_pTimer2 = window.setTimeout(killPEdit, 2000); } function restoreGbIcon() { document.getElementById('fuckIE2').innerHTML = ''; } function Reply(id, pos) { newRow = document.getElementById('transRow'); p = document.getElementById('entry'+pos); if (p.innerHTML.length <= 1 && !newRow) { row = document.createElement("TR"); row.id = "transRow"; row.className = "gbEntry"; cell = document.createElement("TD"); cell.style.backgroundColor = 'transparent'; row.appendChild(cell); cell = document.createElement("TD"); cell.style.backgroundColor = 'transparent'; row.appendChild(cell); cell = document.createElement("TD"); cell.style.backgroundColor = 'transparent'; cell.innerHTML = 'Je reactie'; row.appendChild(cell); cell = document.createElement("TD"); cell.innerHTML = 'smileys:
'; cell.style.backgroundColor = 'transparent'; row.appendChild(cell); cell = document.createElement("TD"); cell.style.backgroundColor = 'transparent'; row.appendChild(cell); cell = document.createElement("TD"); cell.style.backgroundColor = 'transparent'; row.appendChild(cell); p.appendChild(row); } else { newRow.parentNode.removeChild(newRow); // wegpleuren } } function AddEntry(t, id) { t = document.getElementById(t); var dropEx = ''; if ( document.getElementById('dropEx') ) { dropEx = document.getElementById('dropEx').checked ? 1 : 0; } var reactie = t.value; reactie = encodeURIComponent(reactie); reactie = reactie.replace(/(\+)/g, "\%2B"); b = document.getElementById('entryButton'); b.disabled = true; function myReady() { function myReady2() { t.value = ''; b.disabled = false; } Xget('./xml/gb.php?user_id=&page=1', 'gbIndex', function(){myReady2()}, true); } p = 'user_id=&id='+id+'&dropEx=' + dropEx + '&reactie='+reactie; Xpost('/p/gb_add.php', p, myReady, null); } function AddReply(t, id) { t = document.getElementById(t); var reactie = t.value; reactie = encodeURIComponent(reactie); reactie = reactie.replace(/(\+)/g, "\%2B"); // alert (t.value); function myReady() { Xget('./xml/gb.php?user_id=&page=1', 'gbIndex', function(){}); } p = 'user_id=&id='+id+'&reactie='+reactie; Xpost('/p/gb_reply.php', p, myReady, null); } function DelEntry(id) { if (confirm('Deze reactie verwijderen?')) { function myReady(r) { Xget('./xml/gb.php?user_id=&page=1', 'gbIndex', function(){}); } p = 'id='+id; Xpost('/p/gbDel.php', p, myReady, null); } } function DelEntryEx(id) { if (confirm('Je eigen reactie verwijderen?')) { function myReady(r) { Xget('./xml/gb.php?user_id=&page=1', 'gbIndex', function(){}); } p = 'id='+id; Xpost('/p/gbDelEx.php', p, myReady, null); } } function AddFriend(friendId) { function myReady(r) { alert (r); Xget('./xml/gb.php?user_id=&page=1', 'gbIndex', function(){}); document.getElementById('addfriend').style.display = 'none'; } p = 'friend_id='+friendId; Xpost('/p/addfriend.php', p, myReady, null); } function Pf(id) { openCenter('pf', '/p/popup/pf.php?'+id,640, 410, 'scrollbars=auto,status=no,toolbar=no'); } function Pg(id) { openCenter('pg', '/p/popup/pg.php?'+id,640, 450, 'scrollbars=auto,status=no,toolbar=no'); } function extraVideo(id, userId) { openCenter('video', '/p/popup/video.php?id='+id+'&user_id='+userId,640, 480, 'scrollbars=auto,status=no,toolbar=no'); } function Chat(userId) { function myReady() { openCenter('chat', '/p/chat/?' + userId, 640, 480, 'scrollbars=auto,status=no,toolbar=no,width=640,height=420') } Xpost('/p/chat/request.php', '?toId=' + userId, myReady); } function invite( userId, username ) { function myReady( r ) { switch ( r ) { case 'self': window.location.href='/profile/chat/'; break; case 'me': alert ('Schizofreen?'); default: break; } } if ( confirm('Wil je ' + username + ' uitnodigen om te chatten?') ) { Xpost( '/p/xml/invite.php', 'userId=' + userId, myReady ); } } var _currentPage = 0; // browsefunctie function hiLite(n, force) { linkClasses = getElementsByClassName(document, '*', 'browseLink'); linkClasses[n-1].style.fontWeight = 'bold'; if (_currentPage && !force) linkClasses[_currentPage-1].style.fontWeight = 'normal'; _currentPage = n; } function getElementsByClassName(oElm, strTagName, strClassName) { var arrElements = (strTagName == "*" && document.all)? document.all : oElm.getElementsByTagName(strTagName); var arrReturnElements = new Array(); strClassName = strClassName.replace(/\-/g, "\\-"); var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)"); var oElement; for(var i=0; i