rem: Dialog(manager, function(param) { if (!param) { return false; } var img = image; if (!img) { if (HTMLArea.is_ie) { var sel = editor._getSelection(); var range = editor._createRange(sel); editor._doc.execCommand("insertimage", false, param.f_url); img = range.parentElement();  if (img.tagName.toLowerCase() != "img") { img = img.previousSibling; } } else { img = document.createElement('img'); img.src = param.f_url; editor.insertNodeAtSelection(img); } } else { img.src = param.f_url; }  for (field in param) { var value = param[field]; switch (field) { case "f_alt"    : img.alt	 = value; break; case "f_border" : if(value.length) { img.style.borderWidth = /[^0-9]/.test(value) ? value :  (parseInt(value) + 'px'); if(img.style.borderWidth && !img.style.borderStyle) { img.style.borderStyle = 'solid'; } } else { img.style.borderWidth = ''; img.style.borderStyle = ''; } break;  case "f_borderColor": img.style.borderColor = value; break; case "f_backgroundColor": img.style.backgroundColor = value; break;  case "f_padding": { if(value.length) { img.style.padding = /[^0-9]/.test(value) ? value :  (parseInt(value) + 'px'); } else { img.style.padding = ''; } } break;  case "f_margin": { if(value.length) { img.style.margin = /[^0-9]/.test(value) ? value :  (parseInt(value) + 'px'); } else { img.style.margin = ''; } } break;  case "f_align"  : img.align	 = value; break;  case "f_width" : { if(!isNaN(parseInt(value))) { img.width  = parseInt(value); } else { img.width = ''; } } break;  case "f_height": { if(!isNaN(parseInt(value))) { img.height = parseInt(value); } else { img.height = ''; } } break; }  }   }, outparam); 
add: Dialog(_9,function(_b){ if(!_b){ return false; } var _c=_2; if(!_c){ if(HTMLArea.is_ie){ var _d=_3._getSelection(); var _e=_3._createRange(_d); _3._doc.execCommand("insertimage",false,_b.f_url); _c=_e.parentElement(); if(_c.tagName.toLowerCase()!="img"){ _c=_c.previousSibling; } }else{ _c=document.createElement("img"); _c.src=_b.f_url; _3.insertNodeAtSelection(_c); } }else{ _c.src=_b.f_url; } for(field in _b){ var _f=_b[field]; switch(field){ case "f_alt": _c.alt=_f; break; case "f_border": if(_f.length){ _c.style.borderWidth=/[^0-9]/.test(_f)?_f:(parseInt(_f)+"px"); if(_c.style.borderWidth&&!_c.style.borderStyle){ _c.style.borderStyle="solid"; } }else{ _c.style.borderWidth=""; _c.style.borderStyle=""; } break; case "f_borderColor": _c.style.borderColor=_f; break; case "f_backgroundColor": _c.style.backgroundColor=_f; break; case "f_padding": if(_f.length){ _c.style.padding=/[^0-9]/.test(_f)?_f:(parseInt(_f)+"px"); }else{ _c.style.padding=""; } break; case "f_margin": if(_f.length){ _c.style.margin=/[^0-9]/.test(_f)?_f:(parseInt(_f)+"px"); }else{ _c.style.margin=""; } break; case "f_align": _c.align=_f; break; case "f_width": if(!isNaN(parseInt(_f))){ _c.width=parseInt(_f); }else{ _c.width=""; } break; case "f_height": if(!isNaN(parseInt(_f))){ _c.height=parseInt(_f); }else{ _c.height=""; } break; } } },_4); 
context: 	Dialog(manager, function(param) {		if (!param) {	// user must have pressed Cancel			return false;		}		var img = image;		if (!img) {			if (HTMLArea.is_ie) {        var sel = editor._getSelection();        var range = editor._createRange(sel);        editor._doc.execCommand("insertimage", false, param.f_url);				img = range.parentElement();				// wonder if this works...				if (img.tagName.toLowerCase() != "img") {					img = img.previousSibling;				}			} else {				img = document.createElement('img');        img.src = param.f_url;        editor.insertNodeAtSelection(img);			}		} else {						img.src = param.f_url;		}				for (field in param) {			var value = param[field];			switch (field) {			    case "f_alt"    : img.alt	 = value; break;			    case "f_border" :          if(value.length)          {                       img.style.borderWidth = /[^0-9]/.test(value) ? value :  (parseInt(value) + 'px');            if(img.style.borderWidth && !img.style.borderStyle)            {              img.style.borderStyle = 'solid';            }          }          else          {            img.style.borderWidth = '';            img.style.borderStyle = '';          }          break;                    case "f_borderColor": img.style.borderColor = value; break;          case "f_backgroundColor": img.style.backgroundColor = value; break;                      case "f_padding":           {            if(value.length)            {              img.style.padding = /[^0-9]/.test(value) ? value :  (parseInt(value) + 'px');             }            else            {              img.style.padding = '';            }          }          break;                    case "f_margin":           {            if(value.length)            {              img.style.margin = /[^0-9]/.test(value) ? value :  (parseInt(value) + 'px');             }            else            {              img.style.margin = '';            }          }          break;          			    case "f_align"  : img.align	 = value; break;                      case "f_width" :           {            if(!isNaN(parseInt(value))) { img.width  = parseInt(value); } else { img.width = ''; }          }          break;          				  case "f_height":          {            if(!isNaN(parseInt(value))) { img.height = parseInt(value); } else { img.height = ''; }          }          break;			}		}					}, outparam);
meta: 6015	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/6015/d8776708e0e10dfa0ab6ee1d0fa9e512d8d16348/image-manager.js/buggy/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/image-manager.js