function swapImage(whatThumb, whatImage) {
	if (document.getElementById) {
		//creates new IMG SRC in photo div
		var showPhoto = document.getElementById("yPhotoSRC");
		showPhoto.src= whatThumb;

		//creates new pop-up URLs in anchor tags
		var popLink = document.getElementById("yPopHREF");
			popLink.href= "javascript:PopupPic('" + whatImage + "')";
		var zoomLink = document.getElementById("yPhotoZoom");
			zoomLink.href= "javascript:PopupPic('" + whatImage + "')";
	}
}

function swapDiv(whatDiv, whatDiv2)
{
	document.getElementById('prodFeatDiv').style.display = 'none'; 
	document.getElementById('prodFaqDiv').style.display = 'none';
	document.getElementById('prodSimilarDiv').style.display = 'none'; 
	document.getElementById('prodSpecsDiv').style.display = 'none'; 
	document.getElementById('prodPartsDiv').style.display = 'none';
	document.getElementById(whatDiv).style.display = 'block'; 
	document.getElementById(whatDiv2).style.display = 'block'; 
}

function productImageSwap(imageFileLibraryId) {
   var url = 'FileRender.aspx?ID=' + imageFileLibraryId + '&ImageSize=Big';
   var tempImage = new Image();
   
   tempImage.src = url;
   tempImage.onload = imageOnLoad;
   
   //$( '#yPhotoSRC' ).each( function() { this.src = 'images/widget-ajax-loader.gif' } );
   $( '#yPopHREF' ).each( function() { this.href = "javascript:PopupPic('FileRender.aspx?ID=" + imageFileLibraryId + "')";  } );
   $( '#yPhotoZoom' ).each( function() { this.href = "javascript:PopupPic('FileRender.aspx?ID=" + imageFileLibraryId + "')";  } );
}

function imageOnLoad() {
   var url = this.src;
   $( '#yPhotoZoom' ).each( function() { this.innerHTML = '<img src="' + url + '" class="borderimage2" width="400" height="300">'; } );
}