function category_view(product) 
{
	var name = product.getAttribute('name').replace(/\_/g, " ");
	var info = product.getAttribute('title');
	var info = info.split('~');

	var description = info[0].replace(/\s\;/g,' ');
	var description = description.split(/\s/).join(" ");
	
	var newimage = info[1];
	var brandimage = getElmById('brandimage');
	
	brandimage.src = newimage;

	category_header_set(name);

	var brandname = getElmById('brandname');
	brandname.childNodes[0].nodeValue = name;

	var branddescription = getElmById('branddescription');
	if (description) {
		branddescription.firstChild.nodeValue = description;
	}
	
	return false;
}


function category_header_set(newcat)
{
	var cathead = getElmById('cathead');
	var curhead = cathead.childNodes[0].nodeValue;
	var brokenstring = curhead.split('>');
	var newstring = brokenstring[0] + ' > ' + newcat;
	cathead.childNodes[0].nodeValue = newstring;
}

function getElmById(aID){
        var rv = null;
        if (document.getElementById) {
                rv = document.getElementById(aID)
        } else {
                rv = document.layers[aID]
        }

        return rv;
}

