
function create_scrolls(){

color1_val = document.scrollform.color1.value;
color2_val = document.scrollform.color2.value;
color3_val = document.scrollform.color3.value;
color4_val = document.scrollform.color4.value;
color5_val = document.scrollform.color5.value;
color6_val = document.scrollform.color6.value;

var html_code="";
html_code+='<script language="JavaScript" type="text/javascript">\n'; 
html_code+="<!--\n";
html_code+='function doscrolls(){\n';
html_code+='if (document.all && document.getElementById){\n'; 
html_code+='document.body.style.scrollbarBaseColor="'+color1_val+'";\n';
html_code+='document.body.style.scrollbarFaceColor="'+color2_val+'";\n';
html_code+='document.body.style.scrollbarArrowColor="'+color3_val+'";\n';
html_code+='document.body.style.scrollbarHighlightColor="'+color4_val+'";\n';
html_code+='document.body.style.scrollbarTrackColor="'+color5_val+'";\n';
html_code+='document.body.style.scrollbarShadowColor="'+color6_val+'";\n';
html_code+='}\n';
html_code+='}\n';
html_code+='// -->\n';
html_code+='<\/script>\n'; 

var finaltext="<!-- start style code -->\n\n"+html_code+"\n\n<!-- http://www.webdevtips.com/webdevtips/codegen/scroll.shtml -->\n<!-- end style code -->\n";
document.dothecode.codearea.value=finaltext;
}

function preview() {
if(document.dothecode.codearea.value==""){alert("Sorry, there is nothing to preview.\n\nPlease make sure you fill in all the fields then click on the Make the Code button\n\nThank You");return false;}
scrollme='<script language="JavaScript" type="text/javascript">doscrolls();<\/script>\n';

	msg=open("","","toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,width=400,height=200");
msg.document.write('<html><head><title>test page</title><style type=text/css>body,TD{font : 8pt verdana, sans-serif;}</style></head><body bgcolor=white><b>This is how your menu will appear in a browser.</b><hr><table bgcolor="#fffff5" border="1" width="95%" align="center"><tr><td align="center" valign="middle"><form><textarea cols="15" rows="3">This\nis how\nYour textarea\nwill look</textarea> </form><br><br><br> <br><br><br> <br> </td></tr></table><hr>');
msg.document.write('</body></html>'+document.dothecode.codearea.value+scrollme);
	return false;}



function change_it(num){
col_val=eval("document.scrollform.choice"+num+".options[document.scrollform.choice"+num+".selectedIndex].value;");
eval("document.scrollform.color"+num+".value=\""+col_val+"\"");
if(document.getElementById){
eval("document.getElementById('colorcell"+num+"').style.background='"+col_val+"';");
}
}

function change_it_custom(num){
col_val=eval("document.scrollform.color"+num+".value");
if(document.getElementById){
eval("document.getElementById('colorcell"+num+"').style.background='"+col_val+"';");
eval("document.scrollform.choice"+num+".options.selectedIndex=1;");
}
}
