function toggleLayer ( elemID )
{
  var elem, vis;
  if( document.getElementById ) // this is the way the standards work
    elem = document.getElementById( elemID );
  else if( document.all ) // this is the way old msie versions work
      elem = document.all[elemID];
  else if( document.layers ) // this is the way nn4 works
    elem = document.layers[elemID];
  vis = elem.style;
  // if the style.display value is blank we try to figure it out here
  if( vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined )
    	vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
  		vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}

function toggleDivOL( elemID )
{
	var elem = document.getElementById( elemID );
	if( elem.style.position != 'absolute' )
	{
		elem.style.position = 'absolute';
		elem.style.left = '-4000px';
	}
	else
	{
		elem.style.position = 'relative';
		elem.style.left = '0px';
	}
}

function changeImage(src){
	var elem, vis;
	if (!document.getElementById) return true;
	var placeholder = document.getElementById("bigimage");
	placeholder.setAttribute("src", src);
}




bigimg_array = new Array();
var array_number = 23;
var count = 0;

bigimg_array[0] = new Array( '/images/fotogalerij/big/texmex_foto_01.jpg' , '<h2>Tex Mex foto 1/27</h2>' ) ;
img_preload1 = new Image();
img_preload1.src = '/images/fotogalerij/big/texmex_foto_01.jpg';
bigimg_array[1] = new Array( '/images/fotogalerij/big/texmex_foto_02.jpg' , '<h2>Tex Mex foto 2/27</h2>' ) ;
img_preload2 = new Image();
img_preload2.src = '/images/fotogalerij/big/texmex_foto_02.jpg';
bigimg_array[2] = new Array( '/images/fotogalerij/big/texmex_foto_03.jpg' , '<h2>Tex Mex foto 3/27</h2>' ) ;
img_preload3 = new Image();
img_preload3.src = '/images/fotogalerij/big/texmex_foto_03.jpg';
bigimg_array[3] = new Array( '/images/fotogalerij/big/texmex_foto_04.jpg' , '<h2>Tex Mex foto 4/27</h2>' ) ;
img_preload4 = new Image();
img_preload4.src = '/images/fotogalerij/big/texmex_foto_04.jpg';
bigimg_array[4] = new Array( '/images/fotogalerij/big/texmex_foto_05.jpg' , '<h2>Tex Mex foto 5/27</h2>' ) ;
img_preload5 = new Image();
img_preload5.src = '/images/fotogalerij/big/texmex_foto_05.jpg';
bigimg_array[5] = new Array( '/images/fotogalerij/big/texmex_foto_06.jpg' , '<h2>Tex Mex foto 6/27</h2>' ) ;
img_preload6 = new Image();
img_preload6.src = '/images/fotogalerij/big/texmex_foto_06.jpg';
bigimg_array[6] = new Array( '/images/fotogalerij/big/texmex_foto_07.jpg' , '<h2>Tex Mex foto 7/27</h2>' ) ;
img_preload7 = new Image();
img_preload7.src = '/images/fotogalerij/big/texmex_foto_07.jpg';
bigimg_array[7] = new Array( '/images/fotogalerij/big/texmex_foto_08.jpg' , '<h2>Tex Mex foto 8/27</h2>' ) ;
img_preload8 = new Image();
img_preload8.src = '/images/fotogalerij/big/texmex_foto_08.jpg';
bigimg_array[8] = new Array( '/images/fotogalerij/big/texmex_foto_09.jpg' , '<h2>Tex Mex foto 9/27</h2>' ) ;
img_preload9 = new Image();
img_preload9.src = '/images/fotogalerij/big/texmex_foto_09.jpg';
bigimg_array[9] = new Array( '/images/fotogalerij/big/texmex_foto_010.jpg' , '<h2>Tex Mex foto 10/27</h2>' ) ;
img_preload10 = new Image();
img_preload10.src = '/images/fotogalerij/big/texmex_foto_010.jpg';
bigimg_array[10] = new Array( '/images/fotogalerij/big/texmex_foto_011.jpg' , '<h2>Tex Mex foto 11/27</h2>' ) ;
img_preload11 = new Image();
img_preload11.src = '/images/fotogalerij/big/texmex_foto_011.jpg';
bigimg_array[11] = new Array( '/images/fotogalerij/big/texmex_foto_012.jpg' , '<h2>Tex Mex foto 12/27</h2>' ) ;
img_preload12 = new Image();
img_preload12.src = '/images/fotogalerij/big/texmex_foto_012.jpg';
bigimg_array[12] = new Array( '/images/fotogalerij/big/texmex_foto_013.jpg' , '<h2>Tex Mex foto 13/27</h2>' ) ;
img_preload13 = new Image();
img_preload13.src = '/images/fotogalerij/big/texmex_foto_013.jpg';
bigimg_array[13] = new Array( '/images/fotogalerij/big/texmex_foto_014.jpg' , '<h2>Tex Mex foto 14/27</h2>' ) ;
img_preload14 = new Image();
img_preload14.src = '/images/fotogalerij/big/texmex_foto_014.jpg';
bigimg_array[14] = new Array( '/images/fotogalerij/big/texmex_foto_015.jpg' , '<h2>Tex Mex foto 15/27</h2>' ) ;
img_preload15 = new Image();
img_preload15.src = '/images/fotogalerij/big/texmex_foto_015.jpg';
bigimg_array[15] = new Array( '/images/fotogalerij/big/texmex_foto_016.jpg' , '<h2>Tex Mex foto 16/27</h2>' ) ;
img_preload16 = new Image();
img_preload16.src = '/images/fotogalerij/big/texmex_foto_016.jpg';
bigimg_array[16] = new Array( '/images/fotogalerij/big/texmex_foto_018.jpg' , '<h2>Tex Mex foto 17/27</h2>' ) ;
img_preload17 = new Image();
img_preload17.src = '/images/fotogalerij/big/texmex_foto_018.jpg';
bigimg_array[17] = new Array( '/images/fotogalerij/big/texmex_foto_019.jpg' , '<h2>Tex Mex foto 18/27</h2>' ) ;
img_preload18 = new Image();
img_preload18.src = '/images/fotogalerij/big/texmex_foto_019.jpg';
bigimg_array[18] = new Array( '/images/fotogalerij/big/texmex_foto_022.jpg' , '<h2>Tex Mex foto 19/27</h2>' ) ;
img_preload19 = new Image();
img_preload19.src = '/images/fotogalerij/big/texmex_foto_022.jpg';
bigimg_array[19] = new Array( '/images/fotogalerij/big/texmex_foto_023.jpg' , '<h2>Tex Mex foto 20/27</h2>' ) ;
img_preload20 = new Image();
img_preload20.src = '/images/fotogalerij/big/texmex_foto_023.jpg';
bigimg_array[20] = new Array( '/images/fotogalerij/big/texmex_foto_024.jpg' , '<h2>Tex Mex foto 21/27</h2>' ) ;
img_preload21 = new Image();
img_preload21.src = '/images/fotogalerij/big/texmex_foto_024.jpg';
bigimg_array[21] = new Array( '/images/fotogalerij/big/texmex_foto_025.jpg' , '<h2>Tex Mex foto 22/27</h2>' ) ;
img_preload22 = new Image();
img_preload22.src = '/images/fotogalerij/big/texmex_foto_025.jpg';
bigimg_array[22] = new Array( '/images/fotogalerij/big/texmex_foto_026.jpg' , '<h2>Tex Mex foto 23/27</h2>' ) ;
img_preload23 = new Image();
img_preload23.src = '/images/fotogalerij/big/texmex_foto_026.jpg';
bigimg_array[23] = new Array( '/images/fotogalerij/big/texmex_foto_027.jpg' , '<h2>Tex Mex foto 24/27</h2>' ) ;
img_preload24 = new Image();
img_preload24.src = '/images/fotogalerij/big/texmex_foto_027.jpg';


function get_random( num )
{
var ranNum= Math.round(Math.random()*num);
return ranNum;
}
function elementInnerHTML( picname , pictekst )
{
	if ( document.getElementById ) 
	{
		document.getElementById( picname ).innerHTML = pictekst;
	} 
	else if ( document.all ) 
	{
		document.all[picname].innerHTML = pictekst;
	}
}

function detailSelect( forbackran ) {
{
	if (forbackran == 'this01') 
	{
		if ( count == array_number ) 
		{
			count = 0;
		} 
		else 
		{
			count = 0;
		}
	} 
	if (forbackran == 'this02') 
	{
		if ( count == array_number ) 
		{
			count = 1;
		} 
		else 
		{
			count = 1;
		}
	}
	if (forbackran == 'this03') 
	{
		if ( count == array_number ) 
		{
			count = 2;
		} 
		else 
		{
			count = 2;
		}
	}
	if (forbackran == 'this04') 
	{
		if ( count == array_number ) 
		{
			count = 3;
		} 
		else 
		{
			count = 3;
		}
	}
	if (forbackran == 'this05') 
	{
		if ( count == array_number ) 
		{
			count = 4;
		} 
		else 
		{
			count = 4;
		}
	}
	if (forbackran == 'this06') 
	{
		if ( count == array_number ) 
		{
			count = 5;
		} 
		else 
		{
			count = 5;
		}
	}
	if (forbackran == 'this07') 
	{
		if ( count == array_number ) 
		{
			count = 6;
		} 
		else 
		{
			count = 6;
		}
	}	
	if (forbackran == 'this08') 
	{
		if ( count == array_number ) 
		{
			count = 7;
		} 
		else 
		{
			count = 7;
		}
	}
	if (forbackran == 'this09') 
	{
		if ( count == array_number ) 
		{
			count = 8;
		} 
		else 
		{
			count = 8;
		}
	}
	if (forbackran == 'this010') 
	{
		if ( count == array_number ) 
		{
			count = 9;
		} 
		else 
		{
			count = 9;
		}
	}
	if (forbackran == 'this011') 
	{
		if ( count == array_number ) 
		{
			count = 10;
		} 
		else 
		{
			count = 10;
		}
	}
	if (forbackran == 'this012') 
	{
		if ( count == array_number ) 
		{
			count = 11;
		} 
		else 
		{
			count = 11;
		}
	}
	if (forbackran == 'this013') 
	{
		if ( count == array_number ) 
		{
			count = 12;
		} 
		else 
		{
			count = 12;
		}
	}
	if (forbackran == 'this014') 
	{
		if ( count == array_number ) 
		{
			count = 13;
		} 
		else 
		{
			count = 13;
		}
	}

	if (forbackran == 'this015') 
	{
		if ( count == array_number ) 
		{
			count = 14;
		} 
		else 
		{
			count = 14;
		}
	}
	if (forbackran == 'this016') 
	{
		if ( count == array_number ) 
		{
			count = 15;
		} 
		else 
		{
			count = 15;
		}
	}
	if (forbackran == 'this017') 
	{
		if ( count == array_number ) 
		{
			count = 16;
		} 
		else 
		{
			count = 16;
		}
	}
	if (forbackran == 'this018') 
	{
		if ( count == array_number ) 
		{
			count = 17;
		} 
		else 
		{
			count = 17;
		}
	}
	if (forbackran == 'this019') 
	{
		if ( count == array_number ) 
		{
			count = 18;
		} 
		else 
		{
			count = 18;
		}
	}
	if (forbackran == 'this020') 
	{
		if ( count == array_number ) 
		{
			count = 19;
		} 
		else 
		{
			count = 19;
		}
	}
	if (forbackran == 'this021') 
	{
		if ( count == array_number ) 
		{
			count = 20;
		} 
		else 
		{
			count = 20;
		}
	}
	if (forbackran == 'this022') 
	{
		if ( count == array_number ) 
		{
			count = 21;
		} 
		else 
		{
			count = 21;
		}
	}
	if (forbackran == 'this023') 
	{
		if ( count == array_number ) 
		{
			count = 22;
		} 
		else 
		{
			count = 22;
		}
	}
	if (forbackran == 'this024') 
	{
		if ( count == array_number ) 
		{
			count = 23;
		} 
		else 
		{
			count = 23;
		}
	}
	if (forbackran == 'this025') 
	{
		if ( count == array_number ) 
		{
			count = 24;
		} 
		else 
		{
			count = 24;
		}
	}
	if (forbackran == 'this026') 
	{
		if ( count == array_number ) 
		{
			count = 25;
		} 
		else 
		{
			count = 25;
		}
	}
	if (forbackran == 'this027') 
	{
		if ( count == array_number ) 
		{
			count = 26;
		} 
		else 
		{
			count = 26;
		}
	}	
	

	if (forbackran == 'next') 
	{
		if ( count == array_number ) 
		{
			count = 0;
		} 
		else 
		{
			count++;
		}
	} 
	else if ( forbackran == 'prev' ) 
	{
		if ( count == 0 ) 
		{
			count = array_number;
		} 
		else 
		{
			count--;
		}
	} 
	else if (forbackran == 'ran') 
	{
		count = get_random( array_number );
	}

	var imgItemName = bigimg_array[count][0];
	var imgItemText = bigimg_array[count][1];
				
	if ( imgItemName.indexOf( ".swf" ) != -1 )
	{
		imgItemName = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com /pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="354" height="174" id="movie" align=""><param name="movie" value="' + imgName + '"><embed src="' + imgName + '" quality="high" width="354" height="174" name="movie" align="" type="application/x-shockwave-flash" plug inspage="http://www.macromedia.com/go/getflashplayer"></object>';	
	} 
	else
	{
		imgItemName = '<a href="javascript:toggleLayer(\'bigIMG\');"><img id="bigimage" src="' + imgItemName + '" width="545" height="363" alt="Restaurant Tex Mex fotogalerij" name="bigimg" /></a>';
	}

	//document.mood.src = imgName;
	elementInnerHTML( 'bigIMG-picture', imgItemName );
	elementInnerHTML( 'detailText', imgItemText );
}}






