/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */
/* This file is part of version 0.96beta2 released Fri, 20 Mar 2009 11:01:14 +0100 */
function ImagePicker(c){this.field=c;var b=this;var a=document.createElement("input");a.type="button";a.value="Browse";a.onclick=function(){b.popup_picker()};c.parentNode.insertBefore(a,c.nextSibling);c.size="20";c.style.textAlign="right"}ImagePicker.prototype.backend=Xinha.getPluginDir("ImageManager")+"/backend.php?__plugin=ImageManager&";ImagePicker.prototype.backend_data=null;ImagePicker.prototype.popup_picker=function(){var a=this;var d=null;if(a.field.value){d={f_url:a.field.value,f_width:null,f_height:null,f_alt:a.field.value,f_border:null,f_align:null,f_padding:null,f_margin:null,f_backgroundColor:null,f_borderColor:null,f_border:null,f_padding:null,f_margin:null}}var c=this.backend+"__function=manager";if(this.backend_config!=null){c+="&backend_config="+encodeURIComponent(this.backend_config);c+="&backend_config_hash="+encodeURIComponent(this.backend_config_hash);c+="&backend_config_secret_key_location="+encodeURIComponent(this.backend_config_secret_key_location)}if(this.backend_data!=null){for(var b in this.backend_data){c+="&"+b+"="+encodeURIComponent(this.backend_data[b])}}Dialog(c,function(e){if(!e){return false}a.field.value=e.f_url},d)};if(typeof Dialog=="undefined"){function Dialog(a,b,d){if(typeof d=="undefined"){d=window}var c=window.open(a,"hadialog","toolbar=no,menubar=no,personalbar=no,width=10,height=10,scrollbars=yes,resizable=yes,modal=yes,dependable=yes");Dialog._modal=c;Dialog._arguments=d;Dialog._return=function(e){if(e&&b){b(e)}Dialog._modal=null};Dialog._modal.focus()}Dialog._return=null;Dialog._modal=null;Dialog._arguments=null}ImagePicker.prototype.backend_config=null;ImagePicker.prototype.backend_config_hash=null;ImagePicker.prototype.backend_config_secret_key_location="Xinha:ImageManager";