/* sets styles from preference settings */


/* if there is no cookie, set default colors */

if (document.cookie == "") {

	/* heading & text colors */
	var stylehc = "#2971A7"
	var styleimportant = "#EE0033"
	var styletext = "#505050"
	
	/* link colors */
	var stylelink = "#2971A7"
	var stylevisited = "CornflowerBlue"
	var styleactive = "#FF3333"

}



/* if there is a cookie, get styles */

if (document.cookie != "") {

	SBMUGprefs = unescape(document.cookie.split("=")[1])

	/* theme */
	var theme = SBMUGprefs.split("+")[0]

	/* drop capitals */
	if (theme == "Original") {
		styledc = "font-size:441%; height:.76em; line-height:.9em; margin-top:.006em; "
	} else if (theme == "Apple") {
		styledc = "font-size:309%; height:.80em; line-height:.75em; margin-top:.102em; "
	} else if (theme == "Blog") {
		styledc = "font-size:325%; height:.76em; line-height:.76em; margin-top:.080em; "
	}

	/* heading & text colors */
	var stylehc = SBMUGprefs.split("+")[1]
	var styleimportant = SBMUGprefs.split("+")[2]
	var styletext = SBMUGprefs.split("+")[3]
	
	/* link colors */
	var stylelink = SBMUGprefs.split("+")[4]
	var stylevisited = SBMUGprefs.split("+")[5]
	var styleactive = SBMUGprefs.split("+")[6]

	/* paragraphs & links */
	var styleff = SBMUGprefs.split("+")[7]
	var stylefs = SBMUGprefs.split("+")[8]
	var stylelh = SBMUGprefs.split("+")[9]
	var styleh3lh = parseFloat(stylelh.substring(0,(stylelh.length - 2)))
	
	/* captions */
	var stylecff = SBMUGprefs.split("+")[10]
	var stylecfs = SBMUGprefs.split("+")[11]
	var styleclh = SBMUGprefs.split("+")[12]
	
	/* heading fonts */
	var stylehff = SBMUGprefs.split("+")[13]

	
	document.write('<STYLE TYPE="text/css">\
	P, DIV, LI, TABLE, TR, TD {font-family:' + styleff + ', Courier, mono; line-height:' + stylelh + '; font-size:' + (12*stylefs) + 'px; color:' + styletext + '; }\
	H1, H2, H3, .headingPlus3, .headingPlus2, .headingPlus1 {font-family:' + stylehff + ', Courier, mono; }\
	H1 {font-size:' + (24*stylefs) + 'px; }\
	H2 {font-size:' + (18*stylefs) + 'px; }\
	H3 {font-size:' + (14*stylefs) + 'px; line-height:' + (12*styleh3lh) + 'px; }\
	H1, .headingPlus3, .headingPlus2, .headingPlus1 {color:' + stylehc + '; }\
	A:link, .linkColor {color:' + stylelink + '; }\
	A:visited, .vlinkColor {color:' + stylevisited + '; }\
	A:active , .clickedColor {color:' + styleactive + '; }\
	.dropCap {' + styledc + 'font-weight:normal; float:left; margin-right:1px; margin-bottom:0px; }\
	.important {color:' + styleimportant + '; }\
	.caption, .calendar {font-family:' + stylecff + ', Courier, mono; line-height:' + styleclh + '; font-size:' + stylecfs + '; }\
	IMG[alt] {font-family:' + stylecff + ', Courier, mono; line-height:' + styleclh + '; font-size:' + stylecfs + '; }\
	INPUT[type="text"], TEXTAREA {font-family:' + styleff + ', Courier, mono; line-height:' + stylelh + '; font-size:' + (12*stylefs) + 'px; color:' + styletext + '; }\
	</STYLE>\
	')
}
