/**
 *@class Category
 *@extends Div
 */


var Category = Class.create();


Category.prototype = Object.extend(new Div, {


	/**
	 *@constructor initialize
	 */
	initialize: function (id,parentObj,no) {
		this.id=id;
		this.parentObj=parentObj;
		this.no=no;


		this.createDiv();
		Element.addClassName($(this.id), "category"+categoryAll.category_id[this.no]);
		this.setStyle();
		//this.display();
	},



	/**
	 *display
	 */
	display: function () {
		var html=this.id;
		$(this.id).innerHTML=html;
	},



	/**
	 *setStyle
	 */
	setStyle: function () {
		var mL,mR,mT,mB;


		if(this.no==categoryAll.categoryNum-1){
			mL='0px';
			mR='0px';
			mT='0px';
			mB='0px';
		}else{
			mL='0px';
			mR='20px';
			mT='0px';
			mB='0px';
		}


		Element.setStyle($(this.id),{
			//backgroundColor	:'#eeeeee',


			marginLeft		:mL,
			marginRight		:mR,
			marginTop		:mT,
			marginBottom	:mB,


			paddingLeft		:'0px',
			paddingRight	:'0px',
			paddingTop		:'0px',
			paddingBottom	:'0px',


			position		:'relative',	//配置方式:static(default),relative,absolute,fixed,inherit
    		'float'		:'left'
		});
	}





});
