function openPopup(which,width,height) { w = width; h = height; l = (screen.width - w) / 2; t = (screen.height - h) / 2; msg = window.open (which, "msg", "toolbar=no,width=" + w + ",height=" + h + ",directories=no,resizable=no,status=no,scrollbars=no,menubar=no,location=no,left=" + l + ",screenX=" + l + ",top=" + t + ",screenY=" + t); msg.focus (); } function selectTarget(target_) { var target = target_.getAttribute('target'); if ( target && (div = document.getElementById(target)) != undefined ) { // Let's see if this is the first time the user clicks to open or close the target. If so, we need to make // sure we can determine the current state of the target. if (! div.getAttribute('status')) { div.setAttribute('status', (div.className == 'hidden' ? 'hidden' : 'visible')); } // The effect is only created if the target is currently visible. Somehow it wont work to create an effect on // an already hidden target. var effect = div.getAttribute('effect'); if (effect && div.getAttribute('status') == 'visible') { div._effect = new fx.Height(div , {duration: 300, onComplete: function() { force_refresh('div_tijden'); } } ); } // Then we're going to show or hide the target. if (div.getAttribute('status') == 'hidden') { // Let's make the target div visible. If the target has a source defined than we should load it before we // make it visible. div.setAttribute('status', 'visible'); var source = div.getAttribute('source'); if (source != undefined) { framework.requestGetUrl(source, function(result_) { div.innerHTML = result_; if (div._effect) { div._effect.toggle(); } else { div.className = 'visible'; force_refresh('div_tijden'); } target_.innerHTML = '- ' + target_.getAttribute('content'); } ); } else { if (div._effect) { div._effect.toggle(); } else { div.className = 'visible'; force_refresh('div_tijden'); } target_.innerHTML = '- ' + target_.getAttribute('content'); } } else { // Let's hide the target div. div.setAttribute('status', 'hidden'); if (div._effect) { div._effect.toggle(); } else { div.className = 'hidden'; force_refresh('div_tijden'); } target_.innerHTML = '+ ' + target_.getAttribute('content'); } } else alert('uh?' + target); } function force_refresh(target_) { div = document.getElementById(target_); if (div) { if (! div.getAttribute('status')) { div.setAttribute('status', (div.className == 'hidden' ? 'hidden' : 'visible')); } if (div.getAttribute('status') == 'visible') { div.className = 'hidden'; div.className = 'visible'; } } } function contactEscort(form_) { framework.requestPostUrl('/site/ajax/contact_escort.php', form_, function(result_) { if (result_ == 'OK') { var div = document.getElementById('contactFormDiv'); if (div) div.innerHTML = "