add: if(doneinit++) return;  
context: 	init = function () 	{		__dlg_init(null, {width:600,height:460});		__dlg_translate('ImageManager');                // This is so the translated string shows up in the drop down.        document.getElementById("f_align").selectedIndex = 1;        document.getElementById("f_align").selectedIndex = 0;        		var uploadForm = document.getElementById('uploadForm');		if(uploadForm) uploadForm.target = 'imgManager';		var param = window.dialogArguments;		if (param) 		{      var image_regex = new RegExp( '(https?://[^/]*)?' + base_url.replace(/\/$/, '') );      param.f_url = param.f_url.replace( image_regex, "" );      // The image URL may reference one of the automatically resized images       // (when the user alters the dimensions in the picker), clean that up      // so it looks right and we get back to a normal f_url      var rd = (_resized_dir) ? _resized_dir.replace(Xinha.RE_Specials, '\\$1') + '/' : '';      var rp = _resized_prefix.replace(Xinha.RE_Specials, '\\$1');      var dreg = new RegExp('^(.*/)' + rd + rp + '_([0-9]+)x([0-9]+)_([^/]+)$');        if(dreg.test(param.f_url))      {        param.f_url    = RegExp.$1 + RegExp.$4;        param.f_width  = RegExp.$2;        param.f_height = RegExp.$3;      }            for (var id in param)      {        if(id == 'f_align') continue;        if(document.getElementById(id))        {          document.getElementById(id).value = param[id];        }      }      document.getElementById("orginal_width").value = param["f_width"];			document.getElementById("orginal_height").value = param["f_height"];			setAlign(param["f_align"]);      // Locate to the correct directory      var dreg = new RegExp('^(.*/)([^/]+)$');      if(dreg.test(param['f_url']))      {        changeDir(RegExp.$1);        var dirPath = document.getElementById('dirPath');        for(var i = 0; i < dirPath.options.length; i++)        {          if(dirPath.options[i].value == encodeURIComponent(RegExp.$1))          {            dirPath.options[i].selected = true;            break;          }        }      }      document.getElementById('f_preview').src = _backend_url + '__function=thumbs&img=' + param.f_url;      		}				 // Hookup color pickers    new Xinha.colorPicker.InputBinding(document.getElementById('f_backgroundColor'));    new Xinha.colorPicker.InputBinding(document.getElementById('f_borderColor'));		document.getElementById("f_alt").focus();	};
meta: 6464	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/6464/42668192567cde7b24192953e79ff89fd353200b/manager.js/clean/web/imcms/xinha/plugins/ImageManager/assets/manager.js