var home_url='/';
var style_font_face='sans-serif';
var style_box='white_shadow';

function nSetFontFace( name )
{
	style_font_face = name;
}

function nSetBoxStyle( name )
{
	style_box = name;
}

function nSetHome( url )
{
	home_url = url;
}

function nImg( style, img )
{
	if( style == null )
		style = style_box;
	return( '<img src="' + home_url + style + '/' + img  + '.jpg" border="0">' );	
}

function nTblImg( style, img, text )
{
	if( style == null )
		style = style_box;
	if( text == null )
		text='';
	return( '<table border="0" background="' + home_url + style  + '/' + img + '.jpg" height="100%" width="100%"><tr><td><font face="' + style_font_face + '"><b>' + text + '</b></font></td></tr></table>' );	
}

function nBox( style, text, title )
{
	if( style == null )
		style = style_box;
	if( title == null )
		title = '';
	document.write( '<table cellpadding="0" cellspacing="0" border="0">' );
	document.write( '<tr><td height="100%">' + nImg(style, 'lt')   + '</td><td height="100%" valign="top">' + nTblImg(style, 't', title ) + '</td><td height="100%">' + nImg(style, 'rt')   + '</td></tr>' );
	
	document.write( '<tr><td height="100%">' + nTblImg(style, 'l') + '</td><td height="100%" valign="top"><table border="0" background="' + home_url + style  + '/m.jpg" height="100%" width="100%"><tr><td><font face="' + style_font_face + '">' + text         + '</font></td></tr></table></td><td height="100%">' + nTblImg(style, 'r') + '</td></tr>' );
	
	document.write( '<tr><td height="100%">' + nImg(style, 'lb')   + '</td><td height="100%" valign="top">' + nTblImg(style, 'b') + '</td><td height="100%">' + nImg(style, 'rb')   + '</td></tr>' );
	document.write( '</table>' );
}

function nBoxTopTitleStart( style )
{
	if( style == null )
		style = style_box;
	document.write( '<table cellpadding="0" cellspacing="0" border="0">' );
	document.write( '<tr><td height="100%">' + nImg(style, 'lt')   + '</td><td height="100%" valign="top"><table border="0" background="' + home_url + style  + '/t.jpg" height="100%" width="100%"><tr><td><font face="' + style_font_face + '">' );
}

function nBoxTopTitleEnd( style )
{
	if( style == null )
		style = style_box;
	document.write( '</font></td></tr></table></td><td height="100%">' + nImg(style, 'rt')   + '</td></tr>' );
	
	document.write( '<tr><td height="100%">' + nTblImg(style, 'l') + '</td><td height="100%" valign="top"><table border="0" background="' + home_url + style  + '/m.jpg" height="100%" width="100%"><tr><td><font face="' + style_font_face + '">');
}

function nBoxTop( style, title )
{
	if( style == null )
		style = style_box;
	if( title == null )
		title = '';
	document.write( '<table cellpadding="0" cellspacing="0" border="0" width="100%">' );
	document.write( '<tr><td height="100%">' + nImg(style, 'lt')   + '</td><td width="100%" height="100%" valign="top">' + nTblImg(style, 't', title ) + '</td><td height="100%">' + nImg(style, 'rt')   + '</td></tr>' );
	
	document.write( '<tr><td height="100%">' + nTblImg(style, 'l') + '</td><td height="100%" valign="top"><table border="0" background="' + home_url + style  + '/m.jpg" height="100%" width="100%"><tr><td><font face="' + style_font_face + '">');
}

function nBoxBottom( style )
{
	if( style == null )
		style = style_box;
	document.write( '</font></td></tr></table></td><td height="100%">' + nTblImg(style, 'r') + '</td></tr>' );
	
	document.write( '<tr><td height="100%">' + nImg(style, 'lb')   + '</td><td height="100%" valign="top">' + nTblImg(style, 'b') + '</td><td height="100%">' + nImg(style, 'rb')   + '</td></tr>' );
	document.write( '</table>' );
}