// Declare Global Variables

var Prefix        = "nz_";                // Prefix for URL's belonging to this site
var PageName      = Prefix + "pages";     // Name of top-level page
var TopFrameName  = Prefix + "navigate";  // Name of topframe
var LeftFrameName = Prefix + "index";     // Name of leftframe
var BodyFrameName = Prefix + "body";      // Name of bodyframe
var CornerFrameName=Prefix + "corner";    // Name of cornerframe
var URLExtension  = ".htm";               // URL = Name + URLExtension

// Check whether the current page is the top page.
// If not, save the current page temporarily in the name of the top-window
// and load the top-level page.

if (!(top.CurrentPage))               // The top page is a page not belonging to this site
  { top.ReferrerPage = null;
    top.name         = null;
    top.location.replace(PageName + URLExtension);
  }
else 
  if (top.CurrentPage  != PageName)  // The top page belongs to the site but is a subframe
    { top.ReferrerPage  = null;
      top.name          = CurrentPage; 
      top.location.replace(PageName + URLExtension);
    }
  else // the current page is the top page. If there is a previous page, save it.
    if (top.name.indexOf(Prefix) != -1)
      { top.ReferrerPage = top.name;
      }

// Check whether there is a previous page.
// if so load the body frame with it unless it is the corner-, top- or leftframe or the top page.

if (top.ReferrerPage != null             && 
    top.ReferrerPage != CornerFrameName  && 
    top.ReferrerPage != TopFrameName     && 
    top.ReferrerPage != LeftFrameName    &&
    top.ReferrerPage != PageName         &&
    CurrentPage      == BodyFrameName       )
  { window.location.replace(top.ReferrerPage + URLExtension);
    top.ReferrerPage =  null;
    top.name         =  null;
  }

// Show the title of the body-frame as the title of the top-document
if (top.CurrentPage == PageName      &&
    window.name     == BodyFrameName )
  { top.document.title = document.title}

// Show map functionality
function showmap(map)
{ var mapwin = window.open(map,"","height=564,width=406,top=50,left=500,status=no,toolbar=no,directories=no,menubar=no,location=no,resizable=no");
      mapwin.vader = parent;
}

// Some default Dreamweaver functions to allow rollover images.

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_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_findObj(n, d) { //v3.0
var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

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 MM_changeImage() { //v3.0
  var i,j=0,x,a=MM_changeImage.arguments,b=document.MM_sr; 
  for(i=0;i<(a.length-2);i+=3)
  {  x=MM_findObj(a[i]); 
     for(k=0;b&&k<b.length&&(x=b[k])&&x.oSrc;k++)x.oSrc=a[i+2];
  }
}



