/* 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 InsertMarquee(c){this.editor=c;var a=c.config;var b=this;a.registerButton({id:"insertmarquee",tooltip:this._lc("Insert scrolling marquee"),image:c.imgURL("ed_marquee.gif","InsertMarquee"),textMode:false,action:function(d){b.buttonPress(d)}});a.addToolbarElement("insertmarquee","inserthorizontalrule",-1)}InsertMarquee._pluginInfo={name:"InsertMarquee",version:"1.0",developer:"Udo Schmal",developer_url:"http://www.schaffrath-NeueMedien.de/",c_owner:"Udo Schmal & Schaffrath NeueMedien",license:"htmlArea"};InsertMarquee.prototype._lc=function(a){return Xinha._lc(a,"InsertMarquee")};InsertMarquee.prototype.buttonPress=function(b,c){function a(f,e,g){if(g!=""){f.setAttribute(e,g)}else{f.removeAttribute(e)}}var d=new Object();if(typeof c=="undefined"){c=b.getParentElement()}if(c.tagName.toLowerCase()=="marquee"){d.f_name=c.name;d.f_behavior=c.behavior;d.f_direction=c.direction;d.f_text=c.innerHTML;d.f_width=c.width;d.f_height=c.height;d.f_bgcolor=c.bgColor;d.f_scrollamount=c.scrollAmount;d.f_scrolldelay=c.scrollDelay}else{d={f_name:"",f_behavior:"",f_direction:"",f_text:"",f_width:"",f_height:"",f_bgcolor:"",f_scrollamount:"",f_scrolldelay:""}}b._popupDialog("plugin://InsertMarquee/insert_marquee",function(f){if(!f){return false}else{if(c.tagName.toLowerCase()=="marquee"){a(c,"name",f.f_name);a(c,"id",f.f_name);a(c,"behavior",f.f_behavior);a(c,"direction",f.f_direction);a(c,"width",f.f_width);a(c,"height",f.f_height);a(c,"bgColor",f.f_bgcolor);a(c,"scrollAmount",f.f_scrollamount);a(c,"scrollDelay",f.f_scrolldelay);c.innerHTML=f.f_text}else{var e='<marquee name="'+f.f_name+'" id="'+f.f_name+'" behavior="'+f.f_behavior+'" direction="'+f.f_direction+'" width="'+f.f_width+'" height="'+f.f_height+'" bgcolor="'+f.f_bgcolor+'" scrollamount="'+f.f_scrollamount+'" scrolldelay="'+f.f_scrolldelay+'">\n';alert(e);e=e+f.f_text;e=e+"</marquee>";b.insertHTML(e)}}},d)};