function SetFocus(TargetFormName) {
  var target = 0;
  if (TargetFormName != "") {
    for (i=0; i<document.forms.length; i++) {
      if (document.forms[i].name == TargetFormName) {
        target = i;
        break;
      }
    }
  }

  var TargetForm = document.forms[target];
    
  for (i=0; i<TargetForm.length; i++) {
    if ( (TargetForm.elements[i].type != "image") && (TargetForm.elements[i].type != "hidden") && (TargetForm.elements[i].type != "reset") && (TargetForm.elements[i].type != "submit") ) {
      TargetForm.elements[i].focus();

      if ( (TargetForm.elements[i].type == "text") || (TargetForm.elements[i].type == "password") ) {
        TargetForm.elements[i].select();
      }

      break;
    }
  }
}

function RemoveFormatString(TargetElement, FormatString) {
  if (TargetElement.value == FormatString) {
    TargetElement.value = "";
  }

  TargetElement.select();
}

function CheckDateRange(from, to) {
  if (Date.parse(from.value) <= Date.parse(to.value)) {
    return true;
  } else {
    return false;
  }
}

function IsValidDate(DateToCheck, FormatString) {
  var strDateToCheck;
  var strDateToCheckArray;
  var strFormatArray;
  var strFormatString;
  var strDay;
  var strMonth;
  var strYear;
  var intday;
  var intMonth;
  var intYear;
  var intDateSeparatorIdx = -1;
  var intFormatSeparatorIdx = -1;
  var strSeparatorArray = new Array("-"," ","/",".");
  var strMonthArray = new Array("jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec");
  var intDaysArray = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);

  strDateToCheck = DateToCheck.toLowerCase();
  strFormatString = FormatString.toLowerCase();
  
  if (strDateToCheck.length != strFormatString.length) {
    return false;
  }

  for (i=0; i<strSeparatorArray.length; i++) {
    if (strFormatString.indexOf(strSeparatorArray[i]) != -1) {
      intFormatSeparatorIdx = i;
      break;
    }
  }

  for (i=0; i<strSeparatorArray.length; i++) {
    if (strDateToCheck.indexOf(strSeparatorArray[i]) != -1) {
      intDateSeparatorIdx = i;
      break;
    }
  }

  if (intDateSeparatorIdx != intFormatSeparatorIdx) {
    return false;
  }

  if (intDateSeparatorIdx != -1) {
    strFormatArray = strFormatString.split(strSeparatorArray[intFormatSeparatorIdx]);
    if (strFormatArray.length != 3) {
      return false;
    }

    strDateToCheckArray = strDateToCheck.split(strSeparatorArray[intDateSeparatorIdx]);
    if (strDateToCheckArray.length != 3) {
      return false;
    }

    for (i=0; i<strFormatArray.length; i++) {
      if (strFormatArray[i] == 'mm' || strFormatArray[i] == 'mmm') {
        strMonth = strDateToCheckArray[i];
      }

      if (strFormatArray[i] == 'dd') {
        strDay = strDateToCheckArray[i];
      }

      if (strFormatArray[i] == 'yyyy') {
        strYear = strDateToCheckArray[i];
      }
    }
  } else {
    if (FormatString.length > 7) {
      if (strFormatString.indexOf('mmm') == -1) {
        strMonth = strDateToCheck.substring(strFormatString.indexOf('mm'), 2);
      } else {
        strMonth = strDateToCheck.substring(strFormatString.indexOf('mmm'), 3);
      }

      strDay = strDateToCheck.substring(strFormatString.indexOf('dd'), 2);
      strYear = strDateToCheck.substring(strFormatString.indexOf('yyyy'), 2);
    } else {
      return false;
    }
  }

  if (strYear.length != 4) {
    return false;
  }

  intday = parseInt(strDay, 10);
  if (isNaN(intday)) {
    return false;
  }
  if (intday < 1) {
    return false;
  }

  intMonth = parseInt(strMonth, 10);
  if (isNaN(intMonth)) {
    for (i=0; i<strMonthArray.length; i++) {
      if (strMonth == strMonthArray[i]) {
        intMonth = i+1;
        break;
      }
    }
    if (isNaN(intMonth)) {
      return false;
    }
  }
  if (intMonth > 12 || intMonth < 1) {
    return false;
  }

  intYear = parseInt(strYear, 10);
  if (isNaN(intYear)) {
    return false;
  }
  if (IsLeapYear(intYear) == true) {
    intDaysArray[1] = 29;
  }

  if (intday > intDaysArray[intMonth - 1]) {
    return false;
  }
  
  return true;
}

function IsLeapYear(intYear) {
  if (intYear % 100 == 0) {
    if (intYear % 400 == 0) {
      return true;
    }
  } else {
    if ((intYear % 4) == 0) {
      return true;
    }
  }

  return false;
}

function rowOverEffect(object) {
  if (object.className == 'moduleRow') object.className = 'moduleRowOver';
}
function rowOutEffect(object) {
  if (object.className == 'moduleRowOver') object.className = 'moduleRow';
}

function check_form() {
  var error_message = "<?php echo JS_ERROR; ?>";
  var error_found = false;
  var error_field;
  var keywords = document.advanced_search.keywords.value;
  var dfrom = document.advanced_search.dfrom.value;
  var dto = document.advanced_search.dto.value;
  var pfrom = document.advanced_search.pfrom.value;
  var pto = document.advanced_search.pto.value;
  var pfrom_float;
  var pto_float;

  if ( ((keywords == '') || (keywords.length < 1)) && ((dfrom == '') || (dfrom == '<?php echo DOB_FORMAT_STRING; ?>') || (dfrom.length < 1)) && ((dto == '') || (dto == '<?php echo DOB_FORMAT_STRING; ?>') || (dto.length < 1)) && ((pfrom == '') || (pfrom.length < 1)) && ((pto == '') || (pto.length < 1)) ) {
    error_message = error_message + "* <?php echo ERROR_AT_LEAST_ONE_INPUT; ?>\n";
    error_field = document.advanced_search.keywords;
    error_found = true;
  }

  if ((dfrom.length > 0) && (dfrom != '<?php echo DOB_FORMAT_STRING; ?>')) {
    if (!IsValidDate(dfrom, '<?php echo DOB_FORMAT_STRING; ?>')) {
      error_message = error_message + "* <?php echo ERROR_INVALID_FROM_DATE; ?>\n";
      error_field = document.advanced_search.dfrom;
      error_found = true;
    }
  }

  if ((dto.length > 0) && (dto != '<?php echo DOB_FORMAT_STRING; ?>')) {
    if (!IsValidDate(dto, '<?php echo DOB_FORMAT_STRING; ?>')) {
      error_message = error_message + "* <?php echo ERROR_INVALID_TO_DATE; ?>\n";
      error_field = document.advanced_search.dto;
      error_found = true;
    }
  }

  if ((dfrom.length > 0) && (dfrom != '<?php echo DOB_FORMAT_STRING; ?>') && (IsValidDate(dfrom, '<?php echo DOB_FORMAT_STRING; ?>')) && (dto.length > 0) && (dto != '<?php echo DOB_FORMAT_STRING; ?>') && (IsValidDate(dto, '<?php echo DOB_FORMAT_STRING; ?>'))) {
    if (!CheckDateRange(document.advanced_search.dfrom, document.advanced_search.dto)) {
      error_message = error_message + "* <?php echo ERROR_TO_DATE_LESS_THAN_FROM_DATE; ?>\n";
      error_field = document.advanced_search.dto;
      error_found = true;
    }
  }

  if (pfrom.length > 0) {
    pfrom_float = parseFloat(pfrom);
    if (isNaN(pfrom_float)) {
      error_message = error_message + "* <?php echo ERROR_PRICE_FROM_MUST_BE_NUM; ?>\n";
      error_field = document.advanced_search.pfrom;
      error_found = true;
    }
  } else {
    pfrom_float = 0;
  }

  if (pto.length > 0) {
    pto_float = parseFloat(pto);
    if (isNaN(pto_float)) {
      error_message = error_message + "* <?php echo ERROR_PRICE_TO_MUST_BE_NUM; ?>\n";
      error_field = document.advanced_search.pto;
      error_found = true;
    }
  } else {
    pto_float = 0;
  }

  if ( (pfrom.length > 0) && (pto.length > 0) ) {
    if ( (!isNaN(pfrom_float)) && (!isNaN(pto_float)) && (pto_float < pfrom_float) ) {
      error_message = error_message + "* <?php echo ERROR_PRICE_TO_LESS_THAN_PRICE_FROM; ?>\n";
      error_field = document.advanced_search.pto;
      error_found = true;
    }
  }

  if (error_found == true) {
    alert(error_message);
    error_field.focus();
    return false;
  } else {
    RemoveFormatString(document.advanced_search.dfrom, "<?php echo DOB_FORMAT_STRING; ?>");
    RemoveFormatString(document.advanced_search.dto, "<?php echo DOB_FORMAT_STRING; ?>");
    return true;
  }
}

function selectRowEffect(object, buttonSelect) {
/*window.alert(buttonSelect);
  if (!selected) {
    if (document.getElementById) {
      selected = document.getElementById('defaultSelected');
    } else {
      selected = document.all['defaultSelected'];
    }
  }
	
  if (selected) selected.className = 'moduleRow';
  object.className = 'moduleRowSelected';
  selected = object;
*/
// one button is not an array
  if (document.checkout_payment.payment[0]) {
    document.checkout_payment.payment[buttonSelect].checked=true;
  } else {
    document.checkout_payment.payment.checked=true;
  }
}

function check_form_optional(form_name) {
  var form = form_name;

  var firstname = form.elements['firstname'].value;
  var lastname = form.elements['lastname'].value;
  var street_address = form.elements['street_address'].value;

  if (firstname == '' && lastname == '' && street_address == '') {
    return true;
  } else {
    return check_form(form_name);
  }
}

function popupWindow(url) {
  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=450,height=310,screenX=150,screenY=150,top=150,left=150')
}

	function session_win()
	{
		window.open("popup_shopping_cart_help.php","info_shopping_cart","height=460,width=430,toolbar=no,statusbar=no,scrollbars=yes").focus();
	}
	function handleEnter (field, event) 
	{
		var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
		if (keyCode == 13)
		{
			document.login.submit();
		} 
		else
		return true;
	}

function numbersOnly(comma, point, changeKey)
{
	var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;	

	//allow commas	
	if(keyCode == 44)
	{
		if(comma == true)
		{
			return true;
		}
	}
	
	//allow minus
	if(keyCode == 45)
	{
		return true;
	}
	
	//allow points
	if(keyCode == 46)
	{
		if(point == true)
		{
			return true;
		}
	}
		
	//allow numbers
	if (keyCode<48||keyCode>57)
		return false;
		
}


function hooverTab(tabId,state) {
	if(state) {
		document.getElementById(tabId).style.backgroundImage='url(templates/vegalife/images/template/top-menu-hoover-left.gif)';
		document.getElementById(tabId + 'Link').style.backgroundImage='url(templates/vegalife/images/template/top-menu-hoover-right.gif)';
		document.getElementById(tabId + 'Link').style.color='#800000';		
	} else {
		document.getElementById(tabId).style.backgroundImage='url(templates/vegalife/images/template/top-menu-left.gif)';
		document.getElementById(tabId + 'Link').style.backgroundImage='url(templates/vegalife/images/template/top-menu-right.gif)';
		document.getElementById(tabId + 'Link').style.color='#000000';
	}
}

function hooverMenuWithSub(elementId,state) {
	if(state) {
		document.getElementById(elementId + 'Img').src='templates/vegalife/images/template/bullet-with-submenu-hoover.gif';
		document.getElementById(elementId).style.backgroundColor='#800000';
		document.getElementById(elementId + 'Link').style.color='#FFFFFF';
	} else {
		document.getElementById(elementId + 'Img').src='templates/vegalife/images/template/bullet-with-submenu.gif';
		document.getElementById(elementId).style.backgroundColor='#FFFFFF';
		document.getElementById(elementId + 'Link').style.color='#000000';
	}
}
function hooverMenuWithOutSub(elementId,state) {
	if(state) {
		document.getElementById(elementId + 'Img').src='templates/vegalife/images/template/bullet-without-submenu-hoover.gif';
		document.getElementById(elementId).style.backgroundColor='#800000';
		document.getElementById(elementId + 'Link').style.color='#FFFFFF';
	} else {
		document.getElementById(elementId + 'Img').src='templates/vegalife/images/template/bullet-without-submenu.gif';
		document.getElementById(elementId).style.backgroundColor='#FFFFFF';
		document.getElementById(elementId + 'Link').style.color='#000000';		
	}
}

function hooverMenuActiveWithSub(elementId,state) {
	if(state) {
		document.getElementById(elementId + 'Img').src='templates/vegalife/images/template/bullet-with-submenu-active-hoover.gif';
		document.getElementById(elementId).style.backgroundColor='#800000';
		document.getElementById(elementId + 'Link').style.color='#FFFFFF';
	} else {
		document.getElementById(elementId + 'Img').src='templates/vegalife/images/template/bullet-with-submenu-active.gif';
		document.getElementById(elementId).style.backgroundColor='#FFFFFF';
		document.getElementById(elementId + 'Link').style.color='#800000';
	}
}
function hooverMenuActiveWithOutSub(elementId,state) {
	if(state) {
		document.getElementById(elementId + 'Img').src='templates/vegalife/images/template/bullet-without-submenu-hoover.gif';
		document.getElementById(elementId).style.backgroundColor='#800000';
		document.getElementById(elementId + 'Link').style.color='#FFFFFF';
	} else {
		document.getElementById(elementId + 'Img').src='templates/vegalife/images/template/bullet-without-submenu.gif';
		document.getElementById(elementId).style.backgroundColor='#FFFFFF';
		document.getElementById(elementId + 'Link').style.color='#800000';		
	}
}

/************************************************************************************************************
	(C) www.dhtmlgoodies.com, October 2005
	
	This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website.	
	
	Terms of use:
	You are free to use this script as long as the copyright message is kept intact. However, you may not
	redistribute, sell or repost it without our permission.
	
	Thank you!
	
	www.dhtmlgoodies.com
	Alf Magne Kalleland
	
	************************************************************************************************************/	
	// You can modify these three values
	var slideshow2_noFading = false;	// Just normal show/hide without fading ?
	var slideshow2_timeBetweenSlides = 5000;	// Amount of time between each image(1000 = 1 second)
	var slideshow2_fadingSpeed = 1;	// Speed of fading
	
	
	/* Don't change any of these values */
	var slideshow2_galleryHeigh;	// Height of galery	
	var slideshow2_galleryContainer;	// Reference to the gallery div
	var slideshow2_galleryWidth;	// Width of gallery	
	var slideshow2_slideIndex = -1;	// Index of current image shown
	var slideshow2_slideIndexNext = false;	// Index of next image shown
	var slideshow2_imageDivs = new Array();	// Array of image divs(Created dynamically)
	var slideshow2_currentOpacity = 100;	// Initial opacity
	var slideshow2_imagesInGallery = false;	// Number of images in gallery
	
	function getGalleryImageSize(imageIndex)
	{
		if(imageIndex==slideshow2_imagesInGallery){			
			showGallery();
		}else{
			var imgObj = document.getElementById('galleryImage' + imageIndex);
			var imgWidth = imgObj.width;
			var imgHeight = imgObj.height;
			
			if(imgWidth>50){						
				var tmpDiv = document.createElement('DIV');
				tmpDiv.id = 'galleryDiv' + imageIndex;
				tmpDiv.style.visibility = 'hidden';
				tmpDiv.className='imageInGallery';
				slideshow2_galleryContainer.appendChild(tmpDiv);
				tmpDiv.appendChild(imgObj);
				imgObj.style.left = Math.round((slideshow2_galleryWidth - imgWidth)/2)  + "px";
				imgObj.style.top = Math.round((slideshow2_galleryHeight - imgHeight)/2)  + "px";
				tmpDiv.style.visibility = 'hidden';
				slideshow2_imageDivs.push(tmpDiv);
				imageIndex++;
				getGalleryImageSize(imageIndex);
			}else{
				setTimeout('getGalleryImageSize(' + imageIndex + ')',10);
			}
		}		
	}
	
	function showGallery()
	{
		if(slideshow2_slideIndex==-1)slideshow2_slideIndex=0; else slideshow2_slideIndex++;	// Index of next image to show
		if(slideshow2_slideIndex==slideshow2_imageDivs.length)slideshow2_slideIndex=0;
		slideshow2_slideIndexNext = slideshow2_slideIndex+1;	// Index of the next next image
		if(slideshow2_slideIndexNext==slideshow2_imageDivs.length)slideshow2_slideIndexNext = 0;
		
		slideshow2_currentOpacity=100;	// Reset current opacity

		// Displaying image divs
		slideshow2_imageDivs[slideshow2_slideIndex].style.visibility = 'visible';
		if(navigator.userAgent.indexOf('Opera')<0){
			//slideshow2_imageDivs[slideshow2_slideIndexNext].style.visibility = 'visible';
		}
		
		
		if(document.all){	// IE rules
			slideshow2_imageDivs[slideshow2_slideIndex].style.filter = 'alpha(opacity=100)';
			slideshow2_imageDivs[slideshow2_slideIndexNext].style.filter = 'alpha(opacity=1)';
		}else{
			slideshow2_imageDivs[slideshow2_slideIndex].style.opacity = 0.99;	// Can't use 1 and 0 because of screen flickering in FF
			slideshow2_imageDivs[slideshow2_slideIndexNext].style.opacity = 0.01;
		}		
		

		setTimeout('revealImage()',slideshow2_timeBetweenSlides);		
	}
	
	function revealImage()
	{
		if(slideshow2_currentOpacity == 100){
			slideshow2_imageDivs[slideshow2_slideIndexNext].style.visibility = 'visible'; // jona
		}
		
		if(slideshow2_noFading){
			slideshow2_imageDivs[slideshow2_slideIndex].style.visibility = 'hidden';
			showGallery();
			return;
		}

		slideshow2_currentOpacity--;
		if(document.all){
			slideshow2_imageDivs[slideshow2_slideIndex].style.filter = 'alpha(opacity='+slideshow2_currentOpacity+')';
			slideshow2_imageDivs[slideshow2_slideIndexNext].style.filter = 'alpha(opacity='+(100-slideshow2_currentOpacity)+')';
		}else{
			slideshow2_imageDivs[slideshow2_slideIndex].style.opacity = Math.max(0.01,slideshow2_currentOpacity/100);	// Can't use 1 and 0 because of screen flickering in FF
			slideshow2_imageDivs[slideshow2_slideIndexNext].style.opacity = Math.min(0.99,(1 - (slideshow2_currentOpacity/100)));
		}

		 if(slideshow2_currentOpacity>0){
			setTimeout('revealImage()',slideshow2_fadingSpeed);
		}else{
			slideshow2_imageDivs[slideshow2_slideIndex].style.visibility = 'hidden';			
			showGallery();
		}
	}
	
	function initImageGallery()
	{
		slideshow2_galleryContainer = document.getElementById('imageSlideshowHolder');
		slideshow2_galleryWidth = slideshow2_galleryContainer.clientWidth;
		slideshow2_galleryHeight = slideshow2_galleryContainer.clientHeight;
		galleryImgArray = slideshow2_galleryContainer.getElementsByTagName('IMG');
		for(var no=0;no<galleryImgArray.length;no++){
			galleryImgArray[no].id = 'galleryImage' + no;
		}
		slideshow2_imagesInGallery = galleryImgArray.length;
		getGalleryImageSize(0);		
		
	}
	

/************************************************************************************************************
	(C) www.dhtmlgoodies.com, October 2005
	
	This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website.	
	
	Terms of use:
	You are free to use this script as long as the copyright message is kept intact. However, you may not
	redistribute, sell or repost it without our permission.
	
	Thank you!
	
	www.dhtmlgoodies.com
	Alf Magne Kalleland
	
	************************************************************************************************************/	
	// You can modify these three values
	var slideshow3_noFading = false;	// Just normal show/hide without fading ?
	var slideshow3_timeBetweenSlides = 5000;	// Amount of time between each image(1000 = 1 second)
	var slideshow3_fadingSpeed = 1;	// Speed of fading
	
	
	/* Don't change any of these values */
	var slideshow3_galleryHeigh;	// Height of galery	
	var slideshow3_galleryContainer;	// Reference to the gallery div
	var slideshow3_galleryWidth;	// Width of gallery	
	var slideshow3_slideIndex = -1;	// Index of current image shown
	var slideshow3_slideIndexNext = false;	// Index of next image shown
	var slideshow3_imageDivs = new Array();	// Array of image divs(Created dynamically)
	var slideshow3_currentOpacity = 100;	// Initial opacity
	var slideshow3_imagesInGallery = false;	// Number of images in gallery
	
	function getGalleryImageSize3(imageIndex)
	{
		if(imageIndex==slideshow3_imagesInGallery){			
			showGallery3();
		}else{
			var imgObj = document.getElementById('galleryImage3' + imageIndex);
			var imgWidth = imgObj.width;
			var imgHeight = imgObj.height;
			
			//if(imgWidth>50){						
				var tmpDiv = document.createElement('DIV');
				tmpDiv.id = 'galleryDiv3' + imageIndex;
				tmpDiv.style.visibility = 'hidden';
				tmpDiv.className='imageInGallery3';
				slideshow3_galleryContainer.appendChild(tmpDiv);
				tmpDiv.appendChild(imgObj);
				imgObj.style.left = Math.round((slideshow3_galleryWidth - imgWidth)/2)  + "px";
				imgObj.style.top = Math.round((slideshow3_galleryHeight - imgHeight)/2)  + "px";
				tmpDiv.style.visibility = 'hidden';
				slideshow3_imageDivs.push(tmpDiv);
				imageIndex++;
				getGalleryImageSize3(imageIndex);
			//}else{
				//setTimeout('getGalleryImageSize3(' + imageIndex + ')',10);
			//}
		}		
	}
	
	function showGallery3()
	{
		if(slideshow3_slideIndex==-1)slideshow3_slideIndex=0; else slideshow3_slideIndex++;	// Index of next image to show
		if(slideshow3_slideIndex==slideshow3_imageDivs.length)slideshow3_slideIndex=0;
		slideshow3_slideIndexNext = slideshow3_slideIndex+1;	// Index of the next next image
		if(slideshow3_slideIndexNext==slideshow3_imageDivs.length)slideshow3_slideIndexNext = 0;
		
		slideshow3_currentOpacity=100;	// Reset current opacity

		// Displaying image divs
		slideshow3_imageDivs[slideshow3_slideIndex].style.visibility = 'visible';
		if(navigator.userAgent.indexOf('Opera')<0){
			//slideshow3_imageDivs[slideshow3_slideIndexNext].style.visibility = 'visible';
		}
		
		
		if(document.all){	// IE rules
			slideshow3_imageDivs[slideshow3_slideIndex].style.filter = 'alpha(opacity=100)';
			slideshow3_imageDivs[slideshow3_slideIndexNext].style.filter = 'alpha(opacity=1)';
		}else{
			slideshow3_imageDivs[slideshow3_slideIndex].style.opacity = 0.99;	// Can't use 1 and 0 because of screen flickering in FF
			slideshow3_imageDivs[slideshow3_slideIndexNext].style.opacity = 0.01;
		}		
		

		setTimeout('revealImage3()',slideshow3_timeBetweenSlides);		
	}
	
	function revealImage3() {
		
		if(slideshow3_currentOpacity == 100){
			slideshow3_imageDivs[slideshow3_slideIndexNext].style.visibility = 'visible'; // jona
		}
		
		if(slideshow3_noFading){
			slideshow3_imageDivs[slideshow3_slideIndex].style.visibility = 'hidden';
			showGallery3();
			return;
		}
		slideshow3_currentOpacity--;
		if(document.all){
			slideshow3_imageDivs[slideshow3_slideIndex].style.filter = 'alpha(opacity='+slideshow3_currentOpacity+')';
			slideshow3_imageDivs[slideshow3_slideIndexNext].style.filter = 'alpha(opacity='+(100-slideshow3_currentOpacity)+')';
		}else{
			slideshow3_imageDivs[slideshow3_slideIndex].style.opacity = Math.max(0.01,slideshow3_currentOpacity/100);	// Can't use 1 and 0 because of screen flickering in FF
			slideshow3_imageDivs[slideshow3_slideIndexNext].style.opacity = Math.min(0.99,(1 - (slideshow3_currentOpacity/100)));
		}
		if(slideshow3_currentOpacity>0){
			setTimeout('revealImage3()',slideshow3_fadingSpeed);
		}else{
			slideshow3_imageDivs[slideshow3_slideIndex].style.visibility = 'hidden';			
			showGallery3();
		}
	}
	
	function initImageGallery3() {
		slideshow3_galleryContainer = document.getElementById('manufacturersSlideshowHolder');
		slideshow3_galleryWidth = slideshow3_galleryContainer.clientWidth;
		slideshow3_galleryHeight = slideshow3_galleryContainer.clientHeight;
		galleryImgArray = slideshow3_galleryContainer.getElementsByTagName('IMG');
		for(var no=0;no<galleryImgArray.length;no++){
			galleryImgArray[no].id = 'galleryImage3' + no;
		}
		slideshow3_imagesInGallery = galleryImgArray.length;
		getGalleryImageSize3(0);		
		
	}		