// - - - - - - - - - - - - - - - - - - - - - - - -  //
// - - - - Target=_blank Links (rel=external) - - - //
// - - - - - - - - - - - - - - - - - - - - - - - -  //
function externalLinks() {
	if (document.getElementsByTagName) {
		var anchors = document.getElementsByTagName( "a" );
		for (var i = 0; i < anchors.length; i++) {
			var anchor = anchors[i];
			if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") {
				anchor.target = "_blank";
			}
		}
	}
}  



// COUNTS AND LIMITS THE TEXT AREA
function limit(what,chars,counter) {
	if (what.value.length > chars) {
		what.value=what.value.substr(0,chars);
		alert('You are only allowed to post '+chars+' chars in the field');
	}
	counting = (chars - what.value.length);
	c = document.getElementById(counter);
	c.innerHTML = counting;
}



// COUNTS AND LIMITS THE TEXT AREA (GERMAN)
function limitDe(what,chars,counter) {
	if (what.value.length > chars) {
		what.value=what.value.substr(0,chars);
		alert('Es stehen maximal  '+chars+' Zeichen zur Verfügung');
	}
	counting = (chars - what.value.length);
	c = document.getElementById(counter);
	c.innerHTML = counting;
}



window.onload=function(){
 externalLinks();
}