function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else
countfield.value = maxlimit - field.value.length;
}

function buildLink(url, title, desc, size, field) {
  field.value = "<a href=\'http://www.hammerstamp.com/submit-article.php?url="+url+"&title="+title+"&desc="+desc+"\'><img alt=\'HammerStamp this DIY article!\' align=top width="+size+" height="+size+" src=\'http://www.hammerstamp.com/images/HS2.gif\'></a>";
}

function buildLinkFromDesc(url, title, desc, size, field, descField, countfield, maxlimit) {
	textCounter(descField, countfield, maxlimit);
	buildLink(url, title, desc, size, field);
}
