




/*This function is meant to be used when you are needing
faux getElementsByName() in IE. IE seems so use the 'id'
attribute instead of 'name' when you use getElementsByName().

tag = This tag name that the 'name' attribute you want to 
      get is attached to. Like if you called getElementsByTagName().
      
name = The value of the 'name' attribute you want.
*/
function getElementsByName_iefix(tag, name) {
	
     var elem = document.getElementsByTagName(tag);
	 var arr = new Array();
     for(i = 0, iarr = 0; i < elem.length; i++) {
          att = elem[i].getAttribute("name");
          if(att == name) {
		  	   arr[iarr] = elem[i];
			   iarr++;
          }
     }
     return arr;
}

/*This function resets the height and width of the background
to that of it's parent element's height and width.

background_id = This is the value of the name attribute you named all your
         backgrounds.
*/
function transparentbgfunction(background_id) {
	 var bodybg = getElementsByName_iefix("div", background_id);
	 for(i = 0; i < bodybg.length; i++) {
         bodybg[i].style.height = bodybg[i].parentNode.clientHeight + "px";
         bodybg[i].style.width  = bodybg[i].parentNode.clientWidth + "px";
    }
}
