// JavaScript Document

<!-- Begin Functionality of navigation -->

<!--
function toggleDiv(id,flagit) {
if (flagit=="1"){
if (document.layers) document.layers[''+id+''].visibility = "show"
else if (document.all) document.all[''+id+''].style.visibility = "visible"
else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "visible"
}
else
if (flagit=="0"){
if (document.layers) document.layers[''+id+''].visibility = "hide"
else if (document.all) document.all[''+id+''].style.visibility = "hidden"
else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "hidden"
}
}

//-->

<!-- End Functionality of navigation -->


<!-- Begin Image change on refesh -->

// Set up the image files to be used.
var theImages = new Array() // do not change this

theImages[0] = 'images/pic_hp.gif'
theImages[1] = 'images/pic2_hp.gif'
theImages[2] = 'images/pic3_hp.gif'

var theImages = new Array(
	Array('images/pic_hp.gif','images/hp_qoute.gif'),
	Array('images/pic2_hp.gif','images/hp_qoute2.gif'),
	Array('images/pic3_hp.gif','images/hp_qoute3.gif')
);

// do not edit anything below this line

var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i][0]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
var finalHtml = '';
finalHtml += '';
finalHtml += '<div class="qoute" align="center">';
finalHtml +='<img src="'+theImages[whichImage][1]+'">';
finalHtml += '</div><div class="hp_pic">';
finalHtml +='<img src="'+theImages[whichImage][0]+'">';
finalHtml += '<div>';
document.write (finalHtml);
}

//  End Image change on refesh -->




<!-- Start Code below is the code for the subnavigation to change on hover -->

<!--

  if (document.images)
   {
     pic1on= new Image(100,25);
     pic1on.src="images/sub_black_1.gif";  
     pic1off= new Image(100,25);
     pic1off.src="images/sub_one.gif";
	 
	 pic2on= new Image(100,25);
     pic2on.src="images/sub_black_2.gif";  
     pic2off= new Image(100,25);
     pic2off.src="images/sub_two.gif";
	 
	 pic3on= new Image(100,25);
     pic3on.src="images/sub_black_3.gif";  
     pic3off= new Image(100,25);
     pic3off.src="images/sub_three.gif";
	 
	 pic4on= new Image(100,25);
     pic4on.src="images/sub_black_4.gif";  
     pic4off= new Image(100,25);
     pic4off.src="images/sub_four.gif";

	 pic5on= new Image(100,25);
     pic5on.src="images/sub_black_5.gif";  
     pic5off= new Image(100,25);
     pic5off.src="images/sub_five.gif";
	 
	 pic6on= new Image(100,25);
     pic6on.src="images/sub_black_6.gif";  
     pic6off= new Image(100,25);
     pic6off.src="images/sub_six.gif";
	 
	 pic7on= new Image(100,25);
     pic7on.src="images/sub_black_7.gif";  
     pic7off= new Image(100,25);
     pic7off.src="images/sub_seven.gif";
	 
	 pic8on= new Image(100,25);
     pic8on.src="images/sub_black_8.gif";  
     pic8off= new Image(100,25);
     pic8off.src="images/sub_eleven.gif";
	 
	 pic9on= new Image(100,25);
     pic9on.src="images/sub_black_9.gif";  
     pic9off= new Image(100,25);
     pic9off.src="images/sub_12.gif";
	 
	 pic10on= new Image(100,25);
     pic10on.src="images/sub_black_10.gif";  
     pic10off= new Image(100,25);
     pic10off.src="images/sub_13.gif";
	 
	 pic11on= new Image(100,25);
     pic11on.src="images/sub_black_11.gif";  
     pic11off= new Image(100,25);
     pic11off.src="images/sub_14.gif";
	 
	 pic12on= new Image(100,25);
     pic12on.src="images/sub_black_12.gif";  
     pic12off= new Image(100,25);
     pic12off.src="images/sub_15.gif";
	 
	 pic13on= new Image(100,25);
     pic13on.src="images/sub_black_13.gif";  
     pic13off= new Image(100,25);
     pic13off.src="images/sub_16.gif";
	 
	 pic14on= new Image(100,25);
     pic14on.src="images/sub_black_14.gif";  
     pic14off= new Image(100,25);
     pic14off.src="images/sub_18.gif";
	 
	 	 
	 pic15on= new Image(100,25);
     pic15on.src="images/sub_black_15.gif";  
     pic15off= new Image(100,25);
     pic15off.src="images/sub_19.gif";
	 
	 pic16on= new Image(100,25);
     pic16on.src="images/sub_black_16.gif";  
     pic16off= new Image(100,25);
     pic16off.src="images/sub_20.gif";
	 
	 pic17on= new Image(100,25);
     pic17on.src="images/sub_black_17.gif";  
     pic17off= new Image(100,25);
     pic17off.src="images/sub_21.gif";
	 
	 pic18on= new Image(100,25);
     pic18on.src="images/sub_black_18.gif";  
     pic18off= new Image(100,25);
     pic18off.src="images/sub_22.gif";
	 
	 pic19on= new Image(100,25);
     pic19on.src="images/sub_black_19.gif";  
     pic19off= new Image(100,25);
     pic19off.src="images/sub_23.gif";
	 
	 pic20on= new Image(100,25);
     pic20on.src="images/sub_black_20.gif";  
     pic20off= new Image(100,25);
     pic20off.src="images/sub_24.gif";
	 
	 pic21on= new Image(100,25);
     pic21on.src="images/sub_black_21.gif";  
     pic21off= new Image(100,25);
     pic21off.src="images/sub_25.gif";
     
     pic22on= new Image(100,25);
     pic22on.src="images/sub_black_22.gif";  
     pic22off= new Image(100,25);
     pic22off.src="images/sub_26.gif";
	 
   }

function lightup(imgName)
 {
   if (document.images)
    {
      imgOn=eval(imgName + "on.src");
      document[imgName].src= imgOn;
    }
 }

function turnoff(imgName)
 {
   if (document.images)
    {
      imgOff=eval(imgName + "off.src");
      document[imgName].src= imgOff;
    }
 }

//-->

<!-- End Code below is the code for the subnavigation to change on hover -->



<!-- Start of the code for the functionality of the gallery on the gallery page -->

var pic_arr = new Array (
    new Array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83)
);
/*
var title_arr = new Array (
    new Array('rotating smurf 5','rotating smurf 4','rotating smurf 3','rotating smurf 2','rotating smurf 1')
);
var blurb_arr = new Array (
    new Array('smurf 5 smurf 5 smurf 5 smurf 5 smurf 5 smurf 5 smurf 5 smurf 5 smurf 5 smurf 5 smurf 5 smurf 5 smurf 5 smurf 5 smurf 5 smurf 5 smurf 5 </strong>','smurf 4 smurf 4 smurf 4 smurf 4 smurf 4 smurf 4 smurf 4 smurf 4 smurf 4 smurf 4 smurf 4 smurf 4 smurf 4 smurf 4 v</strong>','smurf 3 smurf 3 smurf 3 smurf 3 smurf 3 smurf 3 smurf 3 smurf 3 smurf 3 smurf 3 smurf 3 smurf 3 smurf 3 smurf 3 smurf 3 smurf 3 smurf 3 v</strong>','smurf 2 smurf 2 smurf 2 smurf 2 smurf 2 smurf 2 smurf 2 smurf 2 smurf 2 smurf 2 smurf 2 v</strong>','smurf 1 smurf 1 smurf 1 smurf 1 smurf 1 smurf 1 smurf 1 smurf 1 smurf 1 smurf 1 smurf 1 smurf 1 smurf 1 smurf 1 smurf 1 smurf 1 smurf 1 </strong>')
);
var link_arr = new Array (
    new Array('<img src="/images/bullet.gif" width="12" height="12" border="0" alt="" title="" class="v_align" /> <a href="http://www.smurf5.com"  target="new" >Read More</a>','<img src="/images/bullet.gif" width="12" height="12" border="0" alt="" title="" class="v_align" /> <a href="http://www.smurf4.com"  target="new" >Read More</a>','<img src="/images/bullet.gif" width="12" height="12" border="0" alt="" title="" class="v_align" /> <a href="http://www.smurf3.com" >Read More</a>','<img src="/images/bullet.gif" width="12" height="12" border="0" alt="" title="" class="v_align" /> <a href="http://www.smurf2.com"  target="new" >Read More</a>','<img src="/images/bullet.gif" width="12" height="12" border="0" alt="" title="" class="v_align" /> <a href="http://www.smurf1.com"  target="new" >Read More</a>')
);

var url_arr = new Array (
    new Array()
);

var rel_url_arr = new Array (
    new Array()
);
*/


var gall_names = new Array ( 
    ''
);
function high_l(g,img_index){
    for(var i = 0;i < pic_arr.length; i++){
        if(g == i){
            ActiveGal = i;
            PicCurrentNum = img_index; 
            howMany = pic_arr[ActiveGal].length;
            
            change_it(i,PicCurrentNum);
            
            stopPix();
        }
    }
}
var ActiveGal = 0;
var PicCurrentNum = 0; 
var howMany = pic_arr[ActiveGal].length;


// change delay time in seconds 
var timeDelay = 5; 
var slideon = 'off';
var showtime = '';
timeDelay *= 1000; 




var PicCurrent = new Image(); 
PicCurrent.src = pic_arr[PicCurrentNum];

//alert(pic_arr[PicCurrentNum]);

function startPix() { 
    showtime = setInterval("slideshow()", timeDelay);
    document.getElementById('startstop').src = 'images/pause.gif';
    document.getElementById('startstoplink').href = 'javascript:startPix();';
}

function stopPix(){
    clearInterval(showtime);
    document.getElementById('startstop').src = 'images/play.gif';
}

function startstopPix(){
    if(showtime != ''){
        document.getElementById('startstop').src = 'images/play.gif';
        clearInterval(showtime);
        showtime = '';
    }else{
        document.getElementById('startstop').src = 'images/pause.gif';
        showtime = setInterval("slideshow()", timeDelay);   
    }   
}

function slideshow() {
    //alert(PicCurrentNum);
    PicCurrentNum++; 
    if (PicCurrentNum == howMany) { 
        PicCurrentNum = 0; 
    }
    change_it(ActiveGal,PicCurrentNum);
}

function slideback() { 
    if (PicCurrentNum == 0) { 
        PicCurrentNum = (howMany -1); 
    }else{
        PicCurrentNum--;
    } 
    change_it(ActiveGal,PicCurrentNum);
}

function show_count(){
    document.getElementById('gal_count').innerHTML = 'showing: ' + (PicCurrentNum + 1) + ' of ' + howMany;
}

function change_it(i,ii){

	PicCurrent.src = 'images/gallery/limpopo_2009/big/pic' + pic_arr[i][ii] + '.jpg';
	document.getElementById('the_img').src = PicCurrent.src;
/*
    var bg_img = 'url(/db_images/' + pic_arr[i][ii] + '_186x186.jpg)';     
    document.getElementById('the_img').style.background = bg_img;

    document.getElementById('the_title').innerHTML = title_arr[i][ii];
    document.getElementById('the_blurb').innerHTML = blurb_arr[i][ii];
    document.getElementById('the_link').innerHTML = link_arr[i][ii];
    
    set_indicator((ii+1));
*/	
}
function set_indicator(i){
    for(x = 1;x <= 5;x++){
        document.getElementById('rotate_button_' + x).className = 'rotate_button_off';
    }
    document.getElementById('rotate_button_' + i).className = 'rotate_button_on';
    //alert(i);
}




<!-- End of the code for the functionality of the gallery on the gallery page -->
