function flash(file, w, h){
   document.write('<object style="display:block;" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' +w+ '" height="' +h+ '">\n');
   document.write('<param name="movie" value="flash/' +file+ '.swf" />\n');
   document.write('<param name="quality" value="high" />\n');
   document.write('<param name="scale" value="noborder" />\n');
   document.write('<param name="wmode" value="transparent" />\n');
   document.write('<embed src="flash/' +file+ '.swf" wmode="transparent" quality="high" width="' +w+ '" height="' +h+ '"></embed>\n');
   document.write('</object>\n');
}



function h1_flash(id) {
	var text = document.getElementById(id).innerHTML;
	document.getElementById(id).innerHTML = h1_output(text);	
}

function h1_output(text){

	var output ='<object style="display: block;" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="412" height="31">'+
				'<param name="flashvars" value="h1text=' + text + '" />'+
				'<param name="movie" value="flash/h1_text.swf" />'+
				'<param name="quality" value="high" />'+
				'<param name="scale" value="noborder" />'+
				'<param name="wmode" value="transparent" />'+
				'<embed flashvars="h1text=' + text + '" src="flash/h1_text.swf" wmode="transparent" quality="high" width="412" height="31"></embed>'+
				'</object>';
	
	return output;

}



function img_switch(id, url){

	document.getElementById(id).src='images/bikes/' +url+ '.jpg';

}



var div = ''; // must be set outside the function so it is global //
function showdiv(id){

	if(div){
		document.getElementById(div).style.display = "none";
	}

	if(id && document.getElementById(id)){
		document.getElementById(id).style.display = "block";
		div = id;
	}

}