function showLink(display, link_url, idx) {
var page_path = location.pathname;
var index = page_path.lastIndexOf("/");
var path = page_path.substring(0,index+1);
if (page_path.indexOf("/") == 0) path = "";
if (link_url.indexOf("sub_") >= 0) {
start = link_url.lastIndexOf("/") + 1;
end = link_url.indexOf("sub_");
if (page_path.indexOf(link_url.substring(start,end)) >= 0 ) {
opt("<tr>");
opt('  <td>&nbsp;</td><td class=nav nowrap>');
if (page_path.indexOf(link_url) >= 0)
opt('<li span class=navHi><b>'+ display +'</b></li>')
else
opt('<li><a href="' + path + link_url + '">' + display + '</a></li>')
opt("</td></tr>\n")
}
}
else {
var btn = (idx%6+1);
if (page_path.indexOf(link_url) >= 0)
ob = new OliveButton(btn, display, "","currentPic");
else
ob = new OliveButton(btn, display, "location.href='"+path +link_url+"'");
}
}
opt(thinHrule);
opt('<table width=170 cellspacing=0 cellpadding=0 border=0>');
/* showLink */
showLink("Welcome", "welcome.jsp", 4);
showLink("Join the Program", "join_program.jsp", 5);
showLink("How It Works", "join_sub_works.jsp");
if (location.pathname.indexOf("join_") != -1)
opt('<tr><td colspan=2 height=10><br></td></tr>');
showLink("Current Affiliate Login", "login.jsp", 6);
showLink("Tools & Business Support", "tools_business.jsp", 1);
showLink("Available Link Types", "tools_sub_banner.jsp");
showLink("Newsletters", "tools_sub_newsletter.jsp");
showLink("Promotions", "tools_sub_promo.jsp");
showLink("Editorial Content", "tools_sub_ed.jsp");
if (location.pathname.indexOf("tools_") != -1)
opt('<tr><td colspan=2 height=10><br></td></tr>');
showLink("Best Practices", "best_practices.jsp", 2);
showLink("Member Benefits", "best_sub_benefits.jsp");
showLink("Drive New Customers", "best_sub_active.jsp");
showLink("Product Merchandising", "best_sub_merchandising.jsp");
showLink("Link Optimization", "best_sub_optimization.jsp");
showLink("Business Models", "best_sub_models.jsp");
showLink("General", "best_sub_general.jsp");
showLink("Success Stories", "best_sub_success.jsp");
if (location.pathname.indexOf("best_") != -1)
opt('<tr><td colspan=2 height=10><br></td></tr>');
showLink("Discussion Board", "discussion.jsp", 3);
showLink("Terms & Conditions", "terms_conditions.jsp", 4);
showLink("FAQ", "faq.jsp", 5);
showLink("News & Announcements", "news_announce.jsp", 6);
showLink("Contact Us", "contact_info.jsp", 1);
showLink("About Shutterfly", "/about/com_overview.jsp", 2);
/* end showLink */
opt("</table>");
