var blnDOMSUPPORT = (document.getElementById) ? true : false;

function swapMainImage(newURL)
{
	if ( blnDOMSUPPORT )
	{
		var imgMain = document.getElementById('mainImage');
		var divParent = document.getElementById('propMainImg');
		
		// create new image element
		var imgNew = document.createElement('img');
		
		// give it an image
		// here I use the src of the icon just for convenience
		// you'd want to somehow determine the src of your desired image
		imgNew.src = newURL;
		
		// give it an id
		imgNew.id = 'mainImage';
		
		// replace image
		//divParent = imgMain.parentNode;
		divParent.replaceChild(imgNew, imgMain);
	}
	else
	{
		// old school image swap
		document.images['mainImage'].src = newURL;
	}
}

