function MM_findObj(n, d) { //v4.01
 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);
 if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function P7_setNV(){ //v1.2 by PVII
 //set the image over and down name convention
 document.p7NavOver="_over";
 document.p7NavDown="_down";
 var i,k=-1,g,x,gg,tl,ti,tm,tt,tu,args=P7_setNV.arguments,dt=false;
 if(document.getElementsByTagName){dt=true;}if(document.P7NavBar){return;}
 P7NavProp=new Array();for(i=0;i<args.length;i++){P7NavProp[i]=args[i];}
 P7NavIM=new Array();if(dt){tm=document.getElementsByTagName("IMG");
 }else{tm=document.images;}tm=document.images;tt=new Array();tt=tt.concat(tm);
 if(document.layers){for(i=0;i<document.layers.length;i++){
 ti=document.layers[i].document.images;if(ti){tt=tt.concat(ti);}
 for(x=0;x<document.layers[i].document.layers.length;x++){
 ti=document.layers[i].document.layers[x].document.images;if(ti){tt=tt.concat(ti);
 }}}tm=tt;}for(i=0;i<tm.length;i++){tl=tm[i].name;if(dt&&!tl){tl=tm[i].id;}
 if(tl&&tl.indexOf("p7NVim")==0){k++;P7NavIM[k]=tl;}}document.P7_NVswapd=new Array();
 document.P7_NVswapo=new Array();for(i=0;i<P7NavIM.length;i++){g=MM_findObj(P7NavIM[i]);
 gg=g.src;g.p7NVim=g.src;tu=gg.lastIndexOf(".");
 g.p7NVimo=gg.substring(0,tu)+document.p7NavOver+gg.substring(tu,gg.length);
 g.p7NVimd=gg.substring(0,tu)+document.p7NavDown+gg.substring(tu,gg.length);
 if(P7NavProp[1]>1){document.P7_NVswapo[i]=new Image();document.P7_NVswapo[i].src=g.p7NVimo;}
 if(P7NavProp[1]>0){if(P7NavProp[1]==3){g.p7NVimd=g.p7NVimo;}
 document.P7_NVswapd[i]=new Image();document.P7_NVswapd[i].src=g.p7TBimd;}}
 document.P7NavBar=true;
}

function P7_trigNV(bu){ //v1.2 by PVII
 if(!document.P7NavBar){return;}var i,d,dB=-1,tF=false,sF=false;
 for(i=0;i<P7NavIM.length;i++){d=MM_findObj(P7NavIM[i]);
 if(P7NavIM[i]==P7NavProp[0]){dB=i;}if(P7NavIM[i]==bu){tF=true;
 if(P7NavProp[1]>0){if(i==dB){d.src=d.p7NVimd;}else if (P7NavProp[1]>1){
 d.src=d.p7NVimo;}}}else{if(P7NavProp[1]>0){d.src=d.p7NVim;}}}
 if(!tF){if(dB>-1){d=MM_findObj(P7NavIM[dB]);if(P7NavProp[1]>0){d.src=d.p7NVimd;}}}
}

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_findObj(n, d) { //v4.01
  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);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function setPointer(theRow, thePointerColor) { 
if (thePointerColor == '' || typeof(theRow.style) == 'undefined') { return false; } 
if (typeof(document.getElementsByTagName) != 'undefined') { var theCells = theRow.getElementsByTagName('td'); }
else if (typeof(theRow.cells) != 'undefined') { var theCells = theRow.cells; } 
else { return false; } var rowCellsCnt = theCells.length; for (var c = 0; c < rowCellsCnt; c++) 
{ theCells[c].style.backgroundColor = thePointerColor; } return true; 
} 

function printWindow() {
bV = parseInt(navigator.appVersion);
if (bV >= 4) window.print();
}
