
function palette_write_head(win)
{
	win.document.writeln('<body background="" text="#000000" link="#cc2200" alink="#000088" vlink="#000088" bgcolor="#aaffff">');
}

function palette_write_results_top(win, nentries, nresults, types)
{
        win.document.writeln("<table width=100%><TR>");
        win.document.writeln("<TD align=left><font size="+resultfontsize+">");
        win.document.writeln("<a href='bigger font' onClick='return(parent.changefontsize(1))'>Display Results Bigger</A></TD>");
        win.document.writeln("<TD ALIGN=RIGHT><font size="+resultfontsize+">");
        win.document.writeln("<a href='bigger font' onClick='return(parent.changefontsize(-1))'>Display Results Smaller</A></TD>");
        win.document.writeln("</TR></TABLE>");

	win.document.writeln("<font size="+resultfontsize+">");

	if (nresults > 1)
	    win.document.writeln("<p>Details of the "+nresults+" entries");
	else if (nresults==1)
	    win.document.writeln("<p>The only entry");
	else
	    win.document.writeln("<p>There are no entries");

        var ntypes = 0

	win.document.writeln(" in the area you have ");

	if (nresults > 1)
	    win.document.writeln("selected are shown below:</p>");
	else if (nresults==1)
	    win.document.writeln("selected is: </p>");
	else
	    win.document.writeln("selected.");

}

function palette_write_subheading(win, type)
{
	win.document.writeln("<h2><a name='"+type+"'>"+type+"</a></h2>");
}

function palette_write_result(win, id, type, cx, cy, values)
{
    var prettytypes = "";
    
    win.document.writeln("<p><table cellspacing=0 cellpadding=2 border=0 >");
    win.document.writeln("<tr><td  align=left valign=top rowspan=2><img width=32 height=32 src='/images/types/"+type+".gif'></td><th  align=left><font size="+resultfontsize+"><a href=''  onMouseOver='parent.palette_highlight_entry(\""+id+"\")' onClick='parent.show_scrap(\""+id+"\");return false;'>"+values["title"]+"</a></font></th></tr>");
    win.document.writeln("<tr><td ><font size="+resultfontsize+">"+values["synopsys"]+"</font></td></tr>");
    win.document.writeln("</table>");

}

function palette_write_results_bottom(win, nentries, nresults)
{
}

function palette_write_foot(win)
{
	win.document.writeln('</body>');
}


function palette_order_function(e1, e2)
{
    return e1["name"]-0 > e2["name"]-0?1:-1;
}


