//---------------------------------------------------------
// Copyright (c) 2004 to present by Bronze Inc. All rights reserved.
// 561-368-2203, Box 14303, Gainesville, FL, 32604, US
// www.bronz.com, webmaster@bronz.com
//---------------------------------------------------------
function br_page_Class() {
  this.ahref_style="";
  this.button_after="";
  this.root_ahref="";
  this.button_before="";
  this.images=[];
  this.root_domain="";
  this.root_image="";
  this.Ahref=br_page_Ahref;
  this.Amap=br_page_Amap;
  this.Button=br_page_Button;
  this.ButtonRollover=br_page_ButtonRollover;
  this.Email=br_page_Email;
  this.Form_Checkbox_All=br_page_Form_Checkbox_All;
  this.Href=br_page_Href;
  this.ImageLoad=br_page_ImageLoad;
  this.ImageSet=br_page_ImageSet;
  this.ImageSrc=br_page_ImageSrc;
  this.Pagebottom=br_page_0;
  this.Pagetop=br_page_0;
  }
//---------------------------------------------------------
function br_page_0() {}
//---------------------------------------------------------
function br_page_Ahref(p,asis) {
  p=this.Href(p,asis); p='<' + 'a ' + p; return p;}
//---------------------------------------------------------
function br_page_Amap(c,p,t,a) {a=a || t;
  p=this.Href(p);
  var out=''
    + '<' + 'area shape="rect" coords="' + c + '" ' + p
    + '" title="' + t + '" alt="' + a + '">'
    ;
  return out;}
//---------------------------------------------------------
function br_page_Button(t,p,asis,x) { 
  p=this.Ahref(p,asis); t=p + '>' + t + '<' + '/a>';
  if (this.button_before) t=this.button_before + t;
  if (this.button_after) t+=this.button_after;
  return t;}
//---------------------------------------------------------
function br_page_ButtonRollover(p,asis,i1,i2,w,h,alt) { 
  if (alt) alt=' alt="' + alt + '"'; else alt='';
  if (h) h=' height="' + h + '"'; else h='';
  if (w) w=' width="' + w + '"'; else w='';
  p=this.Ahref(p,asis); 
  p+=' onMouseOut=\'br_page.ImageSet("' + i1 + '")\''
    + ' onMouseOver=\'br_page.ImageSet("' + i1 + '","' + i2 + '")\''
    + '>';
  p+='<img name="' + i1 + '" src="' + this.images[i1].src
    + w + h + alt + '" border="0"></a>';
  if (this.button_before) p=this.button_before + p;
  if (this.button_after) p+=this.button_after;
  return p;}
//---------------------------------------------------------
function br_page_Email(u,d,t) {u+='@' + d; t=t || u;
  var p=''; if (this.ahref_style) p=' class="' + this.ahref_style + '"';
  return '<a href="mailto:' + u + '"' + p + '>' + t + '</a>';}
//---------------------------------------------------------
function br_page_Form_Checkbox_All(formname,name,what) {var x;
  var frm=document.forms[formname]; var ele=frm.elements;
  var n=ele.length;
  for (var i=0; i<n; i++) {x=ele[i]; if (x.name==name) x.checked=what;}
  return false;}
//---------------------------------------------------------
function br_page_Href(p,asis) {asis=asis || "";
  if (asis!="ASIS") {
    var p1="";
    if (this.root_domain) p1+='http://' + this.root_domain;
    p=p1 + this.root_ahref + p;}
  p='href="' + p + '"'
  if (this.ahref_style) p+=' class="' + this.ahref_style + '"';
  return p;}
//---------------------------------------------------------
// name,image,name,image
function br_page_ImageLoad(images) {
  var s=br_page.images.length;
  var a=images.split(','); var n=a.length + s; var i,x,y;
  for (i=s; i<n; i=i+2) {
    x=a[i]; y=a[i+1];
    this.images[x]=new Image();
    this.images[x].src=y;}
  }
//---------------------------------------------------------
// name,image,name,image
function br_page_ImageSet(name,image) {image=image || name;
  document.images[name].src=this.images[image].src;}
//---------------------------------------------------------
function br_page_ImageSrc(v,p) {
  var out=this.root_domain + this.root_image + v;
  if (p=="FILE") return out;
  return '<img src="http://' + out + '"';}
//---------------------------------------------------------
var br_page=new br_page_Class;
//---------------------------------------------------------

