
function makeBorder() {
  /* finds all divs within the document */
  
  var divs=document.getElementsByTagName('div');
  var numDivs=divs.length;
  
  /* defines a new array for storing “side” divs */
  var borderDivs= new Array();
  
  /*  looks for “side” divs and stores them in the array */
  for(i=0;i<numDivs;i++) {
    if(/\bborder\b/.test(divs[i].className)) {
      borderDivs[borderDivs.length]=divs[i];
    }
  }
  var numBorderDivs=borderDivs.length;

  /* appends the three divs needed for rounded corners */
  for(i=0;i<numBorderDivs;i++) {
    /* access the bottom-right div (original div) */
    var brdiv=borderDivs[i];

    /* creates top-left div */
    var vertdiv=document.createElement('div');

    /* removes class name attribute from bottom-right div (original div)  */
    brdiv.className=brdiv.className.replace('border','');

/* sets class name “rounded” to top-left div */
    vertdiv.className='border';

    /* swaps bottom-right div (original div) with top-left div */
    brdiv.parentNode.replaceChild(vertdiv,brdiv);
	
		    /* creates vert div inner node */
    horizdiv=document.createElement('div');
	
    /* creates bottom-left div inner node */
    vert2div=document.createElement('div');
	
	/* creates bottom-left div inner node */
    horiz2div=document.createElement('div');
	
	/* creates bottom-left div inner node */
    bldiv=document.createElement('div');
	
	/* creates bottom-left div inner node */
    trdiv=document.createElement('div');
	
	/* creates bottom-left div inner node */
    tldiv=document.createElement('div');
	
    /* appends top-left and top-right inner nodes in the document */
    vertdiv.appendChild(vert2div);
    vert2div.appendChild(horiz2div);
    horiz2div.appendChild(horizdiv);
	horizdiv.appendChild(tldiv);
	tldiv.appendChild(trdiv);
	trdiv.appendChild(bldiv);
	bldiv.appendChild(brdiv);
	/* appends bottom-right div (original div) back in the document */
  }
}

function makeBorder2() {
  /* finds all divs within the document */
  
  var divs=document.getElementsByTagName('div');
  var numDivs=divs.length;
  
  /* defines a new array for storing “side” divs */
  var border2Divs= new Array();
  
  /*  looks for “side” divs and stores them in the array */
  for(i=0;i<numDivs;i++) {
    if(/\bborder2\b/.test(divs[i].className)) {
      border2Divs[border2Divs.length]=divs[i];
    }
  }
  var numBorder2Divs=border2Divs.length;

  /* appends the three divs needed for rounded corners */
  for(i=0;i<numBorder2Divs;i++) {
    /* access the bottom-right div (original div) */
    var brdiv=border2Divs[i];

    /* creates top-left div */
    var vertdiv=document.createElement('div');

    /* removes class name attribute from bottom-right div (original div)  */
    brdiv.className=brdiv.className.replace('border2','');

/* sets class name “rounded” to top-left div */
    vertdiv.className='border2';

    /* swaps bottom-right div (original div) with top-left div */
    brdiv.parentNode.replaceChild(vertdiv,brdiv);
	
		    /* creates vert div inner node */
    horizdiv=document.createElement('div');
	
    /* creates bottom-left div inner node */
    vert2div=document.createElement('div');
	
	/* creates bottom-left div inner node */
    horiz2div=document.createElement('div');
	
	/* creates bottom-left div inner node */
    bldiv=document.createElement('div');
	
	/* creates bottom-left div inner node */
    trdiv=document.createElement('div');
	
	/* creates bottom-left div inner node */
    tldiv=document.createElement('div');
	
    /* appends top-left and top-right inner nodes in the document */
    vertdiv.appendChild(vert2div);
    vert2div.appendChild(horiz2div);
    horiz2div.appendChild(horizdiv);
	horizdiv.appendChild(tldiv);
	tldiv.appendChild(trdiv);
	trdiv.appendChild(bldiv);
	bldiv.appendChild(brdiv);
	/* appends bottom-right div (original div) back in the document */
  }
}

function makeBorder3() {
  /* finds all divs within the document */
  
  var divs=document.getElementsByTagName('div');
  var numDivs=divs.length;
  
  /* defines a new array for storing “side” divs */
  var border3Divs= new Array();
  
  /*  looks for “side” divs and stores them in the array */
  for(i=0;i<numDivs;i++) {
    if(/\bborder3\b/.test(divs[i].className)) {
      border3Divs[border3Divs.length]=divs[i];
    }
  }
  var numBorder3Divs=border3Divs.length;

  /* appends the three divs needed for rounded corners */
  for(i=0;i<numBorder3Divs;i++) {
    /* access the bottom-right div (original div) */
    var brdiv=border3Divs[i];

    /* creates top-left div */
    var vertdiv=document.createElement('div');

    /* removes class name attribute from bottom-right div (original div)  */
    brdiv.className=brdiv.className.replace('border3','');

/* sets class name “rounded” to top-left div */
    vertdiv.className='border3';

    /* swaps bottom-right div (original div) with top-left div */
    brdiv.parentNode.replaceChild(vertdiv,brdiv);
	
		    /* creates vert div inner node */
    horizdiv=document.createElement('div');
	
    /* creates bottom-left div inner node */
    vert2div=document.createElement('div');
	
	/* creates bottom-left div inner node */
    horiz2div=document.createElement('div');
	
	/* creates bottom-left div inner node */
    bldiv=document.createElement('div');
	
	/* creates bottom-left div inner node */
    trdiv=document.createElement('div');
	
	/* creates bottom-left div inner node */
    tldiv=document.createElement('div');
	
    /* appends top-left and top-right inner nodes in the document */
    vertdiv.appendChild(vert2div);
    vert2div.appendChild(horiz2div);
    horiz2div.appendChild(horizdiv);
	horizdiv.appendChild(tldiv);
	tldiv.appendChild(trdiv);
	trdiv.appendChild(bldiv);
	bldiv.appendChild(brdiv);
	/* appends bottom-right div (original div) back in the document */
  }
}


/*************************************************************
 * Window Onload Manager (WOM) v1.0
 * Author: Justin Barlow - www.netlobo.com
 *
 * Description:
 * The WOM library of functions allows you to easily call
 * multiple javascript functions when your page loads.
 *
 * Usage:
 * Add functions to WOM using the womAdd() function. Pass the
 * name of your functions (with or without parameters) into
 * womAdd(). Then call womOn() like this:
 *     womAdd('hideDiv()');
 *     womAdd('changeBg("menuopts","#CCCCCC")');
 *     womOn();
 * WOM will now run when your page loads and run all of the
 * functions you have added using womAdd()
 *************************************************************/

/*************************************************************
 * The womOn() function will set the window.onload function to
 * be womGo() which will run all of your window.onload
 * functions.
 *************************************************************/
function womOn(){
	window.onload = womGo;
}

/*************************************************************
 * The womGo() function loops through the woms array and
 * runs each function in the array.
 *************************************************************/
function womGo(){
	for(var i = 0;i < woms.length;i++)
		eval(woms[i]);
}

/*************************************************************
 * The womAdd() function will add another function to the woms
 * array to be run when the page loads.
 *************************************************************/
function womAdd(func){
	woms[woms.length] = func;
}

/*************************************************************
 * The woms array holds all of the functions you wish to run
 * when the page loads.
 *************************************************************/
var woms = new Array();