/**
 * @projectDescription blog首页创建项目框架.
 */
var box = {
	itemId:0,
	htmlId:"",
	lists:8,
	itemName:"",
	itemRow:0,
	itemCell:0,
	isUsers:0,
	itemType:0,
	dataUrl:"",
	init:function(){
		this.itemId = arguments[0];
		this.htmlId = arguments[1];
		var tmpLists = arguments[2];
		if(tmpLists > 0)
			this.lists = tmpLists;
		this.itemName = unescape(arguments[3]);
		this.itemRow = arguments[4];
		this.itemCell = arguments[5];
		this.isUsers = arguments[6];
		this.itemType = arguments[7];
		this.dataUrl = arguments[8];

		if(this.itemType == '13'){
			try{
				blogMusic.set();
			}catch(e){}
		}else{
			if(arguments[9]){
				this.rData();
			}else{
				this.create();
			}
		}
	},
	create:function(){
		var main=hFrame.change(parseInt(this.itemRow));
		var boxMain=document.createElement("div");
		boxMain.setAttribute("id",this.htmlId);
		//boxMain.style.position="relative";
		main.appendChild(boxMain);
		var box=document.createElement("div");
		box.className="box";
		boxMain.appendChild(box);

		var clear_div = document.createElement("div");
		clear_div.className = "clear";
		box.appendChild(clear_div);

		var title=document.createElement("div");
		title.className="title";
		title.innerHTML=this.itemName;
		box.appendChild(title);
		var boxControl=document.createElement("div");
		boxControl.setAttribute("id",this.htmlId+"_handleBut");
		boxControl.className="box_control";
		title.appendChild(boxControl);
		var content=document.createElement("div");
		content.setAttribute("id",this.htmlId+"_content");
		content.className="content";
		content.innerHTML="数据加载中...";
		box.appendChild(content);
		this.rData();
	},
	rData:function(){
		var url = webpath+"/space/indexload.do";
		var params = "itemId="+this.itemId+ "&htmlId="+this.htmlId+"&lists="+this.lists+"&users="+this.isUsers+"&type="+this.itemType+"&itemRow="+this.itemRow+"&dataUrl="+this.dataUrl+"&blogStyleType="+blogStyleType+"&r="+Math.random();
                var div = this.htmlId+'_content';
                var dbajax = new Ajax.Updater(div,url,{method: 'post',parameters: params});
	},
	h:function(){
		try{
			var re =arguments[0].responseText;
                        $("box_aboutme_content").innerHTML=re+"";
		}catch(e){alerts(e);}
	}
};
