/*SlideShow version 1.6
* by Scott Anderson
* [email protected]
*
* This program fall under the jurisdiction
* of the GNU General Public Liscense, so
* basically USE IT AT YOUR OWN RISK. If you
* do decide to use it, please let us know.
* We all like to see our babies at work. -Scotty
*
* If your having problems setting up this script
* check out our new tutorial page at:
* http://www.weekendclimber.com/tutorials/
*/
//แก้ไขเฉพาะส่วนนี้เท่านั้นนะครับ แปลกันเอาเองครับ ง่ายๆ
var thumbs = 0; //Number of thumbnail pics
var pic_dir = ""; //Directory of the full pics
var pic_ext = ""; //Extension of the full pics
var place_hold = ""; //Place holder image (save in thumbnail directory `thumb_dir')
var thumb_dir = ""; //Directory of thumbnail pics
var thumb_ext = ""; //Etension of the thumbnail pics
//Don't edit below this unless
//you know what's up!
var thumb_img = new Array();
var full_imgtxt = new Array();
function Load_All() {
for ( i = 0; i < imgs.length; i++ ) {
thumb_img[ i ] = new Image();
thumb_img[ i ].src = thumb_dir + imgs[ i ] + thumb_ext;
full_imgtxt[ i ] = pic_dir + imgs[ i ] + pic_ext;}}
var pos = 0;
function Scroll_Thumb ( way ) {
if ( way == "next" ) pos += thumbs;
if ( pos >= imgs.length ) pos -= thumbs;
if ( way == "prev" ) pos -= thumbs;
if ( pos < 0 ) pos = 0;
for ( i = 0; i < thumbs; i++ ) {
var x = "thumb" + i;
var y = pos + i;
if ( thumb_img[ y ] != null ) {
document.getElementById( x ).src = thumb_img[ y ].src;
} else {
document.getElementById( x ).src = thumb_dir + place_hold;}}}
function GotoFrame( num ) {
if ( num + pos < imgs.length ) {
document.getElementById( "picture" ).src = full_imgtxt[ num + pos ];}}