/**
 * @author lance
 */
var allItem=new Array();
function Item(id,title,sum)
{
	this.id=id;
	this.title=title;
	this.sum=sum;
	allItem.push(title);
}
Item.prototype.display=function()
{
	var wd=360;
	
	var itemstr="<table width="+wd+"><tr><td>"+this.title+"</td><td align=right>"+this.sum+"&nbsp;&nbsp;&nbsp;<span class='sp'>Results</spne></td></tr>";
	var panel=Utilities.createElement('div');
	var title=Utilities.createElement('div',{
		className:'item',
		innerHTML:itemstr
	});
	Utilities.appendChild(panel,title);
	panel.style.backgroundColor="#ffffff";
    panel.onmouseover=function()
	{
	    panel.style.backgroundColor="#6666FF";
	}
	panel.index=allItem.length;
	panel.onmouseout=function()
	{
	    panel.style.backgroundColor="#ffffff";
	}
	panel.onclick=function()
	{
		document.getElementById("sbox").value=allItem[this.index-1];
		document.getElementById("rp").innerHTML="";
		allItem=new Array();
		document.getElementById("rf").submit();
	}
	return panel;
}

Item.prototype.toggle=function(id)
{
	return function()
	{
		Accordion.toggle(id);
	}
}



