function obliterate ( inselect ) { if ( inselect.options.length > 1 ) {  while ( inselect.length > 1 ) { inselect.options[1] = null; }  inselect.selectedIndex = 0;} }function showColor( inselect ) {	var color = inselect.options[inselect.selectedIndex].value;	if (color == 'Gray') {		changeBeauty(2);	}else if (color == 'Fuchsia') {		changeBeauty(3);	}else if (color == 'Indigo') {		changeBeauty(4);	}else if (color == 'Green') {		changeBeauty(5);	}else if (color == 'Grape') {		changeBeauty(6);	}else if (color == 'Black') {		changeBeauty(7);	}}function buildlist ( inselect, optionlist ) { var cloc, cloc2 = 0; var portion     = ''; while ( optionlist.length > 0 ) {  cloc = optionlist.indexOf( '|' );  if ( cloc == -1 ) { cloc = optionlist.length; }  portion = optionlist.substring( 0, cloc );  cloc2   = portion.indexOf( ':' );  var foo = new Option( portion.substring( (cloc2 + 1), portion.length ), portion.substring( 0, cloc2 ) );  inselect.options[inselect.options.length] = foo;  if ( optionlist.indexOf ( '|' ) != -1 ) { optionlist = optionlist.substring( ( cloc + 1 ), optionlist.length ); }  else { optionlist = ''; }} }function handlesize ( inselect ) {	obliterate( document.whatamess.colorpick );	var thissize = inselect.options[inselect.selectedIndex].value;	var choices = '';	if ( thissize == '1' ) {		choices = 'Gray:Gray|Fuchsia:Fuchsia|Indigo:Indigo|Green:Green|Grape:Grape|Black:Black';	}	else if ( thissize == '2' ) {		choices = 'Gray:Gray|Fuchsia:Fuchsia|Indigo:Indigo|Green:Green|Grape:Grape|Black:Black';	}	else if ( thissize == '3' ) {		choices = 'Gray:Gray|Fuchsia:Fuchsia|Indigo:Indigo|Green:Green|Grape:Grape|Black:Black';	}	else if ( thissize == '4' ) {		choices = 'Gray:Gray';	}	else if ( thissize == '5' ) {		choices = 'Gray:Gray';	}	else if ( thissize == '6' ) {		choices = 'Gray:Gray';	}	else if ( thissize == '7' ) {		choices = 'Gray:Gray';	}	else if ( thissize == '8' || thissize == '9' || thissize == '10' || thissize == '11') {		choices = 'Gray:Gray|Fuchsia:Fuchsia|Indigo:Indigo|Green:Green|Grape:Grape|Black:Black';	}	buildlist( document.whatamess.colorpick,choices);}function resetfields (  ) {  document.whatamess.sizepick.selectedIndex = 0;  document.whatamess.colorpick.selectedIndex = 0;}function generate_fields ( inform ) {  var thiscolor = inform.colorpick.options[inform.colorpick.selectedIndex].value;  var thissize  = inform.sizepick.options[inform.sizepick.selectedIndex].value;  var sku = '';  // a conditional H*A*C*K - array not worth the effort  if ( thiscolor == 'Gray' )  {  	if (thissize == '1') { inform.ProdId.value = '13409'; }  	if (thissize == '2') { inform.ProdId.value = '13408'; }	if (thissize == '3') { inform.ProdId.value = '13406'; }	if (thissize == '4') { inform.ProdId.value = '13402'; }	if (thissize == '5') { inform.ProdId.value = '13403'; }	if (thissize == '6') { inform.ProdId.value = '13405'; }	if (thissize == '7') { inform.ProdId.value = '13407'; }	if (thissize == '8') { inform.ProdId.value = '13426'; }	if (thissize == '9') { inform.ProdId.value = '13438'; }	if (thissize == '10') { inform.ProdId.value = '13432'; }	if (thissize == '11') { inform.ProdId.value = '13444'; }  }     if ( thiscolor == 'Fuchsia' )  {  	if (thissize == '1') { inform.ProdId.value = '13410'; }  	if (thissize == '2') { inform.ProdId.value = '13411'; }  	if (thissize == '3') { inform.ProdId.value = '13412'; }  	if (thissize == '8') { inform.ProdId.value = '13427'; }	if (thissize == '9') { inform.ProdId.value = '13439'; }	if (thissize == '10') { inform.ProdId.value = '13433'; }	if (thissize == '11') { inform.ProdId.value = '13445'; }  }    if ( thiscolor == 'Indigo' )  {  	if (thissize == '1') { inform.ProdId.value = '13413'; }	if (thissize == '2') { inform.ProdId.value = '13414'; }  	if (thissize == '3') { inform.ProdId.value = '13415'; }  	if (thissize == '8') { inform.ProdId.value = '13428'; }	if (thissize == '9') { inform.ProdId.value = '13440'; }	if (thissize == '10') { inform.ProdId.value = '13434'; }	if (thissize == '11') { inform.ProdId.value = '13446'; }  }   if ( thiscolor == 'Green' )  {  	if (thissize == '1') { inform.ProdId.value = '13416'; }  	if (thissize == '2') { inform.ProdId.value = '13417'; }  	if (thissize == '3') { inform.ProdId.value = '13418'; }  	if (thissize == '8') { inform.ProdId.value = '13429'; }	if (thissize == '9') { inform.ProdId.value = '13441'; }	if (thissize == '10') { inform.ProdId.value = '13435'; }	if (thissize == '11') { inform.ProdId.value = '13447'; }  }  if ( thiscolor == 'Grape' )  {  	if (thissize == '1') { inform.ProdId.value = '13423'; }	if (thissize == '2') { inform.ProdId.value = '13424'; }  	if (thissize == '3') { inform.ProdId.value = '13425'; }  	if (thissize == '8') { inform.ProdId.value = '13430'; }	if (thissize == '9') { inform.ProdId.value = '13442'; }	if (thissize == '10') { inform.ProdId.value = '13436'; }	if (thissize == '11') { inform.ProdId.value = '13448'; }  }  if ( thiscolor == 'Black' )  {  	if (thissize == '1') { inform.ProdId.value = '13420'; }	if (thissize == '2') { inform.ProdId.value = '13421'; }  	if (thissize == '3') { inform.ProdId.value = '13422'; }  	if (thissize == '8') { inform.ProdId.value = '13431'; }	if (thissize == '9') { inform.ProdId.value = '13443'; }	if (thissize == '10') { inform.ProdId.value = '13437'; }	if (thissize == '11') { inform.ProdId.value = '13449'; }  }}function handleform ( inform ) { var errmsg = '';  if ( inform.sizepick.selectedIndex < 1 ) { errmsg += '\n   - Size'; } if ( inform.colorpick.selectedIndex < 1 ) { errmsg += '\n   - Color'; }// NB: secondary conditional statements below are due to NN 4.x hack if ( errmsg ) { alert ('Please choose the following before purchasing:' + errmsg); return false; } else { generate_fields( inform ); return true; }}