// Copyright © 2004 Software Dunn Right

function initPage()
{
//	document.search.q.focus();
}

function wCUL(relPath)
{  document.writeln("<td width='10' height='10'><img src='"+relPath+"Brd/brdCUL.gif' width='10' height='10'></td>"); }
function wCUR(relPath)
{  document.writeln("<td width='10' height='10'><img src='"+relPath+"Brd/brdCUR.gif' width='10' height='10'></td>"); }
function wCLL(relPath)
{  document.writeln("<td width='10' height='10'><img src='"+relPath+"Brd/brdCLL.gif' width='10' height='10'></td>"); }
function wCLR(relPath)
{  document.writeln("<td width='10' height='10'><img src='"+relPath+"Brd/brdCLR.gif' width='10' height='10'></td>"); }
function wCTU(relPath)
{  document.writeln("<td width='10' height='10'><img src='"+relPath+"Brd/brdTU.gif' width='10' height='10'></td>"); }
function wCTD(relPath)
{  document.writeln("<td width='10' height='10'><img src='"+relPath+"Brd/brdTD.gif' width='10' height='10'></td>"); }
function wCTL(relPath)
{  document.writeln("<td width='10' height='10'><img src='"+relPath+"Brd/brdTL.gif' width='10' height='10'></td>"); }
function wCTR(relPath)
{  document.writeln("<td width='10' height='10'><img src='"+relPath+"Brd/brdTR.gif' width='10' height='10'></td>"); }
function wCE(relPath)
{  document.writeln("<td width='10' height='10'><img src='"+relPath+"Brd/brdE.gif' width='10' height='10'></td>"); }
function wCH(relPath)
{  document.writeln("<td height='10'><img src='"+relPath+"Brd/brdH.gif' width='100%' height='10'></td>"); }
function wCHW(relPath, wid)
{  document.writeln("<td height='10' width='"+wid+"'><img src='"+relPath+"Brd/brdH.gif' width='100%' height='10'></td>"); }
function wCHS(relPath, spn)
{  document.writeln("<td height='10' colspan='"+spn+"'><img src='"+relPath+"Brd/brdH.gif' width='100%' height='10'></td>"); }
function wCV(relPath)
{  document.writeln("<td width='10' background='"+relPath+"Brd/brdV.gif'><img src='"+relPath+"Brd/brdV.gif' width='10' height='100%'></td>");  }
function wCVS(relPath, spn)
{  document.writeln("<td width='10' rowspan='"+spn+"' background='"+relPath+"Brd/brdV.gif'><img src='"+relPath+"Brd/brdV.gif' width='10' height='100%'></td>");  }

function wDIV(relPath)
{
  document.writeln("<tr>");
  wCLL(relPath);
  wCH(relPath);
  wCTL(relPath);
  wCV(relPath);
  document.writeln("</tr>");
}

function writeHeader(relPath, initVal)
{
  document.writeln("<tr>");
  wCUL(relPath);
  wCHS(relPath, "3");
  wCUR(relPath);
  document.writeln("</tr><tr>");
  wCV(relPath);
  document.writeln("  <td colspan='3' >");
  document.writeln("    <table border='0' cellspacing='0' cellpadding='0' width='100%'>");
  document.writeln("      <tr>");
  document.writeln("        <td width='265' bgcolor='#FFFFCC' height='50'><a href='"+relPath+"index.html'><img border='0' src='"+relPath+"../RWLogo.gif' width='225' height='45' align='top' alt='RecipeWorks Home'></a><font face='Arial' size='1'><sup>TM</sup></font></td>");
  document.writeln("        <td width='363' background='"+relPath+"images/gradient.jpg'><p align='center'>");
  document.writeln("        <b>Version 4.0 is now available with <br>USDA Nutrient Database integration.</b>");
//  document.writeln("        <b><a href='"+relPath+"special.html' class='NoUnderline'><img src='"+relPath+"images/gift.gif' align='middle' border='0'><font size='4' color='#00FF00'>  Special Holiday Gift Offer!</font></a></b>");
//  document.writeln("        <b><a href='"+relPath+"special.html' class='NoUnderline'><font size='4' color='#00FF00'>Special Gift Offer!</font></a></b>");
  document.writeln("        </p></td><td valign='middle'><p align='center'><img border='0' src='"+relPath+"images/icon.gif' width='30' height='30' align='right'></p></td>");
  document.writeln("      </tr>");
  document.writeln("    </table>");
  document.writeln("  </td>");
  wCV(relPath);
  document.writeln("</tr><tr>");
  wCTR(relPath);
  wCHW(relPath, "125");
  wCTD(relPath);
  wCH(relPath);
  wCTL(relPath);
  document.writeln("</tr>");
}

function writeFooter(relPath)
{
  document.writeln("<tr>");
  document.writeln("  <td></td><td></td>");
  wCV(relPath);
  document.writeln("  <td bgcolor='#FFFFCC'><hr><table width='100%' border='0'><tr><td align='center'><font color='#808080' size='1'>Copyright © 1998-2005 Software Dunn Right.</font></td></tr></table> </td>");
  wCV(relPath);
  document.writeln("</tr><tr>");
  wCE(relPath);
  wCE(relPath);
  wCLL(relPath);
  wCH(relPath);
  wCLR(relPath);
  document.writeln("</tr>");
} 

function writeNavigation(relPath, cur)
{
  document.writeln("<table border='0' width='135' cellspacing='0' cellpadding='0'><tr>");
  wCVS(relPath, "8");
  writeButton(relPath, "Features", "features.htm", 3, cur);
  writeButton(relPath, "Palm OS", "Palm.htm", 3, cur);
  writeButton(relPath, "PocketPC", "Pocket.htm", 3, cur);
  writeButton(relPath, "Screen Shots", "preview.htm", 2, cur);
  writeButton(relPath, "Free Download", "download.htm", 1, cur);
  writeButton(relPath, "Buy it Online", "purchase.htm", 2, cur);
  writeButton(relPath, "What's New?", "new.htm", 2, cur);
  writeButton(relPath, "Support", "Support/index.htm", 3, cur);
  document.writeln("<tr>");
  wCLL(relPath);
  wCHS(relPath, "125");
  document.writeln("</tr></table>");
}

function writeButton(relPath, title, url, spc, cur)
{
  var w=0;
  var dolink=1;
  var btn = "images/button.gif";
  if (cur == url || cur == title)
  {
    dolink=0;
    btn = "images/buttonA.gif";
  }

  if (title != "Features")
    document.writeln("<tr>");
  document.writeln("  <td width='125' background='"+relPath+btn+"' height='30' nowrap class='RWNavBtn'><p align='center'><b>");//<font face='Arial'>");
  if (dolink)
    document.writeln("<a href='"+relPath+url+"' class='NoUnderline'>");
  document.write(title);
  document.writeln("  </a></b></td></tr>");
}


function showOnlineDemo()
{
  window.open('tryit.html', 'Demo', 'width=804,height=620,toolbar=no,status=no,scrollbars=no,menubar=no');
}

function writeShowDemo()
{
  document.writeln("<FORM>");
  document.writeln("<INPUT type='button' value='Online Demo!' onClick='showOnlineDemo()'>");
  document.writeln("</FORM>");
}