function Right(str, n){
    if (n <= 0)
       return "";
    else if (n > String(str).length)
       return str;
    else {
       var iLen = String(str).length;
       return String(str).substring(iLen, iLen - n);
    }
}

function resourceDef(title,url,description)
{
document.write("<p align='left'><font face=Arial>")
document.write("<font color='#330099' class='headline_sub'>")
document.write(title)
document.write("</font>  <br>")
document.write("<a href='",url,"'>",url,"</a></p>")
document.write("<p align='left'><font face=Arial>")
document.write(description,"</font></p>")

}
function bulletinIcon(title,url,description)
{
document.write("<tr><td>")
document.write("<a href='",url,"'>")
document.write("<img src='./images/",Right(url,3).toUpperCase(),".gif'>")
document.write("</a></p>")
document.write("</td><td><p align='left'><font face=Arial>")
document.write("<font color='#330099' class='headline_sub'>")
document.write(description)
document.write("</font>  <br>")
document.write("</td></tr>")

}

function bulletinDef(title,url,description)
{
document.write("<p align='left'><font face=Arial>")
document.write("<font color='#330099' class='headline_sub'>")
document.write(title)
document.write("</font>  <br>")
document.write("<a href='",url,"'>",url,"</a></p>")
document.write("<p align='left'><font face=Arial>")
document.write(description,"</font></p>")

}

function templatesDef(title,url1,url2,description)
{
document.write("<tr>")
document.write("<td><a href='./bulletins/",url1,"'>")
document.write("<img src='./images/",Right(url1,3).toUpperCase(),".gif'>")
document.write("</a></td>")
if (url2==""){
document.write("<td>&nbsp;</td>")
}
else {
document.write("<td><a href='./bulletins/",url2,"'>")
document.write("<img src='./images/",Right(url2,3).toUpperCase(),".gif'>")
document.write("</a></td>")
}
document.write("<td><font face=Arial>")
document.write("<font color='#330099' class='headline_sub'>")
document.write(title)
document.write("</font>  ")
document.write("<br><font face=Arial>")
document.write(description,"</font><br><br>")
document.write("</td></tr>")

}

function linkDef(title,url1,url2,description)
{
document.write("<tr>")
document.write("<td><a href='",url1,"'>")
document.write("<img src='./images/url.jpg'>")
document.write("</a></td>")
if (url2==""){
document.write("<td>&nbsp;</td>")
}
else {
document.write("<td><a href='",url2,"'>")
document.write("<img src='./images/url.jpg'>")
document.write("</a></td>")
}
document.write("<td><font face=Arial>")
document.write("<font color='#330099' class='headline_sub'>")
document.write(title)
document.write("</font>  ")
document.write("<br><font face=Arial>")
document.write(description,"</font><br><br>")
document.write("</td></tr>")


}


function clubResourceDef(title,url1,url2,description)
{
document.write("<tr>")
document.write("<td><a href='./clubResources/",url1,"'>")
document.write("<img src='./images/",Right(url1,3).toUpperCase(),".gif'>")
document.write("</a></td>")
if (url2==""){
document.write("<td>&nbsp;</td>")
}
else {
document.write("<td><a href='./clubResources/",url2,"'>")
document.write("<img src='./images/",Right(url2,3).toUpperCase(),".gif'>")
document.write("</a></td>")
}
document.write("<td><font face=Arial>")
document.write("<font color='#330099' class='headline_sub'>")
document.write(title)
document.write("</font>  ")
document.write("<br><font face=Arial>")
document.write(description,"</font><br><br>")
document.write("</td></tr>")


}
function thumbImage(libimg,img,libthumb)
{
document.write("<a href='./",libimg,"/",img,"'><img src='./",libthumb,"/",img,"'  height=200 ></a><br><br>")


}


