
//// dummy function fuer href
function nix(){
var dummy = "ja";
}
////markierung entfernen
function deblur(derlink) {if(document.all || document.getElementById) {derlink.blur();}}

////vars global
var Tup;
var Tdown;
var pos=0;
var Wmax;
var Hmax;
var Tmax;

////check scrolling
function needscroll() {

// *added for general design - called onload + onresize
// fix IEmac bottom-property
if (document.all && navigator.platform.substr(0,3)=='Mac') {
// get screen size
bildschirmhoeheIE = document.body.offsetHeight;
// fix body property
document.body.style.overflow = "hidden";
// fix divs
document.all.box.style.height = bildschirmhoeheIE +"px";
document.all.left.style.height = bildschirmhoeheIE -35 - 82 +"px";   // -top -bottom
document.all.right.style.height = bildschirmhoeheIE -35 - 82 +"px";   // -top -bottom
document.all.textbox.style.height = bildschirmhoeheIE -71 - 30 +"px";   // -top -bottom
document.all.textbox.style.overflow = "scroll";
document.all.footer.style.height = bildschirmhoeheIE -40 - 5 +"px";   // -height -bottom
}
// fin fix IEmac

//IE
if (document.all) {
// hoehe ansichtsfeld
var WTmax = parseInt(document.all.textbox.style.height);
//debug for opera + ie7
if (isNaN(WTmax)) {
WTmax = parseInt(document.all.textbox.offsetHeight);
}

//debug
//alert("document.all::: "+"hoehe ansichtsfeld: "+WTmax+"  - hoehe inhaltsfeld: "+HTmax);

// hoehe inhaltsfeld
var HTmax = parseInt(document.all.inhalt.scrollHeight);
// pfeil anzeige
if (HTmax > WTmax) {document.all.metascroll.style.display = "block";}
else {document.all.metascroll.style.display = "none";}
// text neu pos
if (WTmax > Wmax) {
// um wieviel groesser
var diff = WTmax - Wmax;
Wmax = WTmax;
// check ob text nicht zu weit nach unten rutscht
if ((pos + diff) <= 0) {pos = pos + diff;
document.all.inhalt.style.top = pos;
} else {pos = 0; document.all.inhalt.style.top = pos;}
}
}
//DOM
else if (document.getElementById){
// hoehe ansichtsfeld
var WTmax = parseInt(document.getElementById("textbox").offsetHeight);
// hoehe inhaltsfeld
var HTmax = parseInt(document.getElementById("inhalt").offsetHeight);

//debug
//alert("document.getElementById::: "+"hoehe ansichtsfeld: "+WTmax+"  - hoehe inhaltsfeld: "+HTmax);

// pfeil anzeige
if (HTmax > WTmax) {document.getElementById("metascroll").style.display = "block";}
else {document.getElementById("metascroll").style.display = "none";}
// text neu pos
if (WTmax > Wmax) {
// um wieviel groesser
var diff = WTmax - Wmax;
Wmax = WTmax;
// check ob text nicht zu weit nach unten rutscht
if ((pos + diff) <= 0) {pos = pos + diff;
document.getElementById("inhalt").style.top = pos + "px";
} else {pos = 0; document.getElementById("inhalt").style.top = pos + "px";}
}
}

}

////klik up
function up() {
//IE
if (document.all) {
// max top-pos fuer inhaltsfeld
Tmax = 0;
// inhaltsfeld verschieben, wenn noch nicht unten
pos = pos+10;
if (pos <= Tmax) {
document.all.inhalt.style.top = pos;
// timer setzten
Tup = setTimeout("up()",50);
} else {pos = 0; document.all.inhalt.style.top = pos;}
}
//DOM
else if (document.getElementById){
// max top-pos fuer inhaltsfeld
Tmax = 0;
// inhaltsfeld verschieben, wenn noch nicht unten
pos = pos+10;
if (pos <= Tmax) {
document.getElementById("inhalt").style.top = pos + "px";
// timer setzten
Tup = setTimeout("up()",50);
} else {pos = 0; document.getElementById("inhalt").style.top = pos + "px";}
}

}
////clear up
function clearup() {
clearTimeout(Tup);
}

////klik down
function down() {
//IE
if (document.all) {
// hoehe ansichtsfeld
Wmax = parseInt(document.all.textbox.style.height);
//debug for opera + ie7
if (isNaN(Wmax)) {
Wmax = parseInt(document.all.textbox.offsetHeight);
}
// hoehe inhaltsfeld
Hmax = parseInt(document.all.inhalt.scrollHeight);
// max top-pos fuer inhaltsfeld
Tmax = Wmax - Hmax;
// inhaltsfeld verschieben, wenn noch nicht unten
pos = pos-10;
if (pos >= Tmax) {
document.all.inhalt.style.top = pos;
// timer setzten
Tdown = setTimeout("down()",50);
}
}
//DOM
else if (document.getElementById){
// hoehe ansichtsfeld
Wmax = parseInt(document.getElementById("textbox").offsetHeight);
// hoehe inhaltsfeld
Hmax = parseInt(document.getElementById("inhalt").offsetHeight);
// max top-pos fuer inhaltsfeld
Tmax = Wmax - Hmax;
// inhaltsfeld verschieben, wenn noch nicht unten
pos = pos-10;
if (pos >= Tmax) {
document.getElementById("inhalt").style.top = pos + "px";
// timer setzten
Tdown = setTimeout("down()",50);
}
}

}

////clear down
function cleardown() {
clearTimeout(Tdown);
}
////klik top
function top() {
pos=0;
document.getElementById("inhalt").style.top = pos;
}

////img swapper

function rollIn() {

}
function rollOut() {

}
