//
function getElementsByClass(searchClass,node,tag) {
    var classElements = new Array();
    if ( node == null )
        node = document;
    if ( tag == null )
        tag = '*';
    var els = node.getElementsByTagName(tag);
    var elsLen = els.length;
    var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
    for (i = 0, j = 0; i < elsLen; i++) {
        if ( pattern.test(els[i].className) ) {
            classElements[j] = els[i];
            j++;
        }
    }
    return classElements;
}

//START select box data/width solution
//v1.00
//note: this script relies upon select box being in its own div
 function ViewSelectBox(xyz){
    if(xyz.className.search("noresize")=='-1')
    //if noresize, or item hasn't been tested by script before
    {    
        var originalWidth = xyz.offsetWidth;
        xyz.parentNode.style.height = xyz.offsetHeight+'px';
        xyz.style.position='absolute';
        xyz.style.width='auto';
        
        if(xyz.offsetWidth < originalWidth)
        //if the select box is smaller than original, resort to original and prevent any further resizing
        {
        xyz.className = xyz.className+" noresize";
        //xyz.style.position='relative'; safari error
        xyz.style.width = originalWidth+"px"; 
        }
        
    }
}

function ReformSelectBox(xyz){
    if(xyz.className.search("noresize")=='-1')
    //if item hasn't been prevented by script beforem make it the original
    {
        xyz.style.position='relative';
        xyz.style.width='300px';
    }
}
//END select box data/width solution