/* TEXT AN UND AUS *****************************************************/

function togglehidden(ID) {
	if (document.getElementById("text"+ID).style.display == "block")
		{
		document.getElementById("text"+ID).style.display = "none";
		document.images["image"+ID].src = "/i/adunord/grafik/navi/hidden.plus.gif";
		}
	else 
		{
		document.getElementById("text"+ID).style.display = "block";
		document.images["image"+ID].src = "/i/adunord/grafik/navi/hidden.minus.gif";
		}
};

/* HILFETEXTE **********************************************************/

	function gHelp(pThis,pId){
  	 $x_Hide('rollover');
         var ht =  $v('P0_HELP');
         var i = ht.indexOf(pId) + pId.length;
         var hp = ht.slice(i+1, i+500);
         i  = hp.indexOf('#')
         hp = hp.substring(0,i);
         return hp;
        }

/* EURO ****************************************************************/

function euro(numvalue) {
  a = numvalue.toFixed(2);
  if (isNaN(numvalue)) a = "0.00"
  b = a.split(".");
  return b[0]+","+b[1]+" €";
 return a;
}
;

/* EURO ****************************************************************/

function eurooz(numvalue) {
  a = numvalue.toFixed(2);
  if (isNaN(numvalue)) a = "0.00"
  b = a.split(".");
  return b[0]+","+b[1];
 return a;
}
;

/* FUSSZEILE ***********************************************************/

function writefooter() {
        v = $v('P0_SPRACHE');
        
 	document.write('<SPAN CLASS="fusszeile"><P CLASS="fusszeile"> &copy; 1999-2012 ADÜ Nord');

  	switch(v) {
  		case "de":
  			document.write("&nbsp;&nbsp;&nbsp;&nbsp; E-Mail&nbsp;an:&nbsp;");
			econtact("retsiem","Seitenmeister");
  			document.write("&nbsp;&middot;&nbsp;");
			econtact("noitkaderbew","Webredaktion");
  			document.write("&nbsp;&middot;&nbsp;");
			econtact("ofni","Geschäftsstelle");
  			document.write("&nbsp;&middot;&nbsp;");
			econtact("ahcsatan","Vorstand");
  		break;
  		case "en":
  			document.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;E-mail to: ");
			econtact("retsiem","Webmaster");
  			document.write(" &middot; ");
			econtact("noitkaderbew","Web editor");
  			document.write(" &middot; ");
			econtact("ofni","Office");
  			document.write(" &middot; ");
			econtact("ahcsatan","Board of Directors");
  		break;
    	        case "sv":
  			document.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;E-post till: ");
			econtact("retsiem","Webbansvarig");
  			document.write(" &middot; ");
			econtact("noitkaderbew","Webbredaktör");
  			document.write(" &middot; ");
			econtact("ofni","Kansli");
  			document.write(" &middot; ");
			econtact("ahcsatan","Styrelse");
  		break;
  		case "da":
  			document.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;E-mail til: ");
			econtact("retsiem","Webmaster");
  			document.write(" &middot; ");
			econtact("noitkaderbew","Redaktion");
  			document.write(" &middot; ");
			econtact("ofni","Kontor");
  			document.write(" &middot; ");
			econtact("ahcsatan","Hovedbestyrelse");
  		break;
  		case "ru":
  			document.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#1069;-&#1087;&#1086;&#1095;&#1090;&#1072;: ");
			econtact("retsiem","&#1042;&#1077;&#1073;-&#1084;&#1072;&#1089;&#1090;&#1077;&#1088;");
  			document.write(" &middot; ");
			econtact("noitkaderbew","&#1056;&#1077;&#1076;&#1072;&#1082;&#1094;&#1080;&#1103;");
  			document.write(" &middot; ");
			econtact("ofni","&#1054;&#1092;&#1080;&#1089;");
  			document.write(" &middot; ");
			econtact("ahcsatan","&#1055;&#1088;&#1072;&#1074;&#1083;&#1077;&#1085;&#1080;&#1077;");
  		break;
  		case "es":
  			document.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;E-mail: ");
			econtact("retsiem","Administrador del sitio");
  			document.write(" &middot; ");
			econtact("noitkaderbew","Redacción del sitio");
  			document.write(" &middot; ");
			econtact("ofni","Oficina");
  			document.write(" &middot; ");
			econtact("ahcsatan","Comisión directiva");
  		break;
  		case "fr":
  			document.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Courriel: ");
			econtact("retsiem","Administrateur du site");
  			document.write(" &middot; ");
			econtact("noitkaderbew","Rédaction du site");
  			document.write(" &middot; ");
			econtact("ofni","Bureau");
  			document.write(" &middot; ");
			econtact("ahcsatan","Comité de direction");
  		break;
  		case "it":
  			document.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;E-mail: ");
			econtact("retsiem","Amministratore del sito");
  			document.write(" &middot; ");
			econtact("noitkaderbew","Redazione del sito");
  			document.write(" &middot; ");
			econtact("ofni","Ufficio");
  			document.write(" &middot; ");
			econtact("ahcsatan","Consiglio direttivo");
  		break;
  	};
/* 	document.write('</P></SPAN ID="fusszeile"');*/

}
;

/* DON'T UNDERSTAND ANYTHING BEYOND THIS POINT, pd *********************/

function toolTip_enableN(evt,obj,tip, width, color){
    var evt=(evt)?evt:((window.event)?event:null);
    var target_x=evt.pageX?evt.pageX:evt.clientX+getScrollXY()[0];
    var target_y=evt.pageY?evt.pageY:evt.clientY+getScrollXY()[1];
    if(toolTip_init()){
    tt_target = obj;
    tip = '<div class="tooltip">' + tip + '</tip>';
    if(!tip){tip = obj.getAttribute("htmldb:tip");}
    if(gToolTipContent){gToolTipContent.innerHTML=tip;}else{gToolTip.innerHTML=tip;}
    if(!!width){gToolTip.style.width=width+"px";}
    if(!!color){gToolTip.style.backgroundColor=color;}else{gToolTip.style.backgroundColor="lightyellow";}
    gToolTip.style.fontsize="20px";
    gToopTipPointer.style.left = ( 20 + target_x ) +"px";
    gToopTipPointer.style.top  = (15 + target_y ) +"px";   
    gToolTip.style.left = ( 20 + target_x ) +"px";
    gToolTip.style.top  = ( 28 + target_y ) +"px";   
    gToolTip.style.visibility="visible";
    gToolTip.style.zIndex=10000;
    gToopTipPointer.style.zIndex=10001;
    gToopTipPointer.style.visibility="visible";
    try {obj.addEventListener("mouseout",toolTip_disable, false);}
	catch(e){obj.attachEvent('onmouseout',toolTip_disable);}
   }
    return false;
}
;

function pcp(pID) {
url = 'f?p=113:63:' + $v('P0_SESSIONID')+':NAVI:::P0_REGION:'+ pID;
w =open(url,"winLov","border=0,Scrollbars=1,resizable=1,Width=800,Height=700,toolbar=0,location=0,statusbar=0,menubar=0,directories=0,status=0");
if (w.opener == null)
w.opener = self;
w.focus();}
;


function getDetails(p_id,p_kunden_id)
{  
 var l_Return = null; 
  getNotizen(p_id);
  getHistorie (p_kunden_id);
  getReport(p_kunden_id); 
}
;
function getMGdetail(p_id){  
 var l_Return = null; 
 var get = new htmldb_Get( 
   'MD' 
   ,html_GetElement('pFlowId').value
   ,null 
   ,'40' ); 
  get.add('P0_PERSONENID',p_id); 
  get.get();}
;
function pc(page) {
url = 'f?p=113:' + page + ':' + $v('P0_SESSIONID');
w =open(url,"winLov","border=0,Scrollbars=1,resizable=1,Width=1200,Height=700,toolbar=0,location=0,statusbar=0,menubar=0,directories=0,status=0");
if (w.opener == null)
w.opener = self;
w.focus();}
;
function popupURLPDF(url) {
w =open(url,"winLov","border=0,Scrollbars=0,resizable=1,Width=1000,Height=600,toolbar=0,location=0,statusbar=0,menubar=0,directories=0,status=0");

if (w.opener == null)
w.opener = self;
w.focus();}
;
function set_testmod(modus) {
    document.getElementById('P0_TESTMOD').value = modus;
    doSubmit();}
;
function seminar(r) {
    document.getElementById('P0_PAGETOGO').value = 12;
    /* document.getElementById('P0_REGION').value = r; */
    doSubmit("SEMI");}
;
function neuesuew(r) {
    document.getElementById('P0_PAGETOGO').value = 3;
    document.getElementById('P0_REGION').value = r;
    doSubmit();}
;
function arbgr(r) {
    document.getElementById('P0_PAGETOGO').value = 3;
    document.getElementById('P0_REGION').value = r;
    doSubmit();}
;
function sc(r) {
    document.getElementById('P0_PAGETOGO').value = 3;
    document.getElementById('P0_REGION').value = r;
    doSubmit("NAVI");}
;
function IB(r) {
    document.getElementById('P0_PAGETOGO').value = 3;
    document.getElementById('P0_REGION').value = r;
    doSubmit();}
;
function sL(r) {
    document.getElementById('P0_PAGETOGO').value = 1;
    document.getElementById('P0_SPRACHE').value = r;
    doSubmit("NAVI");}
;
function gp(p) {
    document.getElementById('P0_PAGETOGO').value = p;
    document.getElementById('P0_NEWQ').value = 0;
    /*document.getElementById('P18_ID').value = NULL;*/
    /*document.getElementById('P16_ID').value = ''; */
    doSubmit("NAVI");}
;
function set_region(r) {
    document.getElementById('P0_REGION').value = r;
    doSubmit();}
;
function econtact(PARAM,LABEL)
  {
  var p1,p2="",p3,p4,p5;
  for(var i=0;i<PARAM.length;i++) 
    p2=PARAM.charAt(i)+p2;
  p1='<a href="mai';
  p3='">';
  p1+='lto:';
  p2+='@';
  p5='</a>';
  p2+='adue-nord.de';
  p4=LABEL;
  document.write(p1+p2+p3+p4+p5);
  }
;


function eurox(numvalue) {
  a = numvalue.toFixed(2);
  if (isNaN(numvalue)) a = "0.00"
  b = a.split(".");
  return b[0]+","+b[1]+"&nbsp;€";
 return a;
}
;

function toolTip_enableL(evt,obj,tip, width, color){
    var evt=(evt)?evt:((window.event)?event:null);
    var target_x=evt.pageX?evt.pageX:evt.clientX+getScrollXY()[0];
    var target_y=evt.pageY?evt.pageY:evt.clientY+getScrollXY()[1];
    if(toolTip_init()){
    tt_target = obj;
    tip = '<div class="tooltip">' + tip + '</tip>';
    if(!tip){tip = obj.getAttribute("htmldb:tip");}
    if(gToolTipContent){gToolTipContent.innerHTML=tip;}else{gToolTip.innerHTML=tip;}
    if(!!width){gToolTip.style.width=width+"px";}
    if(!!color){gToolTip.style.backgroundColor=color;}else{gToolTip.style.backgroundColor="lightyellow";}
    gToolTip.style.fontsize="20px";
    gToopTipPointer.style.left = ( 200 + target_x ) +"px";
    gToopTipPointer.style.top  = (15 + target_y ) +"px";   
    gToolTip.style.left = ( 200 + target_x ) +"px";
    gToolTip.style.top  = ( 28 + target_y ) +"px";   
    gToolTip.style.visibility="visible";
    gToolTip.style.zIndex=10000;
    gToopTipPointer.style.zIndex=10001;
    gToopTipPointer.style.visibility="visible";
    try {obj.addEventListener("mouseout",toolTip_disable, false);}
	catch(e){obj.attachEvent('onmouseout',toolTip_disable);}
   }
    return false;
}
;


function checkframes() {
	if (parent.location.href == self.location.href) {
    	if (window.location.href.replace) 
	        window.location.replace("http://www.adue-nord.de/frame.html?"+self.location.href);
	    else
	       window.location.href = "http://www.adue-nord.de/frame.html?"+self.location.href;
	}
}
;

function isodate(datestring) 
{
x = new Date(datestring);
var y = x.getFullYear();
var m = x.getMonth() +1; if (m < 10) m = "0" + m;
var d = x.getDate(); if (d < 10) d = "0" + d;
return (y + "-" + m + "-" + d);

}
 
/***********************************************
* Pausing up-down scroller- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

function pausescroller(content, divId, divClass, delay){
this.content=content //message array content
this.tickerid=divId //ID of ticker div to display information
this.delay=delay //Delay between msg change, in miliseconds.
this.mouseoverBol=0 //Boolean to indicate whether mouse is currently over scroller (and pause it if it is)
this.hiddendivpointer=1 //index of message array for hidden div
document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[1]+'</div></div>')
var scrollerinstance=this
if (window.addEventListener) //run onload in DOM2 browsers
window.addEventListener("load", function(){scrollerinstance.initialize()}, false)
else if (window.attachEvent) //run onload in IE5.5+
window.attachEvent("onload", function(){scrollerinstance.initialize()})
else if (document.getElementById) //if legacy DOM browsers, just start scroller after 0.5 sec
setTimeout(function(){scrollerinstance.initialize()}, 500)
}

// -------------------------------------------------------------------
// initialize()- Initialize scroller method.
// -Get div objects, set initial positions, start up down animation
// -------------------------------------------------------------------

pausescroller.prototype.initialize=function(){
this.tickerdiv=document.getElementById(this.tickerid)
this.visiblediv=document.getElementById(this.tickerid+"1")
this.hiddendiv=document.getElementById(this.tickerid+"2")
this.visibledivtop=parseInt(pausescroller.getCSSpadding(this.tickerdiv))
//set width of inner DIVs to outer DIV's width minus padding (padding assumed to be top padding x 2)
this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivtop*2)+"px"
this.getinline(this.visiblediv, this.hiddendiv)
this.hiddendiv.style.visibility="visible"
var scrollerinstance=this
document.getElementById(this.tickerid).onmouseover=function(){scrollerinstance.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){scrollerinstance.mouseoverBol=0}
if (window.attachEvent) //Clean up loose references in IE
window.attachEvent("onunload", function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null})
setTimeout(function(){scrollerinstance.animateup()}, this.delay)
}


// -------------------------------------------------------------------
// animateup()- Move the two inner divs of the scroller up and in sync
// -------------------------------------------------------------------

pausescroller.prototype.animateup=function(){
var scrollerinstance=this
if (parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5)){
this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-5+"px"
this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-5+"px"
setTimeout(function(){scrollerinstance.animateup()}, 50)
}
else{
this.getinline(this.hiddendiv, this.visiblediv)
this.swapdivs()
setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
}
}

// -------------------------------------------------------------------
// swapdivs()- Swap between which is the visible and which is the hidden div
// -------------------------------------------------------------------

pausescroller.prototype.swapdivs=function(){
var tempcontainer=this.visiblediv
this.visiblediv=this.hiddendiv
this.hiddendiv=tempcontainer
}

pausescroller.prototype.getinline=function(div1, div2){
div1.style.top=this.visibledivtop+"px"
div2.style.top=Math.max(div1.parentNode.offsetHeight, div1.offsetHeight)+"px"
}

// -------------------------------------------------------------------
// setmessage()- Populate the hidden div with the next message before it's visible
// -------------------------------------------------------------------

pausescroller.prototype.setmessage=function(){
var scrollerinstance=this
if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
setTimeout(function(){scrollerinstance.setmessage()}, 100)
else{
var i=this.hiddendivpointer
var ceiling=this.content.length
this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1
this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
this.animateup()
}
}

pausescroller.getCSSpadding=function(tickerobj){ //get CSS padding value, if any
if (tickerobj.currentStyle)
return tickerobj.currentStyle["paddingTop"]
else if (window.getComputedStyle) //if DOM2
return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top")
else
return 0
}


/***********************************************
* End Pausing up-down scroller- © Dynamic Drive (www.dynamicdrive.com)
/***********************************************/

