function schreibe_verlinkungslink() {
	var beginTeil = '';
	var endeTeil = ' ';
	var className = 'menuelinie';
	var encUrl = encodeURIComponent(window.location.href);
	var encTitel = encodeURIComponent(document.title);
	encTitel = encTitel.replace(/"/g," ") ;
	with(document) {
		open("text/html");
		if(navigator.appName == 'Microsoft Internet Explorer') {
			write(beginTeil+"<A HREF=\"javascript:window.external.AddFavorite(location.href,document.title)\" title=\"Bitte klicken Sie hier, um speziell diese Unterseite den Lesezeichen ihres Browsers hinzuzuf&uuml;gen.\" class=\"" + className + "\">bookmark</A>"+endeTeil);
		} 
		write(beginTeil+"<a href=\"mailto:?subject=Hallo%20%2D%20eine%20interessante%20Seite&amp;body=Hallo%2C%0Ahabe%20eine%20interessante%20Seite%20gefunden%3A%0A" + window.location.href.replace(/&/g,"%26") + "\" title=\"Mailen Sie Ihren Freunden einen Link zu dieser Seite\" class=\"" + className + "\">weitersagen</a>"+endeTeil);
		write(beginTeil+"<A HREF=\"http://www.leichte.info/verlinken.php?Url=" + encUrl + "&Titel=" + encTitel + "\"  title=\"Bitte klicken Sie hier um diese Seite zu verlinken. (" + document.title + ")\" class=\"" + className + "\">verlinken</A>"+endeTeil);
		write(beginTeil+"<A HREF=\"http://twitter.com/share?url=" + encUrl + "&amp;text=" + encTitel + "\" title=\"auf Twitter weitersagen\" rel=\"nofollow\" target=\"_blank\" class=\"" + className + "\">tweet</A>"+endeTeil);
		write(beginTeil+"<A HREF=\"http://www.facebook.com/sharer.php?u=" + encUrl + "\"  title=\"Fuer Facebook Mitglieder: Auf Facebook teilen\" rel=\"nofollow\" class=\"" + className + "\">facebook</A>"+endeTeil);
		close();
	}
}


var gbisbold;
var gbisitalic;

function gbStoreCaret(textEl) {
	if (textEl.createTextRange) textEl.caretPos = document.selection.createRange().duplicate();
}

function gbmakebold() {
	document.post.comment_text.focus();
	if (document.post.comment_text.createTextRange && document.post.comment_text.caretPos) {
		mySelection=document.post.comment_text.caretPos.text;
		if (mySelection) {
			document.post.comment_text.caretPos.text="[b]"+mySelection+"[/b]";
			document.post.comment_text.focus();
			gbStoreCaret(document.post.comment_text);
		} else {
			if (gbisbold) {
				document.post.comment_text.caretPos.text='[/b]';
				gbisbold=false;
			} else {
				document.post.comment_text.caretPos.text='[b]';
				gbisbold=true;
			}
			gbStoreCaret(document.post.comment_text);
		}
	} else {
		if (gbisbold) {
			document.post.comment_text.value+='[/b]';
			gbisbold=false;
		} else {
			document.post.comment_text.value+='[b]';
			gbisbold=true;
		}
	}
}

function gbmakeitalic() {
	document.post.comment_text.focus();
	if (document.post.comment_text.createTextRange && document.post.comment_text.caretPos) {
		mySelection=document.post.comment_text.caretPos.text;
		if (mySelection) {
			document.post.comment_text.caretPos.text="[i]"+mySelection+"[/i]";
			document.post.comment_text.focus();
			gbStoreCaret(document.post.comment_text);
		} else {
			if (gbisitalic) {
				document.post.comment_text.caretPos.text='[/i]';
				gbisitalic=false;
			} else {
				document.post.comment_text.caretPos.text='[i]';
				gbisitalic=true;
			}
			gbStoreCaret(document.post.comment_text);
		}
	} else {
		if (gbisitalic) {
			document.post.comment_text.value+='[/i]';
			gbisitalic=false;
		} else {
			document.post.comment_text.value+='[i]';
			gbisitalic=true;
		}
	}
}

function gbmakezitat() {
	document.post.comment_text.focus();
	if (document.post.comment_text.createTextRange && document.post.comment_text.caretPos) {
		mySelection=document.post.comment_text.caretPos.text;
		if (mySelection) {
			document.post.comment_text.caretPos.text="[quote]"+mySelection+"[/quote]";
			document.post.comment_text.focus();
			gbStoreCaret(document.post.comment_text);
		} else {
			if (gbisitalic) {
				document.post.comment_text.caretPos.text='[/quote]';
				gbisitalic=false;
			} else {
				document.post.comment_text.caretPos.text='[quote]';
				gbisitalic=true;
			}
			gbStoreCaret(document.post.comment_text);
		}
	} else {
		if (gbisitalic) {
			document.post.comment_text.value+='[/quote]';
			gbisitalic=false;
		} else {
			document.post.comment_text.value+='[quote]';
			gbisitalic=true;
		}
	}
}
