/* 	
 * This software is (c) 2009 Emtee Software & Consult, DK-8000 Aarhus, and all rights are reserved.
 * For further information see: http://www.emtee.dk, or contact info@emtee.dk
 */
 
 var max_imgGallery = 4;
 var cur_imgGallery = 0;
 function rotate_imgGallery(path) {
	cur_imgGallery++;
	
	if(cur_imgGallery==max_imgGallery) {
		cur_imgGallery = 0;
	}
	
	xajax_rotate_imgGallery(path, cur_imgGallery);
	
	timer_rotate_imgGallery = window.setTimeout(function(){rotate_imgGallery(path)},10000);
 }
 
 function set_imgGallery(id, path) {
	cur_imgGallery = (id-1);
	
	if(cur_imgGallery == -1) {
		cur_imgGallery = 3;
	}
	
	clearTimeout(timer_rotate_imgGallery);
	rotate_imgGallery(path);
 }
 
 function over_imgGallery(id) {
	var temp = cur_imgGallery +1;
	if(temp != id) {
		document.getElementById('imgGallery_'+id).style.backgroundColor='#FBA90D';
	}
 }
 
 function out_imgGallery(id) {
	var temp = cur_imgGallery +1;
	if(temp != id) {
		document.getElementById('imgGallery_'+id).style.backgroundColor='#A4A4A4';
	}
 }
 
 // set menu max when the menu is being printed
 function showMenu(id) {
  var d = document.getElementById(id);
	for (var i = 1; i<=100; i++) {
		if (document.getElementById('srom'+i)) {document.getElementById('srom'+i).style.display='none';}
	}
  if (d) {d.style.display='block';}
  }
