window.onunload=testopenwins;

ie55=(window.createPopup)?true:false;

var pics=11;

var waittime=4000;

var first=new Image();

first.src="../images/animation/1.jpg"

var pic = new Array(100);

pic[1] = new Image(); pic[1].src=first.src;

var awin=null;

var kwin=null;

var preNav=new Array();

var preNavName=new Array('../images/navecke_ol.gif','../images/navecke_or.gif','../images/navecke_ul.gif','../images/navecke_ur.gif','../images/navecke_left.gif','../images/navecke_right.gif');

for (var i=0;i<preNavName.length;i++){preNav[i]=new Image();preNav[i].src=preNavName[i]}



color=new Array('#ffffff','#009184');

rubriken=new Array('citipost','produkte_preise','zustellgebiet','briefmarken','service','kontakt');

text=new Array(5);

link=new Array(5);

text[0]=Array('News','CITIPOST Hannover','CITIPOST Celle','CITIPOST Braunschweig','CITIPOST Hildesheim','CITIPOST Weserbergland','CITIPOST Lippe','CITIPOST Harz','CITIPOST Göttingen','CITIPOST Nordwest','CITIPOST Bremen','CITIPOST Stade','CITIPOST Osnabrück','CITIPOST Nordhessen');

link[0]=Array('news.htm','hannover.htm','celle.htm','braunschweig.htm','hildesheim.htm','weserbergland.htm','lippe.htm','harz.htm','goettingen.htm','nordwest.htm','bremen.htm','stade.htm','osnabrueck.htm','nordhessen.htm');

text[1]=Array('Ihre Vorteile','Preise Vertragskunden national','Preise Vertragskunden international','Preise Service Points','Preisvergleich');

link[1]=Array('ihre_vorteile.htm','preise.htm','preise_international.htm','preise_service-points.htm','preisvergleich.htm');

text[2]=Array('Zustellgebiet Hannover','Zustellgebiet Celle','Zustellgebiet Braunschweig','Zustellgebiet Hildesheim','Zustellgebiet Weserbergland','Zustellgebiet Lippe','Zustellgebiet Harz','Zustellgebiet Göttingen','Zustellgebiet Nordwest','Zustellgebiet Bremen','Zustellgebiet Stade','Zustellgebiet Osnabrück','Zustellgebiet Nordhessen');

link[2]=Array('hannover.htm','celle.htm','braunschweig.htm','hildesheim.htm','weserbergland.htm','lippe.htm','harz.htm','goettingen.htm','nordwest.htm','bremen.htm','stade.htm','osnabrueck.htm','nordhessen.htm');

text[3]=Array('Philatelie','Shop','Service Points','Briefkästen');

link[3]=Array('philatelie.htm','shop.htm','annahme_verkaufsstellen.htm','briefkaesten.htm');

text[4]=Array('Downloads');

link[4]=Array('downloads.htm');

text[5]=Array('Kontaktdaten','Kontaktformular');

link[5]=Array('kontaktdaten.htm','kontaktformular.htm');

var ldetimer;

var lastMenuNr=-1;

xpos=Array(0,65,162,252,331,386);

xwMenu=Array(47,79,72,61,37,39);



function go(nr,subnr){

lde();

location.href='../'+rubriken[nr]+'/'+link[nr][subnr];

return false;

}



function ak(nr){

if(nr>=6)return false;

clearTimeout(ldetimer);

if (document.getElementById&&lastMenuNr!=nr){

lde();

lastMenuNr=nr;

tbltxt='';

tbltxt=tbltxt+'<tr><td colspan=3><table border=0 cellpadding=0 cellspacing=0><tr><td class=dynmenucol><img src="../images/p.gif" width='+xwMenu[nr]+' height=1></td></tr></table></td></tr>';

tbltxt=tbltxt+'<tr><td width="1%" class=dynmenucol><img src=../images/p.gif width=5 height=5></td><td width="98%" class=dynmenucol><img src=../images/p.gif width=5 height=5></td><td width="1%"><img src=../images/navecke_or.gif width=5 height=5></td></tr>';

for (i=0;i<text[nr].length;i++){tbltxt=tbltxt+'<tr id=t'+i+' onclick="return go('+nr+','+i+')" onmouseover=ovMenu(this) onmouseout=ouMenu(this) class=dynmenu><td><img src=../images/navecke_left.gif width=5 height=15></td><td class=dynmenu nowrap><a class=dynmenu onclick="return scl(this)" href=#>'+text[nr][i]+'</a></td><td><img src=../images/navecke_right.gif width=5 height=15></td></tr>';}

tbltxt=tbltxt+'<tr><td width="1%"><img src=../images/navecke_ul.gif width=5 height=5></td><td width="98%" class=dynmenucol><img src=../images/p.gif width=5 height=5></td><td width="1%"><img src=../images/navecke_ur.gif width=5 height=5></td></tr>';

document.getElementById('menu').innerHTML="<table border=0 cellpadding=0 cellspacing=0 width=10>"+tbltxt+"</table>";

document.getElementById('menu').style.visibility='visible';

document.getElementById('menu').style.left=xpos[nr]+167;

}

}



function lde(){

if (document.getElementById){

//document.getElementById('menu').style.left=-200;

document.getElementById('menu').style.visibility='hidden';

lastMenuNr=-1;

}}



function de(nr){

ldetimer=setTimeout("lde()",500);

}

function scl(el){

if (el.blur)el.blur();

return false;

}

function cl(nr,el){

lde();

altenr=rubrik;

rubrik=nr;

unterrubrik=-1;

de(altenr);

if (el.blur)el.blur();

}

function uf(el){

if (el.blur)el.blur();

}



function ovMenu(el){

if(document.getElementById){el.style.backgroundColor='#D0DCE7';

el.childNodes[1].firstChild.style.color='#D1251B';

}

}

function ouMenu(el){

if(document.getElementById){el.style.backgroundColor='#0059A9';

el.childNodes[1].firstChild.style.color='#FFFFFF';

}

}



function ovBtn(el){

if(document.getElementById)el.style.borderColor='#86B4E3';

}

function ouBtn(el){

if(document.getElementById)el.style.borderColor='#DFE1E3';

}

function clBtn(el){

if(el.blur)el.blur();return true;

}



function ovZeile(el){

if(document.getElementById){el.style.backgroundColor='#ffB4E3';el.style.borderWidth='1px';el.style.borderStyle='solid';el.style.borderColor='#86B4E3';}

}

function ouZeile(el){

if(document.getElementById){el.style.backgroundColor='#FFFFFF';el.style.borderColor='#DFE1E3';}

}



function kundenbereich(el){

if(el.blur)el.blur();

var aw=screen.availWidth;var ah=screen.availHeight;

xw=(aw-500)/2;yw=(ah-300)/2;var kwin=window.open('','kundenbereich','scrollbars=auto,resizable=no,width=500,height=300,left='+xw+',top='+yw);

kwin.focus();

document.forms.kdlogin.submit();

setTimeout("document.forms.kdlogin.kdname.value='';document.forms.kdlogin.kdpass.value='';",5000);

return false;

}



function partnerbereich(el){

if(el.blur)el.blur();

var aw=screen.availWidth;var ah=screen.availHeight;

var ww;

var wh;

if (aw>=800)ww=800;else ww=aw-50;

if (ah>=600)wh=500;else wh=ah-100;

xw=(aw-ww)/2;yw=(ah-wh)/2;var kwin=window.open('','partnerbereich','scrollbars=yes,resizable=yes,width='+ww+',height='+wh+',left='+xw+',top='+yw);

kwin.focus();

document.forms.pnlogin.submit();

setTimeout("document.forms.pnlogin.pnname.value='';document.forms.pnlogin.pnpass.value='';",5000);

return false;

}



function plzCheck(el){

if(el.blur)el.blur();

proof=/^[0-9]{5}$/;

if(!proof.test(document.forms.plzcheck.plz.value)){

alert('Bitte 5-stellige Postleitzahl eingeben!');

document.forms.plzcheck.plz.focus();

return false;

}

var aw=screen.availWidth;var ah=screen.availHeight;

xw=(aw-300)/2;yw=(ah-220)/2;var kwin=window.open('','plzcheck','scrollbars=no,resizable=no,width=300,height=220,left='+xw+',top='+yw);

kwin.focus();

document.forms.plzcheck.submit();

document.forms.plzcheck.plz.value='';

return false;

}



function show(nr)

{

if (pic[nr].complete == false){nr=1}

document.images["bild"].src=pic[nr].src;

if (nr<pics){

pic[nr+1]=new Image();

pic[nr+1].src="../images/animation/"+(nr+1)+".jpg"

stimer=setTimeout("snow("+(nr+1)+")",waittime)}

else{

stimer=setTimeout("snow(1)",waittime)}

}



function snow(nr)

{

if (pic[nr].complete == false)

{stimer=setTimeout("snow("+nr+")",500)}

else

{

if (ie55) document.images.bild.filters[0].apply()

document.images["bild"].src=pic[nr].src;

if (ie55) document.images.bild.filters[0].play()

stimer=setTimeout("show("+nr+")",40+pixeldelay)

}

}



function testopenwins(){if (awin && awin.open && !awin.closed)awin.close()}

function openAw(link,aww,awh){

testopenwins();

aw=screen.availWidth;ah=screen.availHeight;

if (aww==0)ww=aw-200;else ww=aww;

if (awh==0)wh=ah-350;else wh=awh;

xw=(aw-ww)/2;yw=(ah-wh)/2;

awin=window.open(link,'_blank','scrollbars=1,statusbar=0,resizable=1,width='+ww+',height='+wh+',left='+xw+',top='+yw);

return false;

}



function openSw(link,aww,awh){

aw=screen.availWidth;ah=screen.availHeight;

if (aww==0)ww=aw-200;else ww=aww;

if (awh==0)wh=ah-300;else wh=awh;

xw=(aw-ww)/2;yw=(ah-wh)/2;

window.open(link,'citipostshop','scrollbars=1,statusbar=0,resizable=1,width='+ww+',height='+wh+',left='+xw+',top='+yw);

return false;

}



function init(){document.images['n'+rubrik].src='../images/navsel.gif';

pixeldelay=(ie55)? document.images.bild.filters[0].duration*1000 : 0;

stimer=setTimeout("snow(1)",300);

if (typeof(preload)=='function')preload();

}

