
if( typeof(styleBase) == 'undefined' ) styleBase = "http://siab.heineken.com/usa" ;

HtmlEncode = function( text )
{ return text.replace('&','&amp;').replace('<','&lt;').replace('>','&gt;').replace('"','&quot;').replace("'",'&apos;'); }

ImageData = function( url, width, height )
{ this.url = url ; this.width = width ; this.height = height ; }

ImageTagFromImageData = function( data, attrib, alt )
{ with(data) return '<img ' + (height!=null?'height="' + height + '" ':'') + (width!=null?'width="' + width + '" ':'') + 'src="' + styleBase + '/include/style/' + url + '" ' + (alt!=null?'alt="' + HtmlEncode(alt) + '" ':'') + (attrib!=null?attrib:'') + ' />' ; }

InputTagFromImageData = function( data, attrib, alt )
{ with(data) return '<input type="image" ' + (height!=null?'height="' + height + '" ':'') + (width!=null?'width="' + width + '" ':'') + 'src="' + styleBase + '/include/style/' + url + '" ' + (alt!=null?'alt="' + HtmlEncode(alt) + '" ':'') + (attrib!=null?attrib:'') + ' />' ; }


HeaderImageTag = function (text)
{ return ImageTagFromImageData( ImageData_SecondLevelHeaderWide(text), 'class="titleImage" alt="' + HtmlEncode(text) + '"') ; }



ImageData_SecondLevelHeaderNarrow = function(text)
{ return new ImageData( 'default/secondlevel/headernarrow.aspx?P=' + encodeURIComponent(text), 291, 44 ) ; }

ImageData_SecondLevelHeaderWide = function(text)
{ return new ImageData( 'default/secondlevel/headerwide.aspx?P=' + encodeURIComponent(text), 441, 44 ) ; }

ImageData_SecondLevelLeftColumnLink = function(text)
{ return new ImageData( 'default/secondlevel/leftcolumnlink.aspx?P=' + encodeURIComponent(text), null, 12 ) ; }

ImageData_SecondLevelRightColumnLink = function(text)
{ return new ImageData( 'default/secondlevel/rightcolumnlink.aspx?P=' + encodeURIComponent(text), null, 12 ) ; }

ImageData_SecondLevelRedButton = function(text)
{ return new ImageData( 'default/secondlevel/RedButton.aspx?P=' + encodeURIComponent(text), null, 15 ) ; }



WhiteButtonImageTag = function (text)
{ return ImageTagFromImageData( ImageData_SecondLevelRightColumnLink(text), 'border="0"', text ) ; }

RedButtonImageTag = function (text)
{ return ImageTagFromImageData( ImageData_SecondLevelRedButton(text), 'border="0"', text ) ; }

RedButtonInputTag = function (text,attributes)
{ return InputTagFromImageData( ImageData_SecondLevelRedButton(text), 'border="0" ' + (attributes!=null?attributes:''), text ) ; }

WriteHeaderImageTag = function (text)
{ document.write( HeaderImageTag(text) ); }

WriteWhiteButtonImageTag = function (text)
{ document.write( WhiteButtonImageTag(text) ); }

WriteRedButtonImageTag = function (text)
{ document.write( RedButtonImageTag(text) ); }

WriteRedButtonInputTag = function (text,attributes)
{ document.write( RedButtonInputTag(text,attributes) ); }

var styleDefaultPatchOldOnload = window.onload ;
window.onload = function()
{
	window.status='';
	if( styleDefaultPatchOldOnload ) 
		styleDefaultPatchOldOnload() ;
}



/*documented!*/
SCLT_Start = function()
{ return "<span class='shortcutLT'><table class='LinkTable'>" ; }

SCLT_DeadEntryStart = function(title)
{ return "<tr><td valign='top' class='chevronTD'><span class='bulk'>&gt;&nbsp;</span></td><td class='contentTD'><span class='bulk'>" + title ; }

SCLT_DeadEntryEnd = function()
{ return "</span></td></tr>" ; }

SCLT_DeadEntry = function(title)
{ return SCLT_DeadEntryStart(title) + SCLT_DeadEntryEnd(); }

SCLT_EntryStart = function(title,href,target)
{ return "<tr><td valign='top' class='chevronTD'><span class='anchor' target='" + ( target == null ? "content" : target ) + "' onMouseOver='window.status=\" \"; return true'>&gt;&nbsp;</span></td><td class='contentTD'><a class='anchor' target='" + ( target == null ? "content" : target ) + "' href='" + href + "'>" + title + "</a>" ; }

SCLT_EntryEnd = function()
{ return "</span></td></tr>" ; }

SCLT_Entry = function(title,href,target)
{ return SCLT_EntryStart(title,href,target) + SCLT_EntryEnd(); }
		
SCLT_End = function()
{ return "</table></span>" ; }



SCLT_WriteStart = function()
{ document.writeln( SCLT_Start() ); }

SCLT_WriteDeadEntryStart = function(title)
{ document.write( SCLT_DeadEntryStart(title) ); }

SCLT_WriteDeadEntryEnd = function()
{ document.writeln( SCLT_DeadEntryEnd() ); }

SCLT_WriteDeadEntry = function(title)
{ document.writeln( SCLT_DeadEntry(title) ); }

SCLT_WriteEntryStart = function(title,href,target)
{ document.write( SCLT_EntryStart(title,href,target) ); }

SCLT_WriteEntryEnd = function()
{ document.writeln( SCLT_EntryEnd() ); }

SCLT_WriteEntry = function(title,href,target)
{ document.writeln( SCLT_Entry(title,href,target) ); }
		
SCLT_WriteEnd = function()
{ document.writeln( SCLT_End() ); }

document.writeln('<LINK rel="stylesheet" type="text/css" href="' + styleBase + '/include/style/default/Css.aspx?style=layout_wide%2clinktable_shortcut%2cempty_left" />') ;
