function setposition(campoad){position=document.getElementById(campoad).document.selection.createRange();return;}function textoselec(campoad){e=document.getElementById(campoad);if(IE){var sel=e.document.selection.createRange().text;}else if(WK){var sel=e.contentWindow.getSelection();}else if(OP){var sel=e.contentWindow.document.getSelection();}else{var sel=e.contentWindow.getSelection();}return sel.toString();}function insertcode(code,campoad){e=document.getElementById(campoad);iniciar(campoad);enfocar(campoad);if(IE){if(typeof position=='undefined'){setposition(campoad);}position.pasteHTML(code);position.select();setposition(campoad);}else if(WK){document.getElementById(campoad).contentWindow.document.execCommand('inserthtml',false,code);enfocar(campoad);}else if(OP){document.getElementById(campoad).contentWindow.document.execCommand('inserthtml',false,code);enfocar(campoad);}else{document.getElementById(campoad).contentWindow.document.execCommand('inserthtml',false,code);enfocar(campoad);}return;}function insertcodigo(idcodigo,campoad){if(IE){var code='<img src="http://www.macrobar.com.ar/imagen/general/iconocode.gif" border="0" style="vertical-align:middle" alt="" id="codigo'+idcodigo+'">';}else if(WK){var code='<img src="http://www.macrobar.com.ar/imagen/general/iconocode.gif" border="0" style="vertical-align:middle" alt="" id="codigo'+idcodigo+'">';}else if(OP){var code='<img src="http://www.macrobar.com.ar/imagen/general/iconocode.gif" border="0" style="vertical-align:middle" alt="" id="codigo'+idcodigo+'">';}else{var code='<img src="http://www.macrobar.com.ar/imagen/general/iconocode.gif" border="0" style="vertical-align:middle" alt="" id="codigo'+idcodigo+'">';}insertcode(code,campoad);return;}function insertvideo(codigo,campoad,tags){if(IE){var code='<img src="http://www.macrobar.com.ar/imagen/general/iconovideo.gif" id="youtube'+codigo+'|'+tags+'" border="0">';}else if(WK){var code='<img src="http://www.macrobar.com.ar/imagen/general/iconovideo.gif" id="youtube'+codigo+'|'+tags+'" border="0">';}else if(OP){var code='<img src="http://www.macrobar.com.ar/imagen/general/iconovideo.gif" id="youtube'+codigo+'|'+tags+'" border="0">';}else{var code='<img src="http://www.macrobar.com.ar/imagen/general/iconovideo.gif" id="youtube'+codigo+'|'+tags+'" border="0">';}insertcode(code,campoad);return;}function insertfoto(url,urltumb,ancho,alto,anchomostrar,altomostrar,id,campoad){datos=url+'|'+id;if(IE){var code='<img src="http://www.macrobar.com.ar/imagen/general/iconocamara.gif" border="0" id="imagen'+datos+'">';}else if(WK){var code='<img src="http://www.macrobar.com.ar/imagen/general/iconocamara.gif" border="0" id="imagen'+datos+'">';}else if(OP){var code='<img src="http://www.macrobar.com.ar/imagen/general/iconocamara.gif" border="0" id="imagen'+datos+'">';}else{var code='<img src="http://www.macrobar.com.ar/imagen/general/iconocamara.gif" border="0" id="imagen'+datos+'">';}insertcode(code,campoad);return;}function insertcarita(imagen,campoad){var code='<img src="http://www.macrobar.com.ar/imagen/general/caritas/'+imagen+'" id="carita'+imagen+'" style="vertical-align:middle" alt="" border="0">';insertcode(code,campoad);return;}function enfocar(campoad){if(IE){document.getElementById(campoad).focus();}else if(WK){document.getElementById(campoad).contentWindow.focus();}else if(OP){document.getElementById(campoad).focus();}else{document.getElementById(campoad).contentWindow.focus();}return;}function boldf(imagen,campoad){iniciar(campoad);enfocar(campoad);if(IE){document.getElementById(campoad).document.execCommand('bold');setposition(campoad);}else if(WK){document.getElementById(campoad).contentWindow.document.execCommand('bold',false,null);}else if(OP){document.getElementById(campoad).contentWindow.document.execCommand('bold',false,null);}else{document.getElementById(campoad).contentWindow.document.execCommand('bold',false,null);}enfocar(campoad);return;}function italicf(imagen,campoad){iniciar(campoad);enfocar(campoad);if(IE){document.getElementById(campoad).document.execCommand('italic',false,null);setposition(campoad);}else if(WK){document.getElementById(campoad).contentWindow.document.execCommand('italic',false,null);}else if(OP){document.getElementById(campoad).contentWindow.document.execCommand('italic',false,null);}else{document.getElementById(campoad).contentWindow.document.execCommand('italic',false,null);}return;}function underlinef(imagen,campoad){iniciar(campoad);enfocar(campoad);if(IE){document.getElementById(campoad).document.execCommand('underline',false,null);setposition(campoad);}else if(WK){document.getElementById(campoad).contentWindow.document.execCommand('underline',false,null);}else if(OP){document.getElementById(campoad).contentWindow.document.execCommand('underline',false,null);}else{document.getElementById(campoad).contentWindow.document.execCommand('underline',false,null);}return;}function insertenlace(url,texto,campoad){if(IE){var code='<a href="'+url+'" class="link1">'+texto+'</a> ';}else if(WK){var code='<a href="'+url+'" class="link1">'+texto+'</a> ';}else if(OP){var code='<a href="'+url+'" class="link1">'+texto+'</a> ';}else{var code='<a href="'+url+'" class="link1">'+texto+'</a> ';}insertcode(code,campoad);return;}function insertenlaces(url,texto,campoad){if(IE){var code='<a href="'+url+'" class="link1">'+texto+'</a> <br>';}else if(WK){var code='<a href="'+url+'" class="link1">'+texto+'</a> <br>';}else if(OP){var code='<a href="'+url+'" class="link1">'+texto+'</a> <br>';}else{var code='<a href="'+url+'" class="link1">'+texto+'</a> <br>';}insertcode(code,campoad);return;}function iniciar(campoad){if(IE){if(document.getElementById(campoad).document.designMode=="Off"){document.getElementById(campoad).document.designMode="On";setposition(campoad);enfocar(campoad);}}else if(WK){if(document.getElementById(campoad).contentDocument.designMode=="off"){document.getElementById(campoad).contentDocument.designMode="on";document.getElementById(campoad).contentWindow.document.execCommand('backcolor',false,'#FFFFFF');document.getElementById(campoad).contentWindow.document.execCommand('styleWithCSS',false,false);enfocar(campoad);}}else if(OP){if(document.getElementById(campoad).contentDocument.designMode=="off"){document.getElementById(campoad).contentDocument.designMode="on";document.getElementById(campoad).contentWindow.document.execCommand('backcolor',false,'#FFFFFF');enfocar(campoad);}}else{if(document.getElementById(campoad).contentDocument.designMode=="off"){document.getElementById(campoad).contentDocument.designMode="on";document.getElementById(campoad).contentWindow.document.execCommand('backcolor',false,'#FFFFFF');document.getElementById(campoad).contentWindow.document.execCommand('styleWithCSS',false,false);enfocar(campoad);}}return;}