
/*************************************************************************************************************
*
* page.js
*
* Seiteninhalte und Vorlagen für www.kappenberg.com/hosted/jufo
* (C) 2007 by EconNSoft - D. Schulte-Scherlebeck - Alle Rechte vorbehalten!
*
*************************************************************************************************************/

function hLoadImage( pImage )
{
        var vImg = new Image();
        vImg.src = pImage;
        return(vImg);
};

var vButtonID=0;

//*** Cache button images ***
var vButtonPicNormalPre = hLoadImage("gui/buttons/normal_pre.gif");
var vButtonPicHoverPre = hLoadImage("gui/buttons/hover_pre.gif");
var vButtonPicDownPre = hLoadImage("gui/buttons/down_pre.gif");
var vButtonPicNormalMid = hLoadImage("gui/buttons/normal_mid.gif");
var vButtonPicHoverMid = hLoadImage("gui/buttons/hover_mid.gif");
var vButtonPicDownMid = hLoadImage("gui/buttons/down_mid.gif");
var vButtonPicNormalPost = hLoadImage("gui/buttons/normal_post.gif");
var vButtonPicHoverPost = hLoadImage("gui/buttons/hover_post.gif");
var vButtonPicDownPost = hLoadImage("gui/buttons/down_post.gif");

function hButtonOver(pID) {
        document.getElementById("but_Pre"+pID).src = vButtonPicHoverPre.src;
        document.getElementById("but_Mid"+pID).style.backgroundImage = "url("+vButtonPicHoverMid.src+")";
        document.getElementById("but_Mid"+pID).style.color = "#ffffff";
        document.getElementById("but_Post"+pID).src = vButtonPicHoverPost.src;
};

function hButtonDown(pID) {
        document.getElementById("but_Pre"+pID).src = vButtonPicDownPre.src;
        document.getElementById("but_Mid"+pID).style.backgroundImage = "url("+vButtonPicDownMid.src+")";
        document.getElementById("but_Mid"+pID).style.color = "#cccccc";
        document.getElementById("but_Post"+pID).src = vButtonPicDownPost.src;
};

function hButtonNormal(pID) {
        document.getElementById("but_Pre"+pID).src = vButtonPicNormalPre.src;
        document.getElementById("but_Mid"+pID).style.backgroundImage = "url("+vButtonPicNormalMid.src+")";
        document.getElementById("but_Mid"+pID).style.color = "#000000";
        document.getElementById("but_Post"+pID).src = vButtonPicNormalPost.src;
};

function hButtonOut(pID) {
};

function hButtonStart(pHRef,pWidth,pAlign)
{
        if ( typeof(pWidth)=="undefined" ) pWidth="";
        if ( typeof(pAlign)=="undefined" ) pAlign="center";
        if ( pHRef.indexOf("www.")==0 ) pHRef="location.href='http://"+pHRef+"';"
        if ( pHRef.indexOf("http://")==0 ) pHRef="location.href='"+pHRef+"';"
        vButtonID++;
        document.write("<div class='button' "+
                        "onmouseout='hButtonNormal("+vButtonID+");' "+
                        "onmousedown='hButtonDown("+vButtonID+");' "+
                        "onmouseup='hButtonOver("+vButtonID+");' "+
                        "onmouseover='hButtonOver("+vButtonID+");' "+
                        "onclick=\""+pHRef+"\" "+
                        ">");
        if ( pWidth!= "" ) pWidth = "width="+pWidth+" ";
        document.write("<table border=0 style='display:inline;' cellpadding=0  cellspacing=0>");
        document.write("<tr><td width='4px'><img id='but_Pre"+vButtonID+"' src='gui/buttons/normal_pre.gif' width=4 height=22></td>");
        document.write("<td align="+pAlign+" id='but_Mid"+vButtonID+"'  background='gui/buttons/normal_mid.gif'>");
        if ( pWidth!="" ) document.write("<img src='gui/empty.gif' border=0 "+pWidth+" height=1><br>");
};
function hButtonEnd() {
        document.write("</td>");
        document.write("<td width='4px'; ><img id='but_Post"+vButtonID+"'  src='gui/buttons/normal_post.gif' width=4 height=22></td></tr>");
        document.write("</table></div>");
}

function hButton(pText,pHRef,pWidth,pAlign) {
        hButtonStart(pHRef,pWidth,pAlign);
        document.write(pText);
        hButtonEnd();
};




var vButtonLargePicNormalPre = hLoadImage("gui/buttons/large/normal_pre.gif");
var vButtonLargePicHoverPre = hLoadImage("gui/buttons/large/hover_pre.gif");
var vButtonLargePicDownPre = hLoadImage("gui/buttons/large/down_pre.gif");
var vButtonLargePicNormalMid = hLoadImage("gui/buttons/large/normal_mid.gif");
var vButtonLargePicHoverMid = hLoadImage("gui/buttons/large/hover_mid.gif");
var vButtonLargePicDownMid = hLoadImage("gui/buttons/large/down_mid.gif");
var vButtonLargePicNormalPost = hLoadImage("gui/buttons/large/normal_post.gif");
var vButtonLargePicHoverPost = hLoadImage("gui/buttons/large/hover_post.gif");
var vButtonLargePicDownPost = hLoadImage("gui/buttons/large/down_post.gif");

function hButtonLargeOver(pID) {
        document.getElementById("but_Pre"+pID).src = vButtonLargePicHoverPre.src;
        document.getElementById("but_Mid"+pID).style.backgroundImage = "url("+vButtonLargePicHoverMid.src+")";
        document.getElementById("but_Mid"+pID).style.color = "#ffffff";
        document.getElementById("but_Post"+pID).src = vButtonLargePicHoverPost.src;
};

function hButtonLargeDown(pID) {
        document.getElementById("but_Pre"+pID).src = vButtonLargePicDownPre.src;
        document.getElementById("but_Mid"+pID).style.backgroundImage = "url("+vButtonLargePicDownMid.src+")";
        document.getElementById("but_Mid"+pID).style.color = "#cccccc";
        document.getElementById("but_Post"+pID).src = vButtonLargePicDownPost.src;
};

function hButtonLargeNormal(pID) {
        document.getElementById("but_Pre"+pID).src = vButtonLargePicNormalPre.src;
        document.getElementById("but_Mid"+pID).style.backgroundImage = "url("+vButtonLargePicNormalMid.src+")";
        document.getElementById("but_Mid"+pID).style.color = "#000000";
        document.getElementById("but_Post"+pID).src = vButtonLargePicNormalPost.src;
};

function hButtonLargeOut(pID) {
};

function hButtonLargeStart(pHRef,pWidth,pAlign)
{
        if ( typeof(pWidth)=="undefined" ) pWidth="";
        if ( typeof(pAlign)=="undefined" ) pAlign="center";
        if ( pHRef.indexOf("www.")==0 ) pHRef="location.href='http://"+pHRef+"';"
        if ( pHRef.indexOf("http://")==0 ) pHRef="location.href='"+pHRef+"';"
        vButtonID++;
        document.write("<div class='button' "+
                        "onmouseout='hButtonLargeNormal("+vButtonID+");' "+
                        "onmousedown='hButtonLargeDown("+vButtonID+");' "+
                        "onmouseup='hButtonLargeOver("+vButtonID+");' "+
                        "onmouseover='hButtonLargeOver("+vButtonID+");' "+
                        "onclick=\""+pHRef+"\" "+
                        ">");
        if ( pWidth!= "" ) pWidth="width="+pWidth+"px; ";
        document.write("<table style='display:inline;' cellpadding=0  cellspacing=0>");
        document.write("<tr><td width='8px'><img id='but_Pre"+vButtonID+"' src='gui/buttons/large/normal_pre.gif' width=8 height=44></td>");
        document.write("<td align="+pAlign+" id='but_Mid"+vButtonID+"'  background='gui/buttons/large/normal_mid.gif'>");
        if ( pWidth!="" ) document.write("<img src='gui/empty.gif' border=0 "+pWidth+" height=1><br>");
};
function hButtonLargeEnd() {
        document.write("</td>");
        document.write("<td width='8px'; ><img id='but_Post"+vButtonID+"'  src='gui/buttons/large/normal_post.gif' width=8 height=44></td></tr>");
        document.write("</table></div>");
}

function hButtonLarge(pText,pHRef,pWidth,pAlign) {
        hButtonLargeStart(pHRef,pWidth,pAlign);
        document.write(pText);
        hButtonLargeEnd();
};


//*****************************

function hTitleStart()
{
        document.write("<div class='title' align=center><table border=0 cellpadding=0 cellspacing=0 width=700><tr><td class='chamber'>");
};

function hTitleEStart()
{
        document.write("<div class='titleehr' align=center><table border=0 cellpadding=0 cellspacing=0 width=950><tr><td class='chamber'>");
};

function hTitleESep()
{
        document.write("</td><td width='2px' background='gui/caption/page_sep.gif'></td><td class='chamber'>");
};

function hTitleSep()
{
        document.write("</td><td width='2px' background='gui/caption/page_sep.gif'></td><td class='chamber'>");
};

function hTitleEnd() {
        document.write("</td></tr></table></div>");
}

//*****************************

function hCaption(pText,pWidth)
{
        if ( typeof(pWidth)=="undefined" ) pWidth=726;
        document.write("<div class='caption'>");
        document.write("<table cellpadding=0 cellspacing=0 width="+pWidth+"><tr>");
        document.write("<td width=8><img src='gui/caption/caption_pre.gif' height=54 width=8></td>");
        document.write("<td background='gui/caption/captionbig_mid.gif'>"+pText+" </td>");
        document.write("<td width=8><img src='gui/caption/caption_post.gif' height= 54 width=8></td>");
        document.write("</tr></table>");
        document.write("</div>");
};

//*****************************
function hCaptionBig(pText,pWidth)
{	
	var vSize=25;
	
	if ( pText.length > 40 ) vSize=20;
	if ( pText.length > 50 ) vSize=16;
	if ( pText.length > 100 ) vSize=14;
	
        if ( typeof(pWidth)=="undefined" ) pWidth=726;
        document.write("<div class='captionbig'>");
        document.write("<table cellpadding=0 cellspacing=0 width="+pWidth+"><tr>");
        document.write("<td width=8><img src='gui/caption/captionbig_pre.gif' height=54 width=8></td>");
        document.write("<td background='gui/caption/captionbig_mid.gif' style='font-size:"+vSize+"pt'>"+pText+"</td>");
        document.write("<td width=8><img src='gui/caption/caption_post.gif' height= 54 width=8></td>");
        document.write("</tr></table>");
        document.write("</div>");
};

function hCaptionHuge(pText,pWidth)
{	
	var vSize=25;
	
	
        if ( typeof(pWidth)=="undefined" ) pWidth=726;
        document.write("<div class='captionbig'>");
        document.write("<table cellpadding=0 border=0 cellspacing=0 width="+pWidth+"><tr>");
        document.write("<td background='gui/caption/captionvario_tl.gif' valign=bottom width=6><img src='gui/caption/captionvario_bl.gif' height=6 width=6></td>");
        document.write("<td background='gui/caption/captionvario_mid.gif' style='font-size:"+vSize+"pt'>"+pText+"</td>");
        document.write("<td background='gui/caption/captionvario_tr.gif' valign=bottom width=6><img src='gui/caption/captionvario_br.gif' height= 6 width=6></td>");
        document.write("</tr></table>");
        document.write("</div>");
};

//*****************************
function hBorderStart( pWidth, pHeight, pCenter, pID)
{
        if ( typeof(pCenter)=="undefined" ) pCenter=true;
		if ( typeof(pID)=="undefined" ) pID="";
        document.write("<table id='"+pID+"' class='border' border=0 cellpadding=0 cellspacing=0 width="+pWidth+"px height="+pHeight+"px'>");
        document.write("<tr>");
                document.write("<td width=8 height=8><img src='gui/border/border_upleft.gif' width=8 height=8></td>");
                document.write("<td height=8 background='gui/border/border_up.gif'><img src='gui/border/border_up.gif' width=8 height=8></td>");
                 document.write("<td width=8 height=8><img src='gui/border/border_upright.gif' width=8 height=8></td>");
        document.write("</tr>");
        document.write("<tr>");
                document.write("<td width=8 background='gui/border/border_left.gif'><img src='gui/border/border_left.gif' width=8 height=8></td>");
        if ( pCenter ) {
                document.write("<td background='gui/border/border_back.gif' valign=middle align=center>");
        } else {
                document.write("<td background='gui/border/border_back.gif' valign=top>");
        };
}

function hBorderEnd()
{
                document.write("<td width=8 background='gui/border/border_right.gif'><img src='gui/border/border_right.gif' width=8 height=8></td>");
        document.write("</tr>");
        document.write("<tr>");
                document.write("<td width=8 height=8><img src='gui/border/border_downleft.gif' width=8 height=8></td>");
                document.write("<td height=8 background='gui/border/border_down.gif'><img src='gui/border/border_down.gif' width=8 height=8></td>");
                 document.write("<td width=8 height=8><img src='gui/border/border_downright.gif' width=8 height=8></td>");
        document.write("</tr>");
        document.write("</table>");
};
//*****************************
function hTitleJuEhr( pNr, pArb, pJufo,pJahr ) {
    hTitleEStart();
    document.write(pNr);
    hTitleESep();
    document.write("<img src='gui/logos/fg-"+pArb.toLowerCase()+".gif'>");
    hTitleSep();
    document.write("<img src='gui/logos/"+pJufo.toLowerCase()+".gif'>");
    hTitleSep();
    document.write("<img src='gui/logos/muenster_"+pJahr+".gif' width=177 height=44>");
    hTitleEnd();
};
//*****************************
function hTitleJufo( pNr, pArb, pJufo,pJahr ) {

    hTitleStart();
    document.write(pNr);
    hTitleSep();
    document.write("<img src='gui/logos/fg-"+pArb.toLowerCase()+".gif'>");
    hTitleSep();
    document.write("<img src='gui/logos/"+pJufo.toLowerCase()+".gif'>");
    hTitleSep();
    document.write("<img src='gui/logos/muenster_"+pJahr+".gif' width=177 height=44>");
    hTitleEnd();
};

function hSpace(pI)
{
	for (vI=0;vI<pI;vI++) {
		document.write("&nbsp;");
	};
}

function out(pT)
{
    document.write(pT);
};

