I've just written getElementById lots of times 
How do I get a variable to carry over between functions?
Code:
function createcolour(colour){
//alert(colour);
document.getElementById('previewcolour').src = 'original/'+colour+'.jpg';
}
function bold(boldcolour){
//alert(boldcolour+'ww');
document.getElementById('black').style.fontWeight = 'normal';
document.getElementById('red').style.fontWeight = 'normal';
document.getElementById('orange').style.fontWeight = 'normal';
document.getElementById('yellow').style.fontWeight = 'normal';
document.getElementById('green').style.fontWeight = 'normal';
document.getElementById('blue').style.fontWeight = 'normal';
document.getElementById('purple').style.fontWeight = 'normal';
document.getElementById(boldcolour).style.fontWeight = 'bold';
document.getElementById('previewstyle').src = 'original/'+boldcolour+'.jpg';
var colour=boldcolour
}
function createstyle(style){
alert(colour);
//document.getElementById('previewstyle').src = style+'/'+colour+'.jpg';
}
I want the variable "boldcolour" in the second function to be "colour" in the third function.
~Callum
Edit:
Here is the updated code:
Index.php:
HTML Code:
<p><a class="colour" id="black" onMouseOver="createcolour('black')" style="font-weight:bold" onclick="bold('black')">Black</a> -
<a class="colour" id="red" onMouseOver="createcolour('red')" onclick="bold('red')">Red</a> -
<a class="colour" id="orange" onMouseOver="createcolour('orange')" onclick="bold('orange')">Orange</a> -
<a class="colour" id="yellow" onMouseOver="createcolour('yellow')" onclick="bold('yellow')">Yellow</a> -
<a class="colour" id="green" onMouseOver="createcolour('green')" onclick="bold('green')" weight="bold">Green</a> -
<a class="colour" id="blue" onMouseOver="createcolour('blue')" onclick="bold('blue')">Blue</a> -
<a class="colour" id="purple" onMouseOver="createcolour('purple')" onclick="bold('purple')">Purple</a></p>
<img src="original/black.jpg" id="previewcolour" alt="" />
<?php endBox() ?>
<br />
<?php startBox("Step Two: Choose style"); ?>
<p><a id="original" onMouseOver="createstyle('original')" onclick="select('original')" style="font-weight:bold">Original</a> -
<a id="deepCut" onMouseOver="createstyle('deepCut')" onclick="select('deepCut')">Deep Cut</a> -
<a id="sineMachine" onMouseOver="createstyle('sineMachine')" onclick="select('sineMachine')">Sine Machine</a></p>
<img src="original/black.jpg" id="previewstyle" alt="" />
<?php endBox() ?>
<br />
<?php startBox("Step Three: Enter text"); ?>
<form action="image.php" method="get" id="makeown">
<table style="width:800px; border:0px white solid">
<tr>
<td>
<table style="width:100%; border:0px white solid">
<tr>
<td style="text-align:right"><b>Name</b></td>
<td><input type="text" size="50" name="name" id="name" style="font-family:'Courier New', Courier, monospace" /></td>
</tr>
<tr>
<td style="text-align:right"><b>Line 1 Text</b></td>
<td><input type="text" size="50" name="line1" id="line1" style="font-family:'Courier New', Courier, monospace" /></td>
</tr>
<tr>
<td style="text-align:right"><b>Line 2 Text</b></td>
<td><input type="text" size="50" name="line2" id="line2" style="font-family:'Courier New', Courier, monospace" /></td>
</tr>
<tr>
<td style="text-align:right"> </td>
<td><input type="button" value="Make Image" onclick="process()" /></td>
</tr>
</table>
</form>
</td>
</tr>
<tr>
<td><img src="image.php?name=NAME&line1=Line1&line2=Line2" style="width:369px; height:30px" alt="Example Signature Bar" id="previewImage" /></td>
</tr>
</table>
<?php endBox() ?>
<br />
<?php startBox("Step Four: Copy into your signature"); ?>
<p>Now you can copy and paste your sigbar into a forum, blog or your website.</p>
<table>
<tr>
<td style="text-align:right"><b>HTML (for websites)</b></td>
<td><input type="text" name="urlhtml" id="url" size="50" /></td>
</tr>
<tr>
<td style="text-align:right"><b>BB Code (for most forums)</b></td>
<td><input type="text" name="urlbb" id="urb" size="50" /></td>
</tr>
</table>
script.js:
Code:
function createcolour(colour){
document.getElementById('previewcolour').src = 'original/'+colour+'.jpg';
}
function bold(boldcolour){
document.getElementById('black').style.fontWeight = 'normal';
document.getElementById('red').style.fontWeight = 'normal';
document.getElementById('orange').style.fontWeight = 'normal';
document.getElementById('yellow').style.fontWeight = 'normal';
document.getElementById('green').style.fontWeight = 'normal';
document.getElementById('blue').style.fontWeight = 'normal';
document.getElementById('purple').style.fontWeight = 'normal';
document.getElementById(boldcolour).style.fontWeight = 'bold';
document.getElementById('previewstyle').src = 'original/'+boldcolour+'.jpg';
document.getElementById('previewtext').src = 'original/'+boldcolour+'.jpg';
var colour=boldcolour; //doesn't work, needs to make a variable called colour for the next function
}
function createstyle(style){
document.getElementById('previewstyle').src = style+'/black.jpg';
}
function select(boldstyle){
document.getElementById('original').style.fontWeight = 'normal';
document.getElementById('deepCut').style.fontWeight = 'normal';
document.getElementById('sineMachine').style.fontWeight = 'normal';
document.getElementById(boldstyle).style.fontWeight = 'bold';
document.getElementById('previewImage').src = 'image.php?name=NAME&line1=Line1&line2=Line2&style='+boldstyle+'&colour='+boldcolour;
var style=boldstyle; //doesn't work, needs to make a variable called colour for the next function
}
function process(){
function process(){
var name = document.getElementById('name').value;
var line1 = document.getElementById('line1').value;
var line2 = document.getElementById('line2').value;
var sigbarurl = 'image.php?name='+name+'&line1='+line1+'&line2='+line2+'&colour='+colour+'&style='style;
var linkurl = 'http://paperhub.x10hosting.com/sigbar/';
document.getElementById('previewImage').src = sigbarurl
document.getElementById('urlhtml').value = '<a href="'+linkurl+'"><img src="' + sigbarurl + '" /></a>';
document.getElementById('urlbb').value = '[img]' + sigbarurl + '[/img]';
}
I can't work out how to get the variables between statuses 
~Callum