//-------------------------------------------- News Text --------------------------------------------
function wopen(link,wi,he) {
      wincom = window.open(link ,"fenster","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width="+wi+",height="+he);
      wincom.focus() ;
}



// Link einfügen
function linke() {
	if (document.selection) {
		var range = document.selection.createRange();
        if (range.parentElement() == document.all.newstext)
         range.text = '<a href="" target="">' + range.text + '<\/a>';
     }
}

// Text fett
function bold() {
	if (document.selection) {
		var range = document.selection.createRange();
        if (range.parentElement() == document.all.newstext)
         range.text = '<b>' + range.text + '<\/b>';
     }
}

// Text kusiv
function kursiv() {
	if (document.selection) {
		var range = document.selection.createRange();
        if (range.parentElement() == document.all.newstext)
         range.text = '<i>' + range.text + '<\/i>';
     }
}

// Text unterstrichen
function under() {
	if (document.selection) {
		var range = document.selection.createRange();
        if (range.parentElement() == document.all.newstext)
         range.text = '<u>' + range.text + '<\/u>';
     }
}


// Schnittpunkt einfügen
function markSelection ( txtObj ) {
 if ( txtObj.createTextRange ) {
   txtObj.caretPos = document.selection.createRange().duplicate();
   isSelected = true;
 }
}

function text_cut ( txtName, tag, pos, enclose ) {
 var closeTag = tag;
 if ( enclose ) {
   var attribSplit = tag.indexOf ( ' ' );
   if ( tag.indexOf ( ' ' ) > -1 )
     closeTag = tag.substring ( 0, attribSplit );
 }
 if ( isSelected ) {
   var txtObj = eval ( "document.forms[0]." + txtName );
   if (txtObj.createTextRange && txtObj.caretPos) {
     var caretPos = txtObj.caretPos;
     caretPos.text = ( ( enclose ) ? "<img src=\""+tag+"\" border=0 align=\""+pos+"\">"+caretPos.text+"" : ""+tag+""+caretPos.text );
     markSelection ( txtObj );
     if ( txtObj.caretPos.text=='' ) {
       isSelected=false;
    txtObj.focus();
     }
   }
 } else {
   // x
 }
}

//-------------------------------------------- News Text --------------------------------------------
