// JavaScript Document
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
   if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
      document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
      else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_preloadImages() { //v3.0
   var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
   var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
   var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function P7_getLDims(el) { //v2.4 by PVII
   var x,ll=0,tl=0,hh=0,ww=0,wx,g,gg;
   if((g=MM_findObj(el))!=null){gg=(document.layers)?g:g.style;ll=parseInt(gg.left);tt=parseInt(gg.top);
   if(isNaN(ll)){if(g.currentStyle){ll=parseInt(g.currentStyle.left);}else if(document.defaultView){
      ll=parseInt(document.defaultView.getComputedStyle(g,"").getPropertyValue("left"));}if(isNaN(ll)){ll=0;}}
      if(isNaN(tt)){if(g.currentStyle){tt=parseInt(g.currentStyle.top);}else if(document.defaultView){
         tt=parseInt(document.defaultView.getComputedStyle(g,"").getPropertyValue("top"));}if(isNaN(ll)){tt=0;}}
         if(document.all||document.getElementById){ww=parseInt(g.offsetWidth);hh=parseInt(g.offsetHeight);
         if(!ww){ww=parseInt(g.style.pixelWidth);if(!ww){ww=parseInt(g.style.width);}}if(!hh){
            hh=parseInt(g.style.pixelHeight);}if(g.hasChildNodes){for(x=0;x<g.childNodes.length;x++){
               wx=parseInt(g.childNodes[x].offsetWidth);if(wx>ww){ww=wx;}}}}else if(document.layers){
                  ww=parseInt(g.clip.width);hh=parseInt(g.clip.height);}}var aR=[ll,tt,hh,ww];return aR;
}

function P7_alignRR() { //v2.4 by PVII
   var i;if(!document.p7alignRR) {return;}if(document.layers){
      if(innerWidth!=document.p7RRiw || innerHeight!=document.p7RRih){location.reload();}
   }else{document.p7RR=1;for(i=0;i<p7aRR.length;i++){eval(p7aRR[i]);}document.p7RR=0;}
}

function P7_alignLL2(){ //v2.4 by PVII
   var g,gg,lp,tp,tW,tH,oV,oH,aL,aT,pa='px',args=P7_alignLL2.arguments;if(document.layers||window.opera){pa='';}
   for(var i=0;i<args.length;i+=5){if((g=MM_findObj(args[i]))!=null){gg=(document.layers)?g:g.style;
   oV=parseInt(args[i+3]);oH=parseInt(args[i+4]);aL = P7_getLDims(args[i]);aT = P7_getLDims(args[i+1]);
   lp=aL[0];tp=aL[1];switch (args[i+2]){case 'A':lp=aT[0]-aL[3]+oH;tp=aT[1]-aL[2]+oV;break;
   case 'B':lp=aT[0]+oH;tp=aT[1]-aL[2]+oV;break;case 'C':lp=aT[0]+aT[3]+oH;tp=aT[1]-aL[2]+oV;break;
   case 'D':lp=aT[0]-aL[3]+oH;tp=aT[1]+oV;break;case 'E':lp=aT[0]+aT[3]+oH;tp=aT[1]+oV;break;
   case 'F':lp=aT[0]-aL[3]+oH;tp=aT[1]+aT[2]+oV;break;case 'G':lp=aT[0]+oH;tp=aT[1]+aT[2]+oV;break;
   case 'H':lp=aT[0]+aT[3]+oH;tp=aT[1]+aT[2]+oV;break;}gg.left=lp+pa;gg.top=tp+pa;
   if(!document.p7alignRR){p7aRR=new Array();document.p7alignRR=true;document.p7RR=0;onresize=P7_alignRR;
   if(document.layers){document.p7RR=0;document.p7RRiw=innerWidth;document.p7RRih=innerHeight;}}if(document.p7RR==0){
      p7aRR[p7aRR.length]="P7_alignLL2('"+args[i]+"','"+args[i+1]+"','"+args[i+2]+"',"+oV+","+oH+")";}}}
}

function P7_autoLayers() { //v1.4 by PVII
   var g,b,k,f,args=P7_autoLayers.arguments;a=parseInt(args[0]);if(isNaN(a))a=0;
   if(!document.p7setc){p7c=new Array();document.p7setc=true;for(var u=0;u<10;u++){
      p7c[u]=new Array();}}for(k=0;k<p7c[a].length;k++){if((g=MM_findObj(p7c[a][k]))!=null){
         b=(document.layers)?g:g.style;b.visibility="hidden";}}for(k=1;k<args.length;k++){
            if((g=MM_findObj(args[k]))!=null){b=(document.layers)?g:g.style;b.visibility="visible";f=false;
            for(var j=0;j<p7c[a].length;j++){if(args[k]==p7c[a][j]) {f=true;}}
            if(!f){p7c[a][p7c[a].length++]=args[k];}}}
}

