function frames() {
if ((!parent.Main)&&(!parent.workshop)&&(!parent.links)&&(!parent.results))
top.location.href="http://www.ocinside.de/go_d.html?" + location;
}


// Window
function openScript(url, width, height) {
        var Win = window.open(url,"openScript",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=yes,status=yes' );
}


// Posting
clckcnt = 0;
function clckcntr() {
clckcnt++;
if(clckcnt > 1) {
    if(clckcnt > 2) { return false; }
    alert('Verarbeitung läuft...\n\n' + '     Bitte haben Sie Geduld.');
    return false;}
return true;}


// Picture resize
function picturecheck() {
 for(i = 0; i < document.images.length; ++i)
 {
  if(document.images[i].width > 600) {
if (document.images[i].parentElement) { if (document.images[i].parentElement.tagName != "A") { document.images[i].outerHTML = "<a href='"+document.images[i].src+"' target='_blank'><img src='"+document.images[i].src+"' border='0'><\/a>"; } }
document.images[i].width = 600; document.images[i].title='Das Bild wurde zur besseren Anzeige im Forum verkleinert !'; }
  else if(document.images[i].height > 800) {
if (document.images[i].parentElement) { if (document.images[i].parentElement.tagName != "A") { document.images[i].outerHTML = "<a href='"+document.images[i].src+"' target='_blank'><img src='"+document.images[i].src+"' border='0'><\/a>"; } }
document.images[i].height = 800; document.images[i].title='Das Bild wurde zur besseren Anzeige im Forum verkleinert !'; }
 }
}


var Quote = 0;
var Bold  = 0;
var Italic = 0;
var Underline = 0;
var Code = 0;
var Center = 0;

// IBC Code stuff
var text_enter_url      = "Komplette Url eingeben";
var text_enter_url_name = "Namen der Webseite eingeben";
var text_enter_image    = "Komplette Url zum Bild eingeben";
var text_enter_email    = "Email Adresse eingeben";
var text_enter_email_name = "Namen der Emailadresse eingeben";
var text_enter_flash    = "Komplette Url zum Flash Movie eingeben";
var text_flash_width    = "Die Breite des Flashmovies ? Maximale Breite= ";
var text_flash_height   = "Die Höhe des Flashmovies ? Maximale Höhe= ";
var text_copyurl	= "Hier ist die URL zu diesem Forenbeitrag.";
if (window.clipboardData) { text_copyurl+= "\nDen Link kann man mit OK oder Strg + c kopieren."; }
if (!window.clipboardData) { text_copyurl+= "\nDen Link kann man mit Strg + c kopieren."; }

b_text = "Fuege FETTEN Text ein  [Alt] + b";
i_text = "Fuege KURSIVEN Text ein  [Alt] + i";
u_text = "Fuege UNTERSTRICHENEN Text ein  [Alt] + u";
url_text = "Fuege einen Hyperlink in Deine Nachricht ein  [Alt] + h";
email_text = "Fuege einen EmailLink in Deine Nachricht ein  [Alt] + e";
img_text = "Fuege ein Bild in Deine Nachricht ein";
code_text = "Fuege Codezeilen in Deine Nachricht ein  [Alt] + c";
quote_text = "Fuege ein Zitat in Deine Nachricht ein  [Alt] + q";
center_text = "Zentriere Deinen Text  [Alt] + z";
img_text = "Fuege ein Bild in Deine Nachricht ein  [Alt] + p";
flash_text = "Fuege eine Flashanimation in Deine Nachricht ein. [Alt] + f";
font_text = "Hier kannst Du die Schriftart wählen";
size_text = "Hier kannst Du die Schriftgrösse wählen";
color_text = "Hier kannst Du die Schriftfarbe wählen.";
_text = "Benutze diese Buttons, um Ikoncodes einzufuegen.";
var smilie1_text = "Hiermit kann man schnell einen Smilie einfuegen";
var smilie2_text = "Hiermit kann man schnell einen Smilie einfuegen";
var smilie3_text = "Hiermit kann man schnell einen Smilie einfuegen";
var smilie4_text = "Hiermit kann man schnell einen Smilie einfuegen";
var smilie5_text = "Hiermit kann man schnell einen Smilie einfuegen";
var smilie6_text = "Hiermit kann man schnell einen Smilie einfuegen";
var smilie7_text = "Hiermit kann man schnell einen Smilie einfuegen";
var smilie8_text = "Hiermit kann man schnell einen Smilie einfuegen";
var smilie9_text = "Hiermit kann man schnell einen Smilie einfuegen";
var smilie0_text = "Hiermit kann man schnell einen Smilie einfuegen";
var smilie11_text = "Frohe Weihnachten";

// Error stuff
var error_no_url        = "Keine URL";
var error_no_title      = "Kein Name";
var error_no_email      = "Keine Email Adresse";
var error_no_name       = "Kein Name fuer die Email Adresse";
var error_no_width      = "Breitenangabe fehlt";
var error_no_height     = "Höhenangabe fehlt";


function PostWrite(NewCode) {
    if (document.PostTopic.inpost.createTextRange && document.PostTopic.inpost.caretPos) {
                var caretPos = document.PostTopic.inpost.caretPos;
                caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? NewCode + ' ' : NewCode;
        } else {
// FF
    if (document.PostTopic.inpost.selectionStart || document.PostTopic.inpost.selectionStart == '0') {
                var scrollPos = document.PostTopic.inpost.scrollTop;
                var starttext = document.PostTopic.inpost.value.substr(0, document.PostTopic.inpost.selectionStart);
                var endtext = document.PostTopic.inpost.value.substr(document.PostTopic.inpost.selectionEnd);

		document.PostTopic.inpost.value = starttext + NewCode;
                var caretPos = document.PostTopic.inpost.selectionStart;
		document.PostTopic.inpost.value+= endtext;
		document.PostTopic.inpost.setSelectionRange(caretPos,caretPos);
		document.PostTopic.inpost.scrollTop = scrollPos;
// FF
        } else {
                document.PostTopic.inpost.value+=NewCode
        }
        }
        setfocus();
}


var text = "";
function getActiveText(selectedtext) {
        text = (document.all) ? document.selection.createRange().text : window.getSelection();
        if (selectedtext.createTextRange) {
            selectedtext.caretPos = document.selection.createRange().duplicate();
        }
        return true;
}


function setfocus() {
document.PostTopic.inpost.focus();
}


function IBCurl() {
    var FoundErrors = '';
    var enterURL   = prompt(text_enter_url, "http://");
    if (enterURL == null) {
	document.PostTopic.inpost.focus();
	return;
    }
    var enterTITLE = prompt(text_enter_url_name, "Name der Webseite");
    if (enterURL == '') {
        FoundErrors += "\n" + error_no_url;
    }
    if (enterTITLE == null)  {
	document.PostTopic.inpost.focus();
	return;
    }
    if (enterTITLE == '')  {
        FoundErrors += "\n" + error_no_title;
    }
    if (FoundErrors)  {
        alert("Fehler!"+FoundErrors);
	document.PostTopic.inpost.focus();
        return;
    }
    var ToAdd = "[URL="+enterURL+"]"+enterTITLE+"[/URL]";
     PostWrite(ToAdd);
	document.PostTopic.inpost.focus();
}


function IBCemail() {
    var FoundErrors = '';
    var enterEMAIL  = prompt(text_enter_email, "Email-Adresse");
    if (enterEMAIL == null)    {
	document.PostTopic.inpost.focus();
	return;
    }
    var enterETITLE = prompt(text_enter_email_name, "Beschreibung");
    if (!enterEMAIL)    {
        FoundErrors += "\n" + error_no_email;
    }
    if (enterETITLE == null)  {
	document.PostTopic.inpost.focus();
	return;
    }
    if (!enterETITLE)  {
        FoundErrors += "\n" + error_no_name;
    }
    if (FoundErrors)  {
        alert("Fehler!"+FoundErrors);
	document.PostTopic.inpost.focus();
        return;
    }   
    var ToAdd = "[EMAIL="+enterEMAIL+"]"+enterETITLE+"[/EMAIL]";
     PostWrite(ToAdd);
	document.PostTopic.inpost.focus();
}	

function IBCimage() {
    var FoundErrors = '';
    var enterURL   = prompt(text_enter_image, "http://");
    if (enterURL == null) {
	document.PostTopic.inpost.focus();
	return;
    }
    if (enterURL == '') {
        FoundErrors += "\n" + error_no_url;
    }
    if (FoundErrors) {
        alert("Fehler!"+FoundErrors);
	document.PostTopic.inpost.focus();
        return;
    }
    var ToAdd = "[IMG]"+enterURL+"[/IMG]";
    PostWrite(ToAdd);
	document.PostTopic.inpost.focus();
}

function copyurl(docurl) {
if (!docurl) {
    var docurl = document.location.href;
    if (docurl.substr(0,33) == "http://www.ocinside.de/go_d.html?") { docurl = docurl.substr(33,docurl.length); }
    }
    var enterURL   = prompt(text_copyurl, docurl);
    if (enterURL == null) {
	return;
    }
    if (enterURL == '') {
	return;
    }
    if (enterURL != '' && window.clipboardData) {
	window.clipboardData.setData("Text",enterURL);
	return;
    }
}

function IBCflash(maxWidth, maxHeight) {
   var FoundErrors = '';
   var FlashURL    = prompt(text_enter_flash, "http://");
   var FlashWidth  = prompt(text_flash_width +" "+ maxWidth, "");
   var FlashHeight = prompt(text_flash_height +" "+ maxHeight, "");
   if (!FlashURL)    { FoundErrors+="\n"+error_no_url;      }
   if (!FlashWidth)  { FoundErrors+="\n"+error_no_width;    }
   if (!FlashHeight) { FoundErrors+="\n"+error_no_height;   }
   if (FoundErrors)  { alert("Fehler!"+FoundErrors); return; }
   var ToAdd = "[FLASH="+FlashWidth+","+FlashHeight+"]"+FlashURL+"[/FLASH]";
   PostWrite(ToAdd);
}


function IBCcode() {
   if (Code == 0) {
      ToAdd = "[CODE]";
      document.PostTopic.code.value = " Code*";
      Code = 1;
   } else {
      ToAdd = "[/CODE]";
      document.PostTopic.code.value = " Code ";
      Code = 0;
   }
   PostWrite(ToAdd);
}

function IBCquote() {
   if (Quote == 0) {
      ToAdd = "[QUOTE]";
      document.PostTopic.quote.value = " Quote*";
      Quote = 1;
   } else {
      ToAdd = "[/QUOTE]";
      document.PostTopic.quote.value = " Quote ";
      Quote = 0;
   }
   PostWrite(ToAdd);
}


function IBCbold() {
   if (Bold == 0) {
      ToAdd = "[B]";
      document.PostTopic.bold.value = " B*";
      Bold = 1;
   } else {
      ToAdd = "[/B]";
      document.PostTopic.bold.value = " B ";
      Bold = 0;
   }
   PostWrite(ToAdd);
}


function IBCenter() {
   if (Center == 0) {
      ToAdd = "[Center]";
      document.PostTopic.center.value = " C*";
      Center = 1;
   } else {
      ToAdd = "[/Center]";
      document.PostTopic.center.value = " C ";
      Center = 0;
   }
   PostWrite(ToAdd);
}



function IBCitalic() {
   if (Italic == 0) {
      ToAdd = "[I]";
      document.PostTopic.italic.value = " I*";
      Italic = 1;
   } else {
      ToAdd = "[/I]";
      document.PostTopic.italic.value = " I ";
      Italic = 0;
   }
   PostWrite(ToAdd);
}


function IBCunder() {
   if (Underline == 0) {
      ToAdd = "[U]";
      document.PostTopic.under.value = " U*";
      Underline = 1;
   } else {
      ToAdd = "[/U]";
      document.PostTopic.under.value = " U ";
      Underline = 0;
   }
   PostWrite(ToAdd);
}


function stat(thevalue) {
// places mini-help text into help/error textbox
	document.PostTopic.status.value = eval(thevalue+"_text");
}


function showsize(size) {
		txt=prompt("Text, der in Größe "+size+" erscheinen soll","Text"); 
		if (txt!=null) {             
			AddTxt="[size="+size+"]"+txt+"[/size]";
			PostWrite(AddTxt);
		}        
}

function showcolor(color) {
     	txt=prompt("Text, der in der Farbe "+color+" erscheinen soll","Text");
		if(txt!=null) {
			AddTxt="[color="+color+"]"+txt+"[/color]";
			PostWrite(AddTxt);        
		} 
}

function showfont(font) {
		txt=prompt("Text, der in der Schrift "+font+" erscheinen soll","Text");
		if (txt!=null) {             
			AddTxt="[font="+font+"]"+txt+"[/font]";
			PostWrite(AddTxt);
		}        
}

function smilie1() { PostWrite(":)");
document.PostTopic.inpost.focus(); }

function smilie2() { PostWrite(";)");
document.PostTopic.inpost.focus(); }

function smilie3() { PostWrite(":lol:");
document.PostTopic.inpost.focus(); }

function smilie4() { PostWrite(":thumb:");
document.PostTopic.inpost.focus(); }

function smilie5() { PostWrite(":punk:");
document.PostTopic.inpost.focus(); }

function smilie6() { PostWrite(":noidea:");
document.PostTopic.inpost.focus(); }

function smilie7() { PostWrite(":godlike:");
document.PostTopic.inpost.focus(); }

function smilie8() { PostWrite(":ocinside:");
document.PostTopic.inpost.focus(); }

function smilie9() { PostWrite(":moin:");
document.PostTopic.inpost.focus(); }

function smilie0() { PostWrite(":nabend:");
document.PostTopic.inpost.focus(); }

function smilie11() { PostWrite(":niko:");
document.PostTopic.inpost.focus(); }





<!-- // cloak
var submitted = 0;
// -->
