");
//start the portion the copy button will copy
win_doc.write("");
//print the corresponding flags selected by the user in the options section
print_flags(OpenWindow, form_dna);
//select the courier font since it aligns the characters each the same
win_doc.write("");
//print the sequences to fit the window: screen_width in width...
for( index=1; (index*width) <= form_dna.length; index++ ) {
//if the user wishes to display the nucleic acid...
if( options.display_NA.checked == true ){
//if the user wishes to see the leading base position...
if( options.display_width.checked == true ) {
win_doc.write( format_number_dna((index-1)*width) );
}
win_doc.write( form_dna.substring((index-1)*width,(index*width))," " );
}
//if the user wishes to display the protein sequence...
if( options.display_protein.checked == true ) {
//print appropriate spaces for the protein, get protein sequence,
//clean it, and print it to the screen...
//if the user wishes to see the leading base position, need to include extra spaces...
if( options.display_width.checked == true ) {
win_doc.write( format_number_protein() );
}
//get appropriate protein sequence and print it...
protein_slice = clean_protein_seq(form_protein.substring((index-1)*width,(index*width)) );
win_doc.write( protein_slice," " );
}
//print an extra line to make it look nice on the screen
win_doc.write(" ");
}
//if the dna sequence is not an exact multiple of screen_width, print the remaining sequence...
if( form_dna.length%width != 0 ) {
//if the user wishes to display the nucleic acid...
if( options.display_NA.checked == true ){
//if the user wishes to see the leading base position...
if( options.display_width.checked == true ) {
win_doc.write( format_number_dna((index-1)*width) );
}
//print the nucleic acid sequence
win_doc.write( form_dna.substring((index-1)*width,form_dna.length)," " );
}
//if the user wishes to display the protein sequence...
if( options.display_protein.checked == true ) {
//if the user wishes to see the leading base position, add in appropriate spaces...
if( options.display_width.checked == true ) {
win_doc.write( format_number_protein() );
}
//print protein sequence
protein_slice = clean_protein_seq( form_protein.substring((index-1)*width,form_protein.length) );
win_doc.write( protein_slice," " );
}
//add in an extra line break
win_doc.write( " ");
}
//write remaining HTML form...
win_doc.write("");
win_doc.write("");
win_doc.write("");
win_doc.write("");
//throw in a couple more buttons at the bottom...
win_doc.write("