/*	This popup script is a part of pb-embedFlash for Wordpress and requires MooTools JavaScript Library.
	Copyright (c) 2008 Pascal-berkhahn
*/
var FlashPopup={init:function(b){var c=$$('a');this.anchors=[];c.each(function(a,i){if(a.rel&&a.href&&a.rel.test(/^popup/i)){this.create=true;a.addEvent('click',function(e){e=new Event(e);e.stop();this.open(a.href,a.title,a.rel)}.bind(this));this.anchors.push(a)}},this);return false},open:function(b,c,d){var e=d.split(' ');var g=15;var h=parseInt(e[1]);var j=parseInt(e[2]);var k={};var l={};var m={};m['id']='flashObject';for(i=3;i<=5;i=i+1){if(e[i]&&/^f\[(.+)\]$/i.test(e[i])){var n=/^f\[(.+)\]$/i.exec(e[i]);var f=n[1].split('&');for(var o in f){if(f[o]&&/^(.+)\[(.+)\]$/i.test(f[o])){var n=/^(.+)\[(.+)\]$/i.exec(f[o]);k[n[1]]=n[2]}}}if(e[i]&&/^p\[(.+)\]$/i.test(e[i])){var n=/^p\[(.+)\]$/i.exec(e[i]);var p=n[1].split('&');for(var o in p){if(p[o]&&/^(.+)\[(.+)\]$/i.test(p[o])){var n=/^(.+)\[(.+)\]$/i.exec(p[o]);l[n[1]]=n[2]}}}if(e[i]&&/^a\[(.+)\]$/i.test(e[i])){var n=/^a\[(.+)\]$/i.exec(e[i]);var a=n[1].split('&');for(var o in a){if(a[o]&&/^(.+)\[(.+)\]$/i.test(a[o])){var n=/^(.+)\[(.+)\]$/i.exec(a[o]);m[n[1]]=n[2]}}}}var q=new Element('div',{'id':'popupbox','styles':{'display':'none'}}).injectInside(document.body);new Element('div',{'id':'popupcontent'}).injectInside(q);swfobject.embedSWF(b,'popupcontent',h+'',j+'','9.0.0',false,k,l,m);flashpopup=window.open('about:blank','flashpopup','width='+(h+g)+',height='+(j+g)+',toolbar=no,menubar=no,location=no,status=no,scrollbars=no,resizable=yes,screenX='+((screen.width-(h+g))/2)+',screenY='+((screen.height-(j+g))/2));flashpopup.document.write('<html><head><title>'+c+'</title></head><body style="text-align:left;vertical-align:top;">'+document.getElementById('popupbox').innerHTML+'</body></html>');document.body.removeChild(document.getElementById('popupbox'));return false}};window.addEvent('domready',FlashPopup.init.bind(FlashPopup));