AW.HTML.NavButton = AW.System.Template.subclass();
AW.HTML.NavButton.create = function()
{
var obj = this.prototype;
obj.setTag("SPAN");
with (obj)
{
setStyle("overflow", "hidden");
setStyle("top", 0);
setStyle("width", 23);
setStyle("height", 22);
setStyle("background", "white");
}
obj.defineTemplate("ButtonImage", new AW.HTML.IMG);
with (obj.getTemplate("ButtonImage"))
{
setAttribute("src", "shell.gif");
setStyle("position", "absolute");
setStyle("top", 0);
setAttribute("enabled", true);
setEvent('onmouseover', function(src){if (this.getAttribute("enabled") != false) this.setStyle("top", "-22px");});
setEvent('onmouseout', function(src){if (this.getAttribute("enabled") != false) this.setStyle("top", "0px");});
setEvent('onmousedown', function(src){if (this.getAttribute("enabled") != false) this.setStyle("top", "-44px");});
setEvent('onmouseup', function(src){if (this.getAttribute("enabled") != false) this.setStyle("top", "0px");});
}
obj.setImageLeft = function(newLeft)
{
this.getTemplate("ButtonImage").setStyle("left", newLeft);
}
obj.setContent("html", function()
{
return this.getButtonImageTemplate();
})
}
AW.HTML.NavHolder = AW.System.Template.subclass();
AW.HTML.NavHolder.create = function()
{
var obj = this.prototype;
obj.setTag("SPAN");
obj.defineTemplate("ViewButton", new AW.HTML.NavButton);
obj.getTemplate("ViewButton").setId("View");
obj.getTemplate("ViewButton").setImageLeft(-253);
obj.defineTemplate("FirstButton", new AW.HTML.NavButton);
obj.getTemplate("FirstButton").setId("First");
obj.getTemplate("FirstButton").setImageLeft(-276);
obj.setContent("html", function()
{
return this.getViewButtonTemplate()
+ this.getFirstButtonTemplate()
;
});
}
This topic is archived.