   /**
    * GOLLUM the wikipedia browser
    *
    * This program is free software; you can redistribute it and/or modify
    * it under the terms of the GPL.
    *
    * Copyright(c) 2005 by Harald Hanek. All rights reserved.
    *
    * To contact the author write to: harald.hanek@easycp.de
    * The latest version of Wikipedia Browser can be obtained from: http://www.gollum-browser.com
    */
	
var global_dialog=[];function dialog(url,name,action,typ,width,height,resizable)
{var resizable=(resizable==true)?'yes':'no';var action=(action!='')?action:'';var newname=name;switch(typ)
{case'modal':
{if(browser.isIE5up)
{init=window;var dialog=Dialog(url,name,action,init,width,height,resizable);}else
{init=window;return Dialog(url,name,action,init,width,height,resizable);}}break;case'win':
{var dialog=window.open(page,name,'width='+width+',height='+height+',resizable='+resizable+',status=no,menubar=no,location=no,scrollbars=no');}break;}}Dialog._return=null;Dialog._modal=null;Dialog._arguments=null;function Dialog(url,name,action,init,width,height,resizable)
{Dialog._geckoOpenModal(url,name,action,init,width,height,resizable);};Dialog._parentEvent=function(ev)
{setTimeout(function(){if(Dialog._modal&&!Dialog._modal.closed)Dialog._modal.focus();},50);if(Dialog._modal&&!Dialog._modal.closed)Global.stopEvent(ev);};Dialog._geckoOpenModal=function(url,name,action,init,width,height,resizable)
{var dlg=window.open(url,name,
"toolbar=no,menubar=no,personalbar=no,width="+width+",height="+height+","+"scrollbars=no,resizable="+resizable+",modal=yes,dependable=yes");Dialog._modal=dlg;Dialog._arguments=init;function capwin(w)
{Global.addEvent(w,"click",Dialog._parentEvent);Global.addEvent(w,"mousedown",Dialog._parentEvent);Global.addEvent(w,"focus",Dialog._parentEvent);};function relwin(w)
{Global.removeEvent(w,"click",Dialog._parentEvent);Global.removeEvent(w,"mousedown",Dialog._parentEvent);Global.removeEvent(w,"focus",Dialog._parentEvent);};capwin(window);Dialog._return=function()
{if(Dialog._modal&&!Dialog._modal.closed)Dialog._modal.close();delete dlg;if(typeof action=="string")
{action=new Function("event",action);action(window.event);}else{if(val&&action)action(val);}relwin(window);Dialog._modal=null;return true;};};