function obliterate ( inselect ) { if ( inselect.options.length > 1 ) {  while ( inselect.length > 1 ) { inselect.options[1] = null; }  inselect.selectedIndex = 0;} }function showModel( inselect ) {	var sku = inselect.options[inselect.selectedIndex].value;	if (sku == '13380' || sku == '13390' || sku == '13104') {		changeBeauty(7);	}else if (sku == '13379' || sku == '13193') {		changeBeauty(4);	}else if (sku == '13343' || sku == '13105') {		changeBeauty(9);	}else if (sku == '13189') {		changeBeauty(8);	}else if (sku == '13188') {		changeBeauty(5);	}else if (sku == '13191') {		changeBeauty(2);	}else if (sku == '13187') {		changeBeauty(6);	}else if (sku == '13192') {		changeBeauty(3);	}else if (sku == '13190') {		changeBeauty(1);	}}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 = '13380:Anti-Glare (full front) $12.95|13379:Anti-Glare (display only) $12.95|13390:Transparent (full front) $9.95|13193:Transparent (display only) $9.95|13104:Mirror (full front) $12.95';	}	if ( thissize == '2' ) {		choices = '13343:Anti-Glare (full front) $12.95|13379:Anti-Glare (display only) $12.95|13189:Transparent (full front/back) $14.95|13193:Transparent (display only) $9.95|13105:Mirror (full front) $12.95';	}	else if ( thissize == '3' ) {		choices = '13188:classic (6/7 Gen) Transparent $9.95|13191:5th Gen Transparent $6.95';	}	else if ( thissize == '4' ) {		choices = '13187:nano 3rd Gen Transparent $9.95|13192:nano 2nd Gen Transparent $6.95|13190:nano 1st Gen Transparent $6.95';	}	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 sku = '';  // a conditional H*A*C*K - array not worth the effort	inform.ProdId.value = thiscolor; }function handleform ( inform ) { var errmsg = '';  if ( inform.sizepick.selectedIndex < 1 ) { errmsg += '\n   - iPod family'; } if ( inform.colorpick.selectedIndex < 1 ) { errmsg += '\n   - Model'; }// 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; }}