function castCSSClass(objects,classn)
{
for(var i=0;i<objects.length;i++)
   {
   var object=objects[i];
   object.className=object.className.replace(' '+classn,'');
   object.className+=' '+classn;
   }
}
function replCSSClass(objects,pattern,repl)
{
for(var i=0;i<objects.length;i++)
   {
   var object=objects[i];
   object.className=object.className.replace(pattern, repl);
   }
}
function htmlspecialchars(html) {
html = html.replace(/&/g, "&amp;");
html = html.replace(/</g, "&lt;");
html = html.replace(/>/g, "&gt;");
html = html.replace(/"/g, "&quot;");
return html;
}
						