function Link(strID,strContent,intColSpan,intRowSpan)
{
this.base =                       Item;
this.base(strID,strContent);
this.intLinkID = Link.prototype.intLinkCount++;
}
Link.prototype =                    new Item;
Link.prototype.strType =            "Link";
Link.prototype.strClassList =       Item.prototype.strClassList+"Link;";
Link.prototype.build =              _link_build;
Link.prototype.click =              _link_click;
Link.prototype.getBalloonText =     _link_getBalloonText;
Link.prototype.getLinkName =        _link_getLinkName;
Link.prototype.getClass =           _link_getClass;
Link.prototype.getColumnCount =     _link_getColumnCount;
Link.prototype.setBalloonText =     new Function("strValue", "this.strBalloon = strValue || ''");
Link.prototype.setClass =           _link_setClass;
Link.prototype.setLinkWhenSelected = new Function("bValue",  "this.bLinkWhenSelected = bValue");
Link.prototype.setSelection =       _link_setSelection;
Link.prototype.setStyle =           new Function("strValue", "this.strStyle = strValue");
Link.prototype.setSpan =            _link_setSpan;
addSynonym("Balloon","BalloonText");
function Label(strID,strContent)
{
this.base =                       Link;
this.base(strID,strContent);
}
Label.prototype =                   new Link;
function Break(strID)
{
this.base =                       Link;
this.base(strID,"&nbsp;");
}
Break.prototype =                   new Link;
function ProxyLink(item)
{
this.base =                       Link;
this.base(item.strID,null);
this.itemWrap =                   item;
item.itemParent =                 this;
item.setRoot(this.itemRoot);
}
ProxyLink.prototype =               new Link
ProxyLink.prototype.strType =       "ProxyLink";
ProxyLink.prototype.strClassList =  Link.prototype.strClassList+"ProxyLink;";
ProxyLink.prototype.getContent =    new Function("return this.itemWrap.build()");
ProxyLink.prototype.setRoot =       new Function("item","this.itemRoot=item;this.itemWrap.setRoot(item)");
function _link_build()
{
if( !this.bIsVisible )
return "";
var retString = "";
var strID = this.getLinkName();
var intRecordIndex = this.getCurrentRecordIndex();
var strContent = this.getContent();
strContent = strContent.replace(/ /g,"&#160");
if( intRecordIndex == -2 )
this.bInHeading = true;
else
this.bInHeading = false;
if( intRecordIndex >= 0 )
this.bInAlternateRow = this.getCurrentRecord().bInAlternateRow;
else
this.bInAlternateRow = false;
var strClass = "";
if( this.getClass() )
strClass = " class=\""+this.getClass()+"\"";
var bHasLink = (this.getLink && this.getLink() != null || this.isSelectable() );
if( bHasLink )
{
retString += "<A id=\"link"+strID+"\" name=\"link"+strID+"\" "+strClass+" href=\"javascript:"+this.strSourceLocation+".click('"+this.getFullPathID()+"',true,"+intRecordIndex+")\"";
retString += " onmouseover=\"return window.status='';\" ";
retString += " onmouseout=\"return window.status='';\" ";
retString += " title=\""+strContent+"\">";
}
if( this.strSpan != null )
retString += this.strSpan;
if( intRecordIndex != -2 || this.bIsLabel && strContent && strContent != "" )
retString += strContent;
if( bHasLink )
retString += "</A>";
retString += "<IMG align=\"\" alt=\"\" height=\"14\" width=\"1\" src=\"images/spacer.gif\">";
return retString;
}
function _link_click(bClickedOnText,intRecordIndex)
{
if( this.itemRoot )
this.itemRoot.setCurrentRecordIndex(intRecordIndex);
if( intRecordIndex == -2 )
this.bInHeading = true;
else
this.bInHeading = false;
if( intRecordIndex >= 0 )
this.bInAlternateRow = this.getCurrentRecord().bInAlternateRow;
else
this.bInAlternateRow = false;
if( this.bLinkWhenSelected || ! this.bSelected )
this.gotoLink();
this.setSelection(!this.bSelected);
}
function _link_getBalloonText()
{
return this.strBalloon;
}
function _link_getLinkName()
{
var intRecordIndex = this.getCurrentRecordIndex();
if( intRecordIndex >= 0 )
return this.intLinkID + "_" + intRecordIndex;
return this.intLinkID;
}
function _link_getClass()
{
if( this.bInHeading )
return this.strHeadingClass;
if( this.bInAlternateRow )
{
if( this.bSelected && this.strAltSelectedClass )
return this.strAltSelectedClass;
return this.strAltClass;
}
if( this.bSelected && this.strSelectedClass )
return this.strSelectedClass;
return this.strClass;
}
function _link_getColumnCount(intCol)
{
var root = this.itemRoot;
if( this.itemRoot == this )
root = this.itemParent.itemRoot;
if( intCol > 0 && root.bUseLinkSeparator )
return 2;
return 1;
}
function _link_setClass(intType,strClass,bSetAlternate)
{
if( bSetAlternate )
{
if( ! intType || intType == 0 )
this.strAltClass = strClass;
else if( intType == 1 )
this.strAltSelectedClass = strClass;
}
else
{
if( ! intType || intType == 0 )
this.strClass = strClass;
else if( intType == 1 )
this.strSelectedClass = strClass;
}
}
Link.prototype.baseSetSelection = Item.prototype.setSelection;
function _link_setSelection(bValue,bOverride)
{
this.baseSetSelection(bValue,bOverride);
}
function _link_setSpan(strSpanID,strOptions)
{
if( strSpanID )
this.strSpan = "<SPAN id='"+strSpanID+"' name='"+strSpanID+"'";
if( strOptions )
this.strSpan += " "+strOptions;
this.strSpan += ">";
}
Link.prototype.bIsLabel =           false;
Link.prototype.bInHeading =         false;
Link.prototype.bLinkWhenSelected =  true;
Link.prototype.intLinkCount =       0;
Link.prototype.strBalloon =         "";
Link.prototype.strSourceLocation =  "window.parent";
Link.prototype.strSpan =            null;
Link.prototype.strStyle =           null;
Break.prototype.bGetValueFromModel = false;
Label.prototype.bGetValueFromModel = false;
Label.prototype.getLink =          null;
function NoteBook(strID,strLink,strTarget)
{
this.base = Root;
this.base(strID,strLink,strTarget);
}
NoteBook.prototype =              new Root;
NoteBook.prototype.strType =      "NoteBook";
NoteBook.prototype.strClassList = Root.prototype.strClassList+"NoteBook;";
addSynonym("Tabs","NoteBook");
NoteBook.prototype.add =          _notebook_add;
NoteBook.prototype.build =        _notebook_build;
function NoteTab(itemTabContent)
{
this.base =                     Link;
this.base(itemTabContent.strID,itemTabContent.strContent);
this.itemPage = itemTabContent;
itemTabContent.itemParent = this;
itemTabContent.itemRoot = this.itemRoot;
}
NoteTab.prototype =                new Link;
NoteTab.prototype.strType =        "NoteTab";
NoteTab.prototype.strClassList =   Link.prototype.strClassList+"NoteTab;";
NoteTab.prototype.build =         _notetab_build;
NoteTab.prototype.click =         _notetab_click;
NoteTab.prototype.getColumnCount = _notetab_getColumnCount;
NoteTab.prototype.getContent =    _notetab_getContent;
NoteBook.prototype.baseRootAdd = Root.prototype.add;
function _notebook_add(item)
{
var tab;
this.baseRootAdd(tab = new NoteTab(item) );
tab.itemPage = item;
item.itemRoot = this;
if( this.length == 1 )
{
tab.setSelection(true);
}
return tab;
}
NoteBook.prototype.baseRootBuild = Root.prototype.build;
function _notebook_build()
{
var retString = "";
if( this.bIsVisible )
{
var it = this.getIterator();
var lastItem = null;
if (top.getit_main.document.getElementById('vD_DisplayFormInfo'))
retString += "<DIV id=\"tabs\" class=\"TabContainer\" style=\"position:relative; width: 100%; overflow: visable;\">";
for( var item = it.getFirstItem(); item != null; item = it.getNextItem() )
{
retString += item.build() ;
lastItem = item;
}
if (top.getit_main.document.getElementById('vD_DisplayFormInfo'))
retString += "</DIV>";
}
if( this.itemParent == null )
displayContent(retString,this.strLayer);
return retString;
}
NoteTab.prototype.baseBuild = Link.prototype.build;
function _notetab_build()
{
var retString = "";
retString += this.baseBuild();
return retString;
}
NoteTab.prototype.baseClick = Link.prototype.click;
function _notetab_click(bClickedOnText,intRecordIndex)
{
this.baseClick();
this.itemPage.gotoLink();
getRoot(this.getFullPathID()).build();
}
NoteTab.prototype.baseGetColumnCount = Link.prototype.getColumnCount;
function _notetab_getColumnCount(intCol)
{
return this.baseGetColumnCount(intCol)+1;
}
function _notetab_getContent()
{
return this.itemPage.getContent();
}
NoteBook.prototype.intSelectionModel = SINGLESELECTION;
NoteBook.prototype.strSelectionType = "NoteTab";
NoteTab.prototype.bNarrowWidth =      true;
NoteTab.prototype.bGetValueFromModel = false;
NoteTab.prototype.strClass =         "TabMenu";
NoteTab.prototype.strSelectedClass = "SelectedTabMenu";
