var mainColor			= prepareColor(getStyle("maincolor").color);
var mainAlternate		= prepareColor(getStyle("mainalternate").color);
var mainHeading			= prepareColor(getStyle("mainheading").color);
var mainText			= prepareColor(getStyle("maintext").color);
var mainLink			= prepareColor(getStyle("mainlink").color);

var secondaryColor		= prepareColor(getStyle("secondarycolor").color);
var secondaryAlternate	= prepareColor(getStyle("secondaryalternate").color);
var secondaryHeading	= prepareColor(getStyle("secondaryheading").color);
var secondaryText		= prepareColor(getStyle("secondarytext").color);
var secondaryLink		= prepareColor(getStyle("secondarylink").color);
var myTopTabs			= prepareColor(getStyle("topstripe").color = shadeColor(secondaryColor,0.20));
var mySearchBg			= prepareColor(getStyle("mysearchbg").color = shadeColor(secondaryColor,0.05));
var myButtons			= prepareColor(getStyle("topstripe").color = shadeColor(mainColor,0.80));

getStyle("text").color = secondaryText;
getStyle("mainheadings").color = mainHeading;
getStyle("subheadings").color = shadeColor(myTopTabs,0.70);
getStyle("textmain").color = mainText;
getStyle("textalts").color = secondaryAlternate;
getStyle("body").backgroundColor = secondaryColor;
getStyle("table").backgroundColor = mainColor;
getStyle("table").color = mainText;
getStyle("subpages").borderColor = mainColor;
getStyle("topstripe").backgroundColor = myTopTabs;
getStyle("secbg").backgroundColor = secondaryColor;
getStyle ("mysearchbg").backgroundColor = mySearchBg;
getStyleBySelector("a:link").color = secondaryLink;
getStyleBySelector("a:visited").color = secondaryLink;
getStyleBySelector("a:hover").color = shadeColor(secondaryLink,0.15);

function drawPageName(inText,inExtra)
{
	attributes = "&label.text=" + inText;
	attributes += "&label.fill.color=" + secondaryText;
	attributes += "&label.dropshadow.color=" + myTopTabs;
	attributes += "&stage.color=" + secondaryColor;
	attributes += "&background.fill.color=" + secondaryColor;
 
	drawImage("/images/site/t95/en/images/pagename.img", attributes,inExtra);
}
function drawLabelColor(inText,inExtra)
{
	attributes =  "background.fill.color=" + mainColor;
	attributes += "&label.text=" + inText;
	attributes += "&stage.color=" + mainColor;
	attributes += "&label.fill.color=" + mainHeading;
	attributes += "&label.font=Arial";
	attributes += "&label.font.size=13";

	drawImage("/images/site/t95/en/images/label.img", attributes, inExtra);
}

function drawNumber(inText, inExtra, inBackground, inLabel)
{
	attributes =  "background.fill.color=" + inBackground;
	attributes += "&label.text=" + inText;
	attributes += "&label.fill.color=" + inLabel;
	attributes += "&stage.color=" + inBackground;

	drawImage("/images/site/t95/en/images/number.img", attributes, inExtra);
}

function drawLabel(inText, inExtra)
{
	attributes =  "background.fill.color=" + mainColor;
	attributes += "&label.text=" + inText;
	attributes += "&stage.color=" + mainColor;
	attributes += "&label.fill.color=" + mainText;

	drawImage("/images/site/t95/en/images/specialheading.img", attributes, inExtra);
}
function drawLabel2(inText, inExtra)
{
	attributes = "label.text=" + inText;
	attributes +=  "&background.fill.color=" + mainColor;
	attributes += "&label.fill.color=" + mainText;
	attributes += "&stage.color=" + mainColor;

	drawImage("/images/site/t95/en/images/label.img", attributes,inExtra);
}

function drawTopTabs(inText, inExtra)
{
	attributes =  "background.fill.color=" + myTopTabs;
//	attributes += "&label.data=" + inData;
	attributes += "&label.font.size=10";
	attributes += "&label.text=" + inText;
	attributes += "&label.fill.color=" + shadeColor(myTopTabs,0.65);
	attributes += "&rule.fill.color=" + secondaryColor;
	attributes += "&stage.color=" + myTopTabs;
    
	drawImage("/images/site/t95/en/images/toptabs.img", attributes, inExtra);
}

function drawButtons(inText, inExtra, inOpacity)
{
	attributes =  "button.fill.color=" + myTopTabs;
	attributes +=  "&background.fill.color=" + mainColor;
	attributes += "&label.text=" + inText;
	attributes += "&label.fill.color=" + shadeColor(myTopTabs,0.65);
	attributes += "&label.opacity=" + inOpacity;
	attributes += "&background.dropshadow.color=" + shadeColor(myTopTabs,0.20);
	attributes += "&stage.color=" + secondaryColor;

	drawImage("/images/site/t95/en/images/button.img", attributes, inExtra);
}

function drawInputButtons(inText, inName, inExtra)
{
	attributes =  "button.fill.color=" + myTopTabs;
	attributes +=  "&background.fill.color=" + mainColor;
	attributes += "&label.text=" + inText;
	attributes += "&label.fill.color=" + shadeColor(myTopTabs,0.65);
	attributes += "&background.dropshadow.color=" + shadeColor(myTopTabs,0.20);
	attributes += "&stage.color=" + secondaryColor;

	drawInputImage("/images/site/t95/en/images/button.img", attributes, inName, inExtra);
}

    function drawGoButtons(inName, inExtra)
{
	attributes =  "circle.fill.color=" + mainText;
	attributes +=  "&stage.color=" + mainColor;
	attributes +=  "&arrow.fill.color=" + mainColor;
	attributes +=  "&background.fill.color=" + mainText;

        drawInputImage("/images/site/t95/en/images/go.img", attributes, inName, inExtra);
}
function drawNavButtons()
{
	attributes = "stage.color=" + secondaryColor;
	attributes += "&label.fill.color=" + secondaryText;
	attributes += "&label.fill.color.over=" + secondaryLink;
	attributes += "&label.fill.color.selected=" + secondaryLink;
	attributes += "&label.fill.color.selectedover=" + secondaryText;
	attributes += "&arrow.fill.color=" + secondaryText;
	attributes += "&arrow.fill.color.over=" + secondaryLink;
	attributes += "&arrow.fill.color.selected=" + secondaryLink;
	attributes += "&arrow.fill.color.selectedover=" + secondaryText;
	attributes += "&line.fill.color=" + shadeColor(secondaryColor,0.15);

        drawTabs("vertical", 0, 0, "VSPACE=2 BORDER=0", attributes, "/images/site/t95/en/images/nav.img");
}
