var defaultBackgroundColor = "white";
var defaultTextColor = "black";
var defaultALinkColor = "blue";
var defaultVLinkColor = "red";

var defaultFontsize = "large";

function setColors( theDoc ) {
	var bgcolor = get_cookie( "backgroundColor" );
	if ( bgcolor )
		if ( bgcolor != "" ) 
			theDoc.body.style.backgroundColor = bgcolor;
	var textcolor = get_cookie( "textColor" );
	if ( textcolor )
		if ( textcolor != "" )
			theDoc.body.style.color = textcolor;
	var alinkcolor = get_cookie( "alinkColor" );
	if ( alinkcolor )
		if ( alinkcolor != "" ) {
			theDoc.body.link = alinkcolor;
			theDoc.body.alink = alinkcolor;
		}
	var vlinkcolor = get_cookie( "vlinkColor" );
	if ( vlinkcolor )
		if ( vlinkcolor != "" )
			theDoc.vlinkColor = vlinkcolor;
}

function resetColors( theDoc ) {
	set_cookie( "backgroundColor", defaultBackgroundColor );
	set_cookie( "textColor", defaultTextColor );
	set_cookie( "alinkColor", defaultALinkColor );
	set_cookie( "vlinkColor", defaultVLinkColor );
	theDoc.body.style.backgroundColor = defaultBackgroundColor;
	theDoc.body.style.color = defaultTextColor;
}

function changeAllFrameColors( bgcolor, textcolor, alinkcolor, vlinkcolor ) {
	set_cookie( 'backgroundColor', bgcolor ); 
	set_cookie( 'textColor', textcolor ); 
	set_cookie( "alinkColor", alinkcolor );
	set_cookie( "vlinkColor", vlinkcolor );
	setColors( top.banner.document ); 
	setColors( top.menu.document ); 
	setColors( top.content.document ); 
}

function resetAllFrameColors() {
	changeAllFrameColors( defaultBackgroundColor, defaultTextColor, defaultALinkColor, defaultVLinkColor );
}

function setFontSizes( theDoc ) {
	var fontsize = get_cookie( "fontSize" );
	if ( fontsize )
		if ( fontsize != "" )
			theDoc.body.style.fontSize = fontsize;
}

function resetFontSizes( theDoc ) {
	set_cookie( "fontSize", defaultFontSize );
	theDoc.body.style.fontSize = defaultFontSize;
}

function changeAllFrameFontSizes( fontsize ) {
	set_cookie( "fontSize", fontsize );
	setFontSizes( top.banner.document ); 
	setFontSizes( top.menu.document ); 
	setFontSizes( top.content.document ); 
}

function resetAllFrameFontSizes() {
	changeAllFrameFontSizes( defaultFontSize );
}