function buildLetters(word)
{

if (document.myForm.word.value == "")
{
alert("Please enter a word or name.");

return false;

}


var name = new String(word);

name = name.toLowerCase();
var section = name.length;
var code = "<-- Lil' Fingers Blocks : www.lil-fingers.com -->\r\r<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\r<tr>";
// #
// table structure
// #


var win = window.open("blank.html", "win", "toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1"); // a window object
win.document.open("text/html", "replace");
win.document.write("<HTML><HEAD><TITLE>Lil' Fingers Blocks<\/TITLE>");


win.document.write("<LINK REL=stylesheet HREF=\"../../stylesheet.css\" TYPE=\"text/css\">");

win.document.write("<\/HEAD><BODY BGCOLOR=#66CCFF>");

win.document.write("<TABLE BORDER=0 CELLSPACING=2 CELLPADDING=0 WIDTH=480 align=center>\r<TR>");
win.document.write("\r<TD><script language=\"JavaScript\" SRC=\"../../tribalfusion.js\"><\/script><\/TD>");
win.document.write("\r<TD><A HREF=\"..\/..\/comments\/index-ad.html\" TARGET=\"_top\"><IMG SRC=\"..\/..\/images\/advertising.gif\" WIDTH=10 HEIGHT=60 BORDER=0><\/A><\/TD>\r<\/TR>\r<\/TABLE>\r");
win.document.write("\r<div class=\"topstuff\"><img src=\"../../images/07_left.gif\" width=\"21\" height=\"21\" border=\"0\" alt=\"Storybook Corner\">");
win.document.write("\r<div class=\"contentarea\" align=\"center\">");
win.document.write("<h1>SPELL WITH BLOCKS<\/h1>");
win.document.write("\r<div class='toplinks'><a href='#' onClick='window.close();'>close window<\/a><\/div>");
win.document.write ("<form name=\"myForm\">");
win.document.write ("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\r<tr>");
win.document.write ("");

// #
// loop the length
// #

for (var i=0; i<=section; i++){

if (name.substring(i-1,i) == "a") {win.document.write ("\r<td><img src=\"images/a.gif\" width=\"109\" height=\"108\" border=\"0\"><\/td>"); code = (code + "\r<td><img src=\"a.gif\"><\/td>");}
if (name.substring(i-1,i) == "b") {win.document.write ("\r<td><img src=\"images/b.gif\" width=\"109\" height=\"108\" border=\"0\"><\/td>"); code = (code + "\r<td><img src=\"b.gif\"><\/td>");}
if (name.substring(i-1,i) == "c") {win.document.write ("\r<td><img src=\"images/c.gif\" width=\"109\" height=\"108\" border=\"0\"><\/td>"); code = (code + "\r<td><img src=\"c.gif\"><\/td>");}
if (name.substring(i-1,i) == "d") {win.document.write ("\r<td><img src=\"images/d.gif\" width=\"109\" height=\"108\" border=\"0\"><\/td>"); code = (code + "\r<td><img src=\"d.gif\"><\/td>");}
if (name.substring(i-1,i) == "e") {win.document.write ("\r<td><img src=\"images/e.gif\" width=\"109\" height=\"108\" border=\"0\"><\/td>"); code = (code + "\r<td><img src=\"e.gif\"><\/td>");}
if (name.substring(i-1,i) == "f") {win.document.write ("\r<td><img src=\"images/f.gif\" width=\"109\" height=\"108\" border=\"0\"><\/td>"); code = (code + "\r<td><img src=\"f.gif\"><\/td>");}
if (name.substring(i-1,i) == "g") {win.document.write ("\r<td><img src=\"images/g.gif\" width=\"109\" height=\"108\" border=\"0\"><\/td>"); code = (code + "\r<td><img src=\"g.gif\"><\/td>");}
if (name.substring(i-1,i) == "h") {win.document.write ("\r<td><img src=\"images/h.gif\" width=\"109\" height=\"108\" border=\"0\"><\/td>"); code = (code + "\r<td><img src=\"h.gif\"><\/td>");}
if (name.substring(i-1,i) == "i") {win.document.write ("\r<td><img src=\"images/i.gif\" width=\"109\" height=\"108\" border=\"0\"><\/td>"); code = (code + "\r<td><img src=\"i.gif\"><\/td>");}
if (name.substring(i-1,i) == "j") {win.document.write ("\r<td><img src=\"images/j.gif\" width=\"109\" height=\"108\" border=\"0\"><\/td>"); code = (code + "\r<td><img src=\"j.gif\"><\/td>");}
if (name.substring(i-1,i) == "k") {win.document.write ("\r<td><img src=\"images/k.gif\" width=\"109\" height=\"108\" border=\"0\"><\/td>"); code = (code + "\r<td><img src=\"k.gif\"><\/td>");}
if (name.substring(i-1,i) == "l") {win.document.write ("\r<td><img src=\"images/l.gif\" width=\"109\" height=\"108\" border=\"0\"><\/td>"); code = (code + "\r<td><img src=\"l.gif\"><\/td>");}
if (name.substring(i-1,i) == "m") {win.document.write ("\r<td><img src=\"images/m.gif\" width=\"109\" height=\"108\" border=\"0\"><\/td>"); code = (code + "\r<td><img src=\"m.gif\"><\/td>");}
if (name.substring(i-1,i) == "n") {win.document.write ("\r<td><img src=\"images/n.gif\" width=\"109\" height=\"108\" border=\"0\"><\/td>"); code = (code + "\r<td><img src=\"n.gif\"><\/td>");}
if (name.substring(i-1,i) == "o") {win.document.write ("\r<td><img src=\"images/o.gif\" width=\"109\" height=\"108\" border=\"0\"><\/td>"); code = (code + "\r<td><img src=\"o.gif\"><\/td>");}
if (name.substring(i-1,i) == "p") {win.document.write ("\r<td><img src=\"images/p.gif\" width=\"109\" height=\"108\" border=\"0\"><\/td>"); code = (code + "\r<td><img src=\"p.gif\"><\/td>");}
if (name.substring(i-1,i) == "q") {win.document.write ("\r<td><img src=\"images/q.gif\" width=\"109\" height=\"108\" border=\"0\"><\/td>"); code = (code + "\r<td><img src=\"q.gif\"><\/td>");}
if (name.substring(i-1,i) == "r") {win.document.write ("\r<td><img src=\"images/r.gif\" width=\"109\" height=\"108\" border=\"0\"><\/td>"); code = (code + "\r<td><img src=\"r.gif\"><\/td>");}
if (name.substring(i-1,i) == "s") {win.document.write ("\r<td><img src=\"images/s.gif\" width=\"109\" height=\"108\" border=\"0\"><\/td>"); code = (code + "\r<td><img src=\"s.gif\"><\/td>");}
if (name.substring(i-1,i) == "t") {win.document.write ("\r<td><img src=\"images/t.gif\" width=\"109\" height=\"108\" border=\"0\"><\/td>"); code = (code + "\r<td><img src=\"t.gif\"><\/td>");}
if (name.substring(i-1,i) == "u") {win.document.write ("\r<td><img src=\"images/u.gif\" width=\"109\" height=\"108\" border=\"0\"><\/td>"); code = (code + "\r<td><img src=\"u.gif\"><\/td>");}
if (name.substring(i-1,i) == "v") {win.document.write ("\r<td><img src=\"images/v.gif\" width=\"109\" height=\"108\" border=\"0\"><\/td>"); code = (code + "\r<td><img src=\"v.gif\"><\/td>");}
if (name.substring(i-1,i) == "w") {win.document.write ("\r<td><img src=\"images/w.gif\" width=\"109\" height=\"108\" border=\"0\"><\/td>"); code = (code + "\r<td><img src=\"w.gif\"><\/td>");}
if (name.substring(i-1,i) == "x") {win.document.write ("\r<td><img src=\"images/x.gif\" width=\"109\" height=\"108\" border=\"0\"><\/td>"); code = (code + "\r<td><img src=\"x.gif\"><\/td>");}
if (name.substring(i-1,i) == "y") {win.document.write ("\r<td><img src=\"images/y.gif\" width=\"109\" height=\"108\" border=\"0\"><\/td>"); code = (code + "\r<td><img src=\"y.gif\"><\/td>");}
if (name.substring(i-1,i) == "z") {win.document.write ("\r<td><img src=\"images/z.gif\" width=\"109\" height=\"108\" border=\"0\"><\/td>"); code = (code + "\r<td><img src=\"z.gif\"><\/td>");}
if (name.substring(i-1,i) == " ") {win.document.write ("\r<td><img src=\"images/blank.gif\" width=\"109\" height=\"108\" border=\"0\"><\/td>"); code = (code + "\r<td><img src=\"blank.gif\"><\/td>");}

}
// #
// end table structure
// #

win.document.write ("\r<td><a href=\"http://www.lil-fingers.com\" target=\"_blank\"><img src=\"images/lf.gif\" width=\"109\" height=\"108\" border=\"0\" alt=\"Lil' Fingers\"><\/a><\/td>\r<\/tr>\r<\/table>");

code = (code + "\r<td><a href=\"http://www.lil-fingers.com\"><img src=\"images/lf.gif\" border=\"0\" alt=\"Lil' Fingers\"><\/a><\/td>\r<\/tr>\r<\/table>\r<-- end Lil' Fingers Blocks -->\r\r");


win.document.write ("<br><div class='text' align='center'><a href=\"#\" onclick=\"window.close();\">Spell another word<\/a>&nbsp; | &nbsp; <a href=\"#add\">add this word to my website<\/a><\/div>");

win.document.write ("<a name=\"add\"><\/a>");

win.document.write ("<br><center><textarea name=\"myCode\" rows=\"12\" cols=\"90\" style=\"font-size:8pt;\">" + code + "<\/textarea><\/center>");
win.document.write ("<\/form>");
win.document.write ("<div align='center' class='text'><b>HOW TO:<\/b> To add the above blocks to your site simply copy the above code and paste on your web page. <br>Don't forget to take a copy of the images by right clicking on each one and saving <br>it where you have your web page (or else it won't work!)<\/div>");

win.document.write("\r<\/td>\r<\/tr>\r<\/table>\r<\/TD>\r<TD valign='top' BGCOLOR='#FFFFFF'>");
win.document.write("\r<IMG SRC='..\/..\/images\/transparent.gif' VALIGN='TOP' WIDTH='1' HEIGHT='20' BORDER='0'>\r<\/td>\r<\/tr>\r<\/table>\r");
win.document.write("");
win.document.write("<\/div><\/div><div class=\"bottomstuff\"><\/div>");
win.document.write ("<\/BODY><\/HTML>");

}