var list,limits,kinds;isOpera=navigator.userAgent.toLowerCase().indexOf("opera")>-1;isIE=document.all&&!isOpera;function bodyResize(){var e,g,b,p,k,u;var m,q,c,a,k,f,t,n,v;if(!list){return}document.getElementById("wait").style.display="none";a=document.getElementById("firstdiv");q=document.getElementById("first0");s=q.offsetHeight;for(k=0;k<6;k++){c=document.getElementById("first"+k);if(c){c.style.top=q.offsetTop+"px";c.style.left=getLeft(a)+"px";c.style.width=a.offsetWidth+"px";c.style.display="block";if(s<c.offsetHeight){s=c.offsetHeight}}}a.style.height=s+"px";if(document.getElementById("logos")){document.getElementById("logos").style.display="block";q=document.getElementById("refs");c=document.getElementById("gradleft");a=document.getElementById("gradright");t=document.getElementById("glimg");n=document.getElementById("grimg");v=t.offsetWidth;t.style.height=n.style.height=q.offsetHeight+"px";t.style.width=n.style.width=v+"px";c.style.left=getLeft(q)+"px";a.style.left=(getLeft(q)+q.offsetWidth-n.offsetWidth)+"px"}var s=0;f=0;p=kinds[0];for(k=0;k<list.length;k++){while(k==sizes[f]){f++;p=kinds[f]}id=list[k];e=document.getElementById(id+"1big");g=document.getElementById(id+"small");if(!e||!g){continue}e.style.top=(getTop(g)-8)+"px";e.style.left=getLeft(g)+"px";e.style.position="absolute";img=document.getElementById(id+"1big-img");if(!img.origWidth){img.origWidth=img.offsetWidth-16}if(!img.origHeight){img.origHeight=img.offsetHeight-16}img.src="/pages/"+p+"/"+id+"-big.jpg";if(s<g.offsetHeight+g.offsetTop){s=g.offsetHeight+g.offsetTop}img.style.width=g.offsetWidth+"px";e.origLeft=e.offsetLeft;e=document.getElementById(id+"2big");e.style.top=(getTop(g)-8)+"px";e.style.left=getLeft(g)+"px";e.style.position="absolute";img=document.getElementById(id+"2big-img");if(!img.origWidth){img.origWidth=img.offsetWidth-16}if(!img.origHeight){img.origHeight=img.offsetHeight-16}img.src="/pages/"+p+"/"+id+"-big.jpg";img.style.width=g.offsetWidth+"px";e.origLeft=e.offsetLeft;u=document.getElementById(id+"label");u.style.top=(g.offsetTop+116)+"px";u.style.left=g.offsetLeft+(g.offsetWidth-u.offsetWidth)/2+"px";u.style.left=g.offsetLeft+(g.offsetWidth-u.offsetWidth)/2+"px"}if(window.offscreenBuffering){window.offscreenBuffering=true}for(k=0;k<6;k++){q=document.getElementById("first"+k);if(q&&s<q.offsetHeight){s=q.offsetHeight}}q=document.getElementById("firstdiv");q.style.height=s+"px";for(k=0;k<2;k++){u=document.getElementById("caption"+k);if(u){u.style.position="absolute";u.style.top=(q.offsetHeight-u.offsetHeight)+"px";if(isIE){u.style.left="0px"}}}}function bodyLoad(a,c,b){list=a;sizes=c;kinds=b;document.getElementById("sw").value=screen.width;document.getElementById("sh").value=screen.height;testAjax();bodyResize();initDone=1;switchTab(0);try{var d=document.getElementById("u");if(d&&d.value==""){d.focus()}}catch(d){}}function switchTab(c){var a,b;if(!initDone||currtab==c){return}for(a=0;a<6;a++){b=document.getElementById("nav"+a);if(b){b.className=a==c?"firstsnav":"firstnav";b=document.getElementById("first"+a);b.style.visibility=a==c?"visible":"hidden"}b=document.getElementById("caption"+a);if(b){b.style.visibility=a==c?"visible":"hidden"}}currtab=c;hideAll();if(c>3){updateNews()}}function getTop(b){var a=0;if(b.offsetParent){while(b.offsetParent){a+=b.offsetTop;b=b.offsetParent}}else{if(b.y){a+=b.y}}return a}function getLeft(a){var b=0;if(a.offsetParent){while(a.offsetParent){b+=a.offsetLeft;a=a.offsetParent}}else{if(a.x){b+=a.x}}return b}var XMLHttp=null;var tid;function testAjax(){try{XMLHttp=new ActiveXObject("Msxml2.XMLHTTP")}catch(a){try{XMLHttp=new ActiveXObject("Microsoft.XMLHTTP")}catch(a){}}try{if(XMLHttp==null){XMLHttp=new XMLHttpRequest()}}catch(a){}if(XMLHttp){a=document.getElementById("ajax");if(a){a.value="1"}}}var last="";var name;function updateNews(){if(tid){clearTimeout(tid)}if(currtab<2){return}if(XMLHttp){XMLHttp.open("GET",url,0);XMLHttp.send(null);var s=""+XMLHttp.responseText;if(XMLHttp.status==200&&s!=last){eval("o="+s);last=s;name="even";showNews("afpfra",o.afpfra);showNews("afpeco",o.afpeco);showNews("npeur",o.npeur);showNews("npint",o.npint)}tid=setTimeout("updateNews()",300000)}}function showNews(f,c){var d=document.getElementById(f);if(d){var b="";var a="";for(i=0;i<c.length;i++){b+=a;a='<hr class="home">';if(false&&c[i]["words"]){b+='<a class="first'+name+'" href="wire?pub='+f+"&t="+htmlEscape(c[i]["words"])+'">'+c[i]["title"]+"</a>"}else{b+='<span class="first'+name+'">'+c[i]["title"]+"</span>"}name=name=="even"?"odd":"even"}d.innerHTML=b}}function htmlEscape(a){return a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}var timer=null;var initDone=0;var currdiv=null;var curmove=null;var currtab=-1;var zoomalign;function hideAll(){if(currdiv!=null){document.getElementById(currdiv+"big").style.visibility="hidden";var a=document.getElementById(currdiv+"big-img");a.style.width=a.origWidth+"px";a.style.height=a.origHeight+"px";currdiv=currdiv.substr(0,currdiv.length-1)+(3-currdiv.substr(currdiv.length-1));document.getElementById(currdiv+"big").style.visibility="hidden";var a=document.getElementById(currdiv+"big-img");a.style.width=a.origWidth+"px";a.style.height=a.origHeight+"px";if(timer!=null){window.clearTimeout(timer);timer=null}}}function showBig(h){if(!initDone){return}var f=currdiv;if(currdiv==null||currdiv.substr(0,h.length)!=h){f=null;hideAll();currdiv=h+"2"}var a=document.getElementById(currdiv+"big-img");var b=document.getElementById(currdiv+"big");if(currdiv==h+"1"){currdiv=h+"2"}else{currdiv=h+"1"}var c=document.getElementById(currdiv+"big-img");var d=document.getElementById(currdiv+"big");if(f==null){a.style.width=a.origWidth+"px";a.style.height=a.origHeight+"px";c.style.width=c.origWidth+"px";c.style.height=a.origHeight+"px";b.style.left=b.origLeft-document.body.scrollLeft;d.style.left=d.origLeft-document.body.scrollLeft;b.style.zIndex=2;d.style.zIndex=2;b.style.visibility="hidden";d.style.visibility="hidden";var g=document.getElementById("first0");if(d.origLeft-c.origWidth*1.5<getLeft(g)){zoomalign="r"}else{if(d.origLeft+c.origWidth*2.5>=getLeft(g)+g.offsetWidth){zoomalign="l"}else{zoomalign="c"}}}if(c.offsetHeight-16<c.origHeight*4){if(a.offsetHeight-16<c.origHeight*4){c.style.height=(a.offsetHeight+9)+"px";if(c.offsetHeight-16>c.origHeight*4){c.style.height=c.origHeight*4+"px"}}else{c.style.height=c.origHeight*4+"px"}c.style.width=c.origWidth*(c.offsetHeight-16)/c.origHeight+"px";switch(zoomalign){case"r":d.style.left=(d.origLeft-8)+"px";break;case"l":d.style.left=(d.origLeft+c.origWidth-c.offsetWidth-document.body.scrollLeft+8)+"px";break;default:d.style.left=(d.origLeft+(c.origWidth-c.offsetWidth)/2-document.body.scrollLeft)+"px";break}d.style.zIndex=parseInt(b.style.zIndex)+1;d.style.visibility="visible";b.style.visibility="hidden";if(timer!=null){window.clearTimeout(timer)}timer=window.setTimeout("showBig('"+h+"')",25);curmove="b"}else{if(timer!=null){window.clearTimeout(timer)}timer=null;curmove="s"}}function ifHideBig(c,a){var b=document.getElementById(c+(3-a)+"big");if(document.getElementById(c+a+"big").style.visibility=="visible"&&document.getElementById(c+(3-a)+"big").style.visibility=="hidden"){return hideBig(c)}}function hideBig(f){if(!initDone){return}if(f==""&&currdiv!=null){f=currdiv.substr(0,currdiv.length-1)}var e=currdiv;if(currdiv==null||currdiv.substr(0,f.length)!=f){e=null;if(currdiv!=null){document.getElementById(currdiv+"big").style.visibility="hidden"}currdiv=f+"2"}var a=document.getElementById(currdiv+"big-img");var b=document.getElementById(currdiv+"big");if(currdiv==f+"1"){currdiv=f+"2"}else{currdiv=f+"1"}var c=document.getElementById(currdiv+"big-img");var d=document.getElementById(currdiv+"big");if(c.offsetHeight-16>c.origHeight){if(a.offsetHeight-16>a.origHeight){c.style.height=(a.offsetHeight-33)+"px";if(c.offsetHeight-16<c.origHeight){c.style.height=c.origHeight+"px"}}else{c.style.height=c.origHeight+"px"}c.style.width=c.origWidth*(c.offsetHeight-16)/c.origHeight+"px";switch(zoomalign){case"r":break;case"l":d.style.left=(d.origLeft+c.origWidth-c.offsetWidth-document.body.scrollLeft+8)+"px";break;default:d.style.left=(d.origLeft+(c.origWidth-c.offsetWidth)/2-document.body.scrollLeft)+"px";break}b.style.zIndex=parseInt(d.style.zIndex)+1;d.style.visibility="visible";b.style.visibility="hidden";if(timer!=null){window.clearTimeout(timer)}timer=window.setTimeout("hideBig('"+f+"')",25);curmove="s"}else{d.style.zIndex=2;b.style.zIndex=2;b.style.visibility="hidden";if(timer!=null){window.clearTimeout(timer)}timer=null;curmove=null}}act="";function ajaxLogin(){if(!XMLHttp){testAjax()}if(XMLHttp){act="login";var b="act=login&u="+escape(document.getElementById("u").value)+"&p="+escape(document.getElementById("p").value);if(document.getElementById("ajax").value){b+="&ajax=1"}if(document.getElementById("set").checked){b+="&set=1"}if(document.getElementById("sw").value){b+="&sw="+document.getElementById("sw").value+"&sh="+document.getElementById("sh").value}document.body.style.cursor="wait";document.getElementById("gologin").disabled=true;XMLHttp.open("POST",baseurl+"ajax",false);XMLHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");XMLHttp.setRequestHeader("Content-Length",b.length);XMLHttp.setRequestHeader("Connection","close");XMLHttp.send(b);var c=errmsg;if(XMLHttp.status==200){var a=""+XMLHttp.responseText;if(a.substr(0,2)=="OK"){a=a.substr(2);loggedin=a;document.getElementById("username1").innerHTML=a;document.getElementById("username2").innerHTML=a;document.getElementById("u").value=document.getElementById("p").value="";switchForm(false);document.getElementById("msg").innerHTML="&nbsp;";a=document.getElementById("dest").value;document.body.style.cursor="default";document.getElementById("gologin").disabled=false;if(a){document.location.href="redir?dest="+escape(a)}else{document.getElementById("go").focus()}return false}else{c=a}}document.getElementById("msg").innerHTML=c;document.body.style.cursor="default";document.getElementById("gologin").disabled=false;return false}return true}function ajaxLogout(){if(!XMLHttp){testAjax()}if(XMLHttp){act="logout";var a=errmsg;document.body.style.cursor="wait";XMLHttp.open("GET",baseurl+"ajax?act=logout",false);XMLHttp.send(null);if(XMLHttp.status==200){res=""+XMLHttp.responseText;if(res.substr(0,2)=="OK"){loggedin=false;switchForm(true);document.getElementById("msg").innerHTML="&nbsp;";document.body.style.cursor="default";return false}else{a=res}}document.getElementById("msg").innerHTML=a;document.body.style.cursor="default";return false}return true}function ajaxHasExpired(){if(!loggedin){return true}if(!XMLHttp){testAjax()}if(XMLHttp){XMLHttp.open("GET",baseurl+"ajax?act=expired",false);XMLHttp.send(null);var a=XMLHttp.responseText;if(a.substr(0,2)=="OK"){a=a.substr(2);if(loggedin!=a){if(loggedin!=a){document.getElementById("username1").innerHTML=a;document.getElementById("username2").innerHTML=a;loggedin=a}switchForm(false);var a=document.getElementById("msg");if(a){document.getElementById("msg").innerHTML="&nbsp;"}}return false}else{if(loggedin){loggedin=false;switchForm(true);var a=document.getElementById("msg");if(a){document.getElementById("msg").innerHTML=expiredmsg}}}return true}return true}function switchForm(a){document.getElementById("login").style.display=a?"block":"none";document.getElementById("logout").style.display=a?"none":"block"};
