var themeBaseURL=tinyMCEPopup.editor.baseURI.toAbsolute("themes/"+tinyMCEPopup.getParam("theme"));function getColorPickerHTML(f,h){var e="";e+='<a id="'+f+'_link" href="javascript:;" onclick="tinyMCEPopup.pickColor(event,\''+h+'\');" onmousedown="return false;" class="pickcolor">';e+='<span id="'+f+'" title="'+tinyMCEPopup.getLang("browse")+'">&nbsp;</span></a>';return e}function updateColor(e,d){document.getElementById(e).style.backgroundColor=document.forms[0].elements[d].value}function setBrowserDisabled(h,j){var f=document.getElementById(h);var i=document.getElementById(h+"_link");if(i){if(j){i.setAttribute("realhref",i.getAttribute("href"));i.removeAttribute("href");tinyMCEPopup.dom.addClass(f,"disabled")}else{if(i.getAttribute("realhref")){i.setAttribute("href",i.getAttribute("realhref"))}tinyMCEPopup.dom.removeClass(f,"disabled")}}}function getBrowserHTML(k,m,n,l){var o=l+"_"+n+"_browser_callback",j,p;j=tinyMCEPopup.getParam(o,tinyMCEPopup.getParam("file_browser_callback"));if(!j){return""}p="";p+='<a id="'+k+'_link" href="javascript:openBrowser(\''+k+"','"+m+"', '"+n+"','"+o+'\');" onmousedown="return false;" class="browse">';p+='<span id="'+k+'" title="'+tinyMCEPopup.getLang("browse")+'">&nbsp;</span></a>';return p}function openBrowser(l,i,j,k){var h=document.getElementById(l);if(h.className!="mceButtonDisabled"){tinyMCEPopup.openBrowser(i,j,k)}}function selectByValue(u,s,n,o,m){if(!u||!u.elements[s]){return}var t=u.elements[s];var i=false;for(var q=0;q<t.options.length;q++){var p=t.options[q];if(p.value==n||(m&&p.value.toLowerCase()==n.toLowerCase())){p.selected=true;i=true}else{p.selected=false}}if(!i&&o&&n!=""){var p=new Option(n,n);p.selected=true;t.options[t.options.length]=p;t.selectedIndex=t.options.length-1}return i}function getSelectValue(e,h){var f=e.elements[h];if(f==null||f.options==null||f.selectedIndex===-1){return""}return f.options[f.selectedIndex].value}function addSelectValue(i,l,n,k){var m=i.elements[l];var j=new Option(n,k);m.options[m.options.length]=j}function addClassesToList(l,n){var q=document.getElementById(l);var p=tinyMCEPopup.getParam("theme_advanced_styles",false);p=tinyMCEPopup.getParam(n,p);if(p){var m=p.split(";");for(var s=0;s<m.length;s++){if(m!=""){var i,o;i=m[s].split("=")[0];o=m[s].split("=")[1];q.options[q.length]=new Option(i,o)}}}else{tinymce.each(tinyMCEPopup.editor.dom.getClasses(),function(a){q.options[q.length]=new Option(a.title||a["class"],a["class"])})}}function isVisible(d){var e=document.getElementById(d);return e&&e.style.display!="none"}function convertRGBToHex(h){var f=new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)","gi");var e=h.replace(f,"$1,$2,$3").split(",");if(e.length==3){r=parseInt(e[0]).toString(16);g=parseInt(e[1]).toString(16);b=parseInt(e[2]).toString(16);r=r.length==1?"0"+r:r;g=g.length==1?"0"+g:g;b=b.length==1?"0"+b:b;return"#"+r+g+b}return h}function convertHexToRGB(c){if(c.indexOf("#")!=-1){c=c.replace(new RegExp("[^0-9A-F]","gi"),"");r=parseInt(c.substring(0,2),16);g=parseInt(c.substring(2,4),16);b=parseInt(c.substring(4,6),16);return"rgb("+r+","+g+","+b+")"}return c}function trimSize(c){return c.replace(/([0-9\.]+)px|(%|in|cm|mm|em|ex|pt|pc)/,"$1$2")}function getCSSSize(c){c=trimSize(c);if(c==""){return""}if(/^[0-9]+$/.test(c)){c+="px"}return c}function getStyle(h,j,f){var i=tinyMCEPopup.dom.getAttrib(h,j);if(i!=""){return""+i}if(typeof(f)=="undefined"){f=j}return tinyMCEPopup.dom.getStyle(h,f)};