//
//  G2.JS - Global JavaScript External file.
//  Author: Noam Arnon (n0am AT hotmail DOT com), © 2001 Noam Arnon.
//  <SCRIPT src="g2.js" type="text/javascript"></SCRIPT>
//

// ------------------ Debug Functions ------------------

function showallprop(obj) { // display properties of an instance or object
// document.write("<BR>All Properties of "+obj.name);
   for (var i in obj) document.write("<BR>Property "+i+" = "+obj[i]);}

function showprop(obj) { // display properties of an instance or object
  for (var i in obj)if(obj[i]!="")document.write("<BR>Property "+i+" = "+obj[i]);}

// ------------------ Applet Header ------------------
function Ap_header(){
  this.code="";
  this.codebase="";
  this.archive="";
  this.width="120";
  this.height="24";
  this.alt="";
  this.align="";    // align="left","right","top","bottom","absbottom",
  this.hspace="";   //       "texttop","baseline","middle","absmiddle"
  this.vspace="";
  this.name="";
  return this}

// ap_h=new Ap_header(); ap_h.code="fphover.class"; 
// ap_h.width="150";     ap_h.height="24";

// ------------------ fphover parameters ------------------

function Fph_params(){
  this.url='';
  this.target="";
  this.effect="";       // Effects: "glow"(default), "reverseGlow", "lightglow",
  this.text="";         //          "bevelOut", "bevelIn", "average", "fill"
  this.color="";        // Default="white"
  this.hoverColor="";   // Default="white"
  this.bgColor="";      // Default="white"
  this.Image="";
  this.hoverImage="";
  this.sound="";
  this.hoverSound="";
  this.textColor="";    // Default="black"
  this.textAlign="";    // TextAlign: "center"(default), "left", "right"
  this.textVAlign="";   // TextVAlign: "middle"(default), "top", "bottom"
  this.font="";         // Default="Dialog"
  this.fontSize="";     // Default="14"
  this.fontStyle="";    // FontStyles: "bold"(default), "italic", "bolditalic"
  return this}

// fph_p=new Fph_params(); fph_p.textColor="#FFFFFF"; 
// fph_p.color="#000080";  fph_p.hovercolor="#0000FF"; 

// ------------------ Button Functions ------------------

function WriteApHead(aphOb) {var s='<applet ';
  for (var p in aphOb) if(aphOb[p]!="") s+=p+'="'+aphOb[p]+'" ';
  s+='>'; document.writeln(s);}

function WriteApPars(appOb) {var s; for(var p in appOb)if(appOb[p]!="")
  {s='<param name="'+p+'" value="'+appOb[p]+'"';
   if(p=="url")s+=' valuetype="ref"'; document.writeln(s+'>');}}

function but(txt,u,t) {fph_p.text=txt; fph_p.url=u;
  fph_p.target=(typeof(t)=="undefined")?"Body":t;
  WriteApHead(ap_h); WriteApPars(fph_p); document.writeln('</applet>');}

// ------------------  ------------------

