function checkFrameset() {
  if(self==top) { top.location.href="http://www.spirituelle.info/homeframe.htm?" + location.href;}
 }

function lesezeichen(verweis, name)
{
  if(navigator.appName != 'Microsoft Internet Explorer')
  {
    alert("Diese Funktion wird von Ihrem Browser nicht unterst&uuml;tzt!")
    return
  }
  window.external.AddFavorite(verweis, name)
}

function count()
{
var gesamt=0;
var anzeige = document.form.anzeige.value ;
var anzahl = anzeige.length ;
if (anzahl <= 240) gesamt = 5 ;
if (anzahl > 240) gesamt = 5 + ((anzahl - 240) * 0.0088) ;
if (anzahl == 0) gesamt = 0 ;
gesamt = Math.round (gesamt * 100) /100 + " Euro";
document.form.preis.value = gesamt;
}

// Kleinanzeigen:

var win = null;
function OpenPic(mypage,myname,w,h){
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,resizable'
	win = window.open(mypage,myname,settings)
	if(win.window.focus){
		win.window.focus();
	}
}


function schreibe_verlinkungslink() {
	if(navigator.appName == 'Microsoft Internet Explorer') {
	with(document) {
		open("text/html");
		write("<A HREF=\"javascript:window.external.AddFavorite(\'http://www.spirituelle.info/\', \'Esoterik Seminare und Kleinanzeigen\')\" title=\"Klicken Sie hier um die Startseite von Spirituelle.info Ihren Lesezeichen hinzuzuf&uuml;gen.\" class=\"menuelinie\">Bookmark</A> ");
		write("<A HREF=\"javascript:window.external.AddFavorite(location.href, document.title)\" title=\"Bitte klicken Sie hier, um speziell diese Unterseite Ihren Lesezeichen hinzuzuf&uuml;gen.\" class=\"menuelinie\">Diese Seite merken</A> ");
		write("<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=\"menuelinie\">weitersagen</a> ");
		close();
		} 
	}
	Verlinkungs_Datei = "http://www.leichte.info/verlinken.php" ;
	Aktuelle_Url = window.location.href ;
	Aktuelle_Url = Aktuelle_Url.substr(0,127);
	Aktuelle_Url = Aktuelle_Url.replace(/&/g,":und:") ;
	Aktuelle_Url = Aktuelle_Url.replace(/\?/g,":frage:") ;
	Aktuelle_Url = Aktuelle_Url.replace(/ /g,"%20") ;
	Aktuelle_Url = Aktuelle_Url.replace(/=/g,":ist:") ;
	Aktuelle_Url = Aktuelle_Url.replace(/#/g,":raute:") ;
	Titel = document.title ;
	Titel = Titel.substr(0,127);
	Titel = Titel.replace(/'/g," ") ;
	Titel = Titel.replace(/"/g," ") ;
	Titel_x = Titel.replace(/&/g,":und:") ;
	Titel_x = Titel_x.replace(/\?/g,":frage:") ;
	Titel_x = Titel_x.replace(/ /g,"%20") ;
	Titel_x = Titel_x.replace(/=/g,":ist:") ;
	test_Url = Aktuelle_Url.substr(0,Verlinkungs_Datei.length);
	Aktuelle_Url = Verlinkungs_Datei + "?Url=" + Aktuelle_Url + "&Titel=" + Titel_x ;
	if (Aktuelle_Url.match(/["']/g)) { Aktuelle_Url = Verlinkungs_Datei ; }
	//	alert(Aktuelle_Url+" \n"+test_Url);
	if (test_Url!=Verlinkungs_Datei) {
		with(document) {
			open("text/html");
			write("<A HREF=\"" + Aktuelle_Url + "\"  title=\"Bitte klicken Sie hier um diese Seite zu verlinken. (" + Titel + ")\" class=\"menuelinie\">verlinken</A> ");
			close();
		}
	}
}
function schreibe_actioncenter() {
	if(navigator.appName == 'Microsoft Internet Explorer') {
	with(document) {
		open("text/html");
		write('</td></tr><tr><td align="left" class="spalterechtstext" style="padding-left:6px;padding-right:5px;" onmouseover="this.style.backgroundColor=\'#FFFF00\'" onmouseout="this.style.backgroundColor=\'#FFFFB3\'">'+"<A HREF=\"javascript:window.external.AddFavorite(location.href, document.title)\" title=\"Bitte klicken Sie hier, um speziell diese Unterseite Ihren Lesezeichen hinzuzuf&uuml;gen.\">Diese Seite merken</A>");
		write('</td></tr><tr><td align="left" class="spalterechtstext" style="padding-left:6px;padding-right:5px;" onmouseover="this.style.backgroundColor=\'#FFFF00\'" onmouseout="this.style.backgroundColor=\'#FFFFB3\'">'+"<A HREF=\"javascript:window.external.AddFavorite(\'http://www.spirituelle.info/\', \'Esoterik Seminare und Kleinanzeigen\')\" title=\"Klicken Sie hier um die Startseite von Spirituelle.info Ihren Lesezeichen hinzuzuf&uuml;gen.\">Bookmark</A>");
		write('</td></tr><tr><td align="left" class="spalterechtstext" style="padding-left:6px;padding-right:5px;" onmouseover="this.style.backgroundColor=\'#FFFF00\'" onmouseout="this.style.backgroundColor=\'#FFFFB3\'">'+"<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\">Artikel weitersagen</a>");
		close();
		} 
	}
	Verlinkungs_Datei = "http://www.leichte.info/verlinken.php" ;
	Aktuelle_Url = window.location.href ;
	Aktuelle_Url = Aktuelle_Url.substr(0,127);
	Aktuelle_Url = Aktuelle_Url.replace(/&/g,":und:") ;
	Aktuelle_Url = Aktuelle_Url.replace(/\?/g,":frage:") ;
	Aktuelle_Url = Aktuelle_Url.replace(/ /g,"%20") ;
	Aktuelle_Url = Aktuelle_Url.replace(/=/g,":ist:") ;
	Aktuelle_Url = Aktuelle_Url.replace(/#/g,":raute:") ;
	Titel = document.title ;
	Titel = Titel.substr(0,127);
	Titel = Titel.replace(/'/g," ") ;
	Titel = Titel.replace(/"/g," ") ;
	Titel_x = Titel.replace(/&/g,":und:") ;
	Titel_x = Titel_x.replace(/\?/g,":frage:") ;
	Titel_x = Titel_x.replace(/ /g,"%20") ;
	Titel_x = Titel_x.replace(/=/g,":ist:") ;
	test_Url = Aktuelle_Url.substr(0,Verlinkungs_Datei.length);
	Aktuelle_Url = Verlinkungs_Datei + "?Url=" + Aktuelle_Url + "&Titel=" + Titel_x ;
	if (Aktuelle_Url.match(/["']/g)) { Aktuelle_Url = Verlinkungs_Datei ; }
	//	alert(Aktuelle_Url+" \n"+test_Url);
	if (test_Url!=Verlinkungs_Datei) {
		with(document) {
			open("text/html");
			write('</td></tr><tr><td align="left" class="spalterechtstext" style="padding-left:6px;padding-right:5px;" onmouseover="this.style.backgroundColor=\'#FFFF00\'" onmouseout="this.style.backgroundColor=\'#FFFFB3\'">'+"<A HREF=\"" + Aktuelle_Url + "\"  title=\"Bitte klicken Sie hier um diese Seite zu verlinken. (" + Titel + ")\">Artikel verlinken</A>");
			close();
		}
	}
}



function clickzaehlentopliste(link_id) {
	document.bild.src = "out.php?site=" + link_id ;
}





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;
		}
	}
}