// JavaScript Document

var curFrameColor='blauw';
var curStuurColor='wit';
var curZadelColor='wit';
var curStickerColor='wit';
var curGripColor='wit';
var curWielColor='zwart';

var curFrame='passion';
var curStuur='stuur1';
var curZadel='zadel1';
var curSticker='sticker';
var curWiel='1056';
var curOverbrenging='';

var priceFrame = 0;
var priceStuur = 0;
var priceZadel = 0;
var priceWiel = 0;
var priceSticker = 0;
var priceOverbrenging = 0;
var totalPrice = 0;

//-----------------------zorgt voor de rand om de kleurkiezer bij mouseover en out
var boxColor = '';
function setBorder(e)
{
	boxColor = e.style.borderColor;
	e.style.borderColor = '#FFF';
}
function setOldBorder(e)
{
	e.style.borderColor = boxColor;
}
//------------------------end

//-----------------------zorgt voor de achtergrondkleur van de thumbs bij mouseover en out

function setBack(e)
{
	e.style.backgroundColor = '#111';
}
function setOldBack(e)
{
	e.style.backgroundColor = '';
}
//------------------------end

//------------------------wisselt de kleur van het onderdeel per functie
function setFrameColor(color)
{
	document.getElementById('frame').innerHTML = '<img src="images/conf/'+curFrame+'_'+color+".png"+'" />';
	curFrameColor = color;
}
function setStickerColor(color)
{
	if(curFrame == "passion")
	{
		document.getElementById('sticker').innerHTML = '<img src="images/conf/'+curFrame+'_'+color+'_'+curSticker+'.png" />';
	}
	else if(curFrame == "vogue")
	{
		document.getElementById('sticker').innerHTML = '<img style="margin-top:22px;margin-left:38px;" src="images/conf/'+curFrame+'_'+color+'_'+curSticker+'.png" />';
	}
	else if(curFrame == "vs")
	{
		document.getElementById('sticker').innerHTML = '<img style="margin-top:15px;margin-left:52px;" src="images/conf/'+curFrame+'_'+color+'_'+curSticker+'.png" />';
	}
	curStickerColor = color;
}
function setGripColor(color)
{
	document.getElementById('stuur').innerHTML = '<img width="445" height="275" src="images/conf/'+curFrame+'_'+color+'_'+curStuur+'.png" />';

	if(curStuur == 'stuur1')
	{
		document.getElementById('stuur').innerHTML = '<img width="445" height="275" src="images/conf/'+curFrame+'_'+color+'_'+curStuur+'.png" />';
	}
	else if(curStuur == 'stuur2')
	{
		document.getElementById('stuur').innerHTML = '<img width="445" height="275" style="margin-left:4px;" src="images/conf/'+curFrame+'_'+color+'_'+curStuur+".png"+'" />';
	}

	curGripColor = color;
}
function setZadelColor(color)
{
	document.getElementById('zadel').innerHTML = '<img width="445" height="275" src="images/conf/'+curFrame+'_'+color+'_'+curZadel+'.png" />';
	curZadelColor = color;
}
//------------------------end


//------------------------wisselt de kleur van het onderdeel per functie
function setFrame(type)
{
	document.getElementById('frame').innerHTML = '<img src="images/conf/'+type+'_'+curFrameColor+".png"+'" />';
	curFrame = type;
	setSticker('sticker');
	setZadel(curZadel);
}
function setStuur(type)
{
	if(type == 'stuur1')
	{
		document.getElementById('stuur').innerHTML = '<img width="445" height="275" src="images/conf/'+curFrame+'_'+curGripColor+'_'+type+".png"+'" />';
	}
	else if(type == 'stuur2')
	{
		document.getElementById('stuur').innerHTML = '<img width="445" height="275" style="margin-left:4px;" src="images/conf/'+curFrame+'_'+curGripColor+'_'+type+".png"+'" />';
	}
	curStuur = type;
}
function setZadel(type)
{
	document.getElementById('zadel').innerHTML = '<img width="445" height="275" src="images/conf/'+curFrame+'_'+curZadelColor+'_'+type+".png"+'" />';
	curZadel = type;
}
function setSticker(type)
{
	if(curFrame == "passion")
	{
		document.getElementById('sticker').innerHTML = '<img src="images/conf/'+curFrame+'_'+curStickerColor+'_'+type+".png"+'" />';
	}
	else if(curFrame == "vogue")
	{
		document.getElementById('sticker').innerHTML = '<img style="margin-top:22px;margin-left:38px;" src="images/conf/'+curFrame+'_'+curStickerColor+'_'+type+".png"+'" />';
	}
	else if(curFrame == "vs")
	{
		document.getElementById('sticker').innerHTML = '<img style="margin-top:15px;margin-left:52px;" src="images/conf/'+curFrame+'_'+curStickerColor+'_'+type+".png"+'" />';
	}
	curSticker = type;
}
function setWiel(type)
{
	document.getElementById('wielen').innerHTML = '<img width="445" height="276" src="images/conf/'+curFrame+'_'+type+'_'+curWielColor+'.png" />';
	curWiel = type;
}
function setWielColor(color)
{
	document.getElementById('wielen').innerHTML = '<img width="445" height="276" src="images/conf/'+curFrame+'_'+curWiel+'_'+color+'.png" />';
	curWielColor = color;
}
//------------------------end




