\r\n'; form.hta.value=t; } } var noImg="Only JPEG (JPG) and GIF image files are supported.\r\nPlease select a different file."; var rem1="Remember to copy the file: "; var rem2="\r\ninto the same directory of your HTML page\r\nelse the script will not work"; function okImg0(form){ if(form.pimage0.value!=""){ var t=form.pimage0.value; var ext=t.substring(t.lastIndexOf(".")+1); if(ext=="jpg" || ext=="gif"){form.image0.value=form.pimage0.value.substring(form.pimage0.value.lastIndexOf("\\")+1);} else{alert(noImg);return;} } alert(rem1+form.image1.value+rem2); } function okImg1(form){ if(form.pimage1.value!=""){ var t=form.pimage1.value; var ext=t.substring(t.lastIndexOf(".")+1); if(ext=="jpg" || ext=="gif"){form.image1.value=form.pimage1.value.substring(form.pimage1.value.lastIndexOf("\\")+1);} else{alert(noImg);return;} } alert(rem1+form.image1.value+rem2); } function okImg2(form){ if(form.pimage2.value!=""){ var t=form.pimage2.value; var ext=t.substring(t.lastIndexOf(".")+1); if(ext=="jpg" || ext=="gif"){form.image2.value=form.pimage2.value.substring(form.pimage2.value.lastIndexOf("\\")+1);} else{alert(noImg);return;} } alert(rem1+form.image2.value+rem2); } function okImg3(form){ if(form.pimage3.value!=""){ var t=form.pimage3.value; var ext=t.substring(t.lastIndexOf(".")+1); if(ext=="jpg" || ext=="gif"){form.image3.value=form.pimage3.value.substring(form.pimage3.value.lastIndexOf("\\")+1);} else{alert(noImg);return;} } alert(rem1+form.image3.value+rem2); } function okImg4(form){ if(form.pimage4.value!=""){ var t=form.pimage4.value; var ext=t.substring(t.lastIndexOf(".")+1); if(ext=="jpg" || ext=="gif"){form.image4.value=form.pimage4.value.substring(form.pimage4.value.lastIndexOf("\\")+1);} else{alert(noImg);return;} } alert(rem1+form.image4.value+rem2); } function okImg5(form){ if(form.pimage5.value!=""){ var t=form.pimage5.value; var ext=t.substring(t.lastIndexOf(".")+1); if(ext=="jpg" || ext=="gif"){form.image5.value=form.pimage5.value.substring(form.pimage5.value.lastIndexOf("\\")+1);} else{alert(noImg);return;} } alert(rem1+form.image5.value+rem2); } function okImg6(form){ if(form.pimage6.value!=""){ var t=form.pimage6.value; var ext=t.substring(t.lastIndexOf(".")+1); if(ext=="jpg" || ext=="gif"){form.image6.value=form.pimage6.value.substring(form.pimage6.value.lastIndexOf("\\")+1);} else{alert(noImg);return;} } alert(rem1+form.image6.value+rem2); } // End -->