
// layer show, hide, write routines
var ipanelon=0;
var oldlayer=0;
var ipicture_width="450";
var ipicture_footer="copyright 2002 Gary DeWitt, all rights reserved";

function hidelayer(lay) 
{if(ie4){document.all[lay].style.visibility="hidden";}
 if(ns4){document.layers[lay].visibility="hide";} 
 
 if(ns6){document.getElementById([lay]).style.display="none";}

}
function showlayer(lay) 
{if(ie4){document.all[lay].style.visibility="visible";}
 if(ns4){document.layers[lay].visibility="show";}
 if(ns6){document.getElementById([lay]).style.display="block";}
}


function ipicture(pict,title,desc) 
{ipanelon=1;
 txt="<table width="+ipicture_width+" align=left><tr><td align=center><table width="+ipicture_width+" cellpadding=\"5\" bgcolor=\"#404040\" align=\"center\"><tr><td>";
 if(title!="")txt+="<tr align=center bgcolor=\"#800000\"><td><font color=\"#ffffff\"><b>"+title+"</b></font></td></tr>";
 if(desc!="")txt+="<tr bgcolor=\"#ffffff\"><td><font size=\"-1\" color=\"#000000\">"+desc+"</font></td></tr>";
 txt+="<tr bgcolor=\"#000080\"><td align=center><tt><font color=\"#cccccc\">CLICK PICTURE TO RETURN";
 txt+="</font></tt><br><a href=\"javascript:ipanelon=0;hidelayer('newlayer');if(oldlayer)showlayer('oldlayer');\" ";
 txt+=" onmouseover=\"window.status='iView Interactive Picture Viewer';return true;\">";
 if(pict!="")txt+="<img src=\""+pict+"\" border=\"2\">";
 txt+="</a><br><tt><font color=\"#cccccc\">CLICK PICTURE TO RETURN</font></tt></td></tr><tr><td align=center bgcolor=\"#ffffff\"><font color=\"#000000\" size=\"-2\">"+ipicture_footer+"</font></td></tr></table></td></tr></table>";
 if(ie4){document.all['newlayer'].innerHTML=txt;}
 if(ns4){document['newlayer'].document.write(txt);document['newlayer'].document.close();}
 if(ns6)
 {over=document.getElementById(['newlayer']);range=document.createRange();
  range.setStartBefore(over);domfrag=range.createContextualFragment(txt);
  while(over.hasChildNodes()){over.removeChild(over.lastChild);}over.appendChild(domfrag);
 }hidelayer('newpanel');
 if(oldlayer)hidelayer('oldlayer');
 showlayer('newlayer'); 
 //
}

function ipanel(txt)
{if(ipanelon)return;
 if(ie4){document.all['newpanel'].innerHTML=txt;}
 if(ns4){document['newpanel'].document.write(txt);document['newpanel'].document.close();}
 if(ns6) 
 {over=document.getElementById(['newpanel']);range=document.createRange();
  range.setStartBefore(over);domfrag=range.createContextualFragment(txt);
  while(over.hasChildNodes()){over.removeChild(over.lastChild);}over.appendChild(domfrag);
 } 
 hidelayer('oldpanel');
 showlayer('newpanel');
}
