function Tab(){}
Tab.prototype.styleName = "";
Tab.prototype.label = "";
Tab.prototype.type = "";
Tab.prototype.action = "";
Tab.prototype.status = "off";
Tab.prototype.name = "";
Tab.prototype.id = "";
Tab.prototype.accesskey = "";
Tab.prototype.tooltip = "";
Tab.prototype.target = "";
//Render the Tab
Tab.prototype.render = function(){
var strHTML = "<td";
switch(this.status.toLowerCase()){
   case 'on':
      strHTML += " class='" + this.styleName + "On'>";
      break;
   default:
      strHTML += " class='" + this.styleName + "Off'>";
      break;
}
switch(this.type.toLowerCase()){
case 'form':
   strHTML += "&nbsp;&nbsp;<a name='" + this.name + "' id='" + this.id + "' accesskey='" + this.accesskey + "' title='" + this.tooltip + "'target='" + this.target + "' href='javascript:document." + this.action + ".submit()'";
   break;
case 'url':
   strHTML += "&nbsp;&nbsp;<a name='" + this.name + "' id='" + this.id + "' accesskey='" + this.accesskey + "' title='" + this.tooltip + "'target='" + this.target + "' href='" + this.action + "'";
   break;
case 'javascript':
   strHTML += "&nbsp;&nbsp;<a name='" + this.name + "' id='" + this.id + "' accesskey='" + this.accesskey + "' title='" + this.tooltip + "'target='" + this.target + "' href='javascript:" + this.action + "' ";
   break;
default:
   strHTML += "&nbsp;&nbsp;<a name='" + this.name + "' id='" + this.id + "' accesskey='" + this.accesskey + "' title='" + this.tooltip + "'target='" + this.target + "' href='javascript:void(0)' ";
   break;
}
strHTML += ">" + this.label + "</a>&nbsp;&nbsp;</td>";
document.write(strHTML);
}
function renderTab(linkLoc,status,label,target)
{
   var tab = new Tab;
   if (linkLoc='menu') 
      tab.styleName='tabText'
   else
      tab.styleName='footerText'
   
   tab.label = label;
   tab.status = status;
   tab.type = 'url';
   tab.target = '_top';
   tab.tooltip = target;
   tab.action = target;
   tab.render();
}
