/*
Copyright by Really Dangerous Gnolls & RdG.mace (mace@gnolls.de)
visit : www.gnolls.de
*/

function popup(name,einstellungen){
         window.open('',name,einstellungen);
}

//newstext
function newsbr(bruch){
        document.news.newstext.value=document.news.newstext.value + bruch
}

function newsbbt(ext, code) {

        uset = window.prompt(ext,'');
        if(uset != "" && uset != null) {
                document.news.newstext.value = document.news.newstext.value + "["+code+"]"+uset+"[/"+code+"]";
        }
}


function newsurl(ext, extu, code) {

        uri = window.prompt(ext,'http://');
        if(uri != "" && uri != null) {
                link = window.prompt(extu,'');
                if(link != "" && link != null) {
        document.news.newstext.value = document.news.newstext.value + "["+code+"="+uri+"]"+link+"[/"+code+"]";
                }
        }
}

function newsmail(ext, extu, code) {

        uri = window.prompt(ext,'');
        if(uri != "" && uri != null) {
                link = window.prompt(extu,'');
                if(link != "" && link != null) {
        document.news.newstext.value = document.news.newstext.value + "["+code+"="+uri+"]"+link+"[/"+code+"]";
                }
        }
}

//Kommentar/Gästebucheintrag
function kogbbr(bruch){
        document.gbeintrag.kommentar.value=document.gbeintrag.kommentar.value + bruch
}

function kogbbbt(ext, code) {

        uset = window.prompt(ext,'');
        if(uset != "" && uset != null) {
                document.gbeintrag.kommentar.value = document.gbeintrag.kommentar.value + "["+code+"]"+uset+"[/"+code+"]";
        }
}


function kogburl(ext, extu, code) {

        uri = window.prompt(ext,'http://');
        if(uri != "" && uri != null) {
                link = window.prompt(extu,'');
                if(link != "" && link != null) {
        document.gbeintrag.kommentar.value = document.gbeintrag.kommentar.value + "["+code+"="+uri+"]"+link+"[/"+code+"]";
                }
        }
}

function kogbmail(ext, extu, code) {

        uri = window.prompt(ext,'');
        if(uri != "" && uri != null) {
                link = window.prompt(extu,'');
                if(link != "" && link != null) {
        document.gbeintrag.kommentar.value = document.gbeintrag.kommentar.value + "["+code+"="+uri+"]"+link+"[/"+code+"]";
                }
        }
}

//klapptext
function klappbr(bruch){
        document.news.klapptext.value=document.news.klapptext.value + bruch
}

function klappbbt(ext, code) {

        uset = window.prompt(ext,'');
        if(uset != "" && uset != null) {
                document.news.klapptext.value = document.news.klapptext.value + "["+code+"]"+uset+"[/"+code+"]";
        }
}


function klappurl(ext, extu, code) {

        uri = window.prompt(ext,'http://');
        if(uri != "" && uri != null) {
                link = window.prompt(extu,'');
                if(link != "" && link != null) {
        document.news.klapptext.value = document.news.klapptext.value + "["+code+"="+uri+"]"+link+"[/"+code+"]";
                }
        }
}

function klappmail(ext, extu, code) {

        uri = window.prompt(ext,'');
        if(uri != "" && uri != null) {
                link = window.prompt(extu,'');
                if(link != "" && link != null) {
        document.news.klapptext.value = document.news.klapptext.value + "["+code+"="+uri+"]"+link+"[/"+code+"]";
                }
        }
}

//+ und -
function expand(contentspanid, buttonid){

        if (document.getElementById(contentspanid).style.display == 'none') <!-- Wenn momentan der Content ausgeblendet ist ... -->
             {
         document.getElementById(contentspanid).style.display = ''; <!-- ... den Content einblenden ... -->
         document.getElementById(buttonid).src = 'gfx/minus.gif'; <!-- ... und das das Collapse Symbol anzeigen. -->
        }
        else if (document.getElementById(contentspanid).style.display == '') <!-- Wenn der Content momentan eingeblendet ist ... -->
        {
         document.getElementById(contentspanid).style.display = 'none'; <!-- den Content ausblenden ... -->
         document.getElementById(buttonid).src = 'gfx/plus.gif'; <!-- ... und das Expand Symbol anzeigen. -->
        }
}

function grossesbild(bildurl,b,h)
{
var eigenschaften,sbreite,shoehe,fenster,b,h;

// stellt die Bildschirmabmessungen fest
// find window size
var ns6 = (!document.all && document.getElementById);
var ie4 = (document.all);
var ns4 = (document.layers);

if(ns6||ns4) {
sbreite = innerWidth;
shoehe = innerHeight;
}
else if(ie4) {
sbreite = document.body.clientWidth;
shoehe = document.body.clientHeight;
}

x = (sbreite-b)/2;
y = (shoehe-h)/2;

eigenschaften="left="+x+",top="+y+",screenX="+x+",screenY="+y+",width="+b+",height="+h+",menubar=no,toolbar=no,statusbar=0";

fenster=window.open(bildurl,"",eigenschaften);
}
