var currentClickedDiv = "";
var currentClickedImage = "";
var portfolioContentContainer = "portfolio_default";


function swapImages(theImage, param2, theNewImage, newDiv)
{
	MM_swapImgRestore();
	MM_swapImage(theImage,param2,theNewImage,1);
	var tempMarkup = document.getElementById(newDiv).innerHTML;
	document.getElementById(portfolioContentContainer).innerHTML = tempMarkup;
}	

function doMouseOver(theImage, param2, theNewImage, newDiv)
{
	swapImages(theImage, param2, theNewImage, newDiv);
}

function doMouseOut(imgID)
{
	if (currentClickedDiv)
	{
		MM_swapImgRestore();
		doClicked(currentClickedImage,'','images/a1.gif',currentClickedDiv);
	}
}

function doClicked(theImage, param2, theNewImage, newDiv)
{
	swapImages(theImage, param2, theNewImage, newDiv);
	currentClickedDiv = newDiv;
	currentClickedImage = theImage;
}
function initialize()
{
	MM_preloadImages('images/a1.gif');
	if (location.search != "")
	{
		var x = location.search.substr(1).split(";")
		if (x)
		{
			var y = x[0].split("=");
			var theImg = y[1];
			y = x[1].split("=");
			var theDiv = y[1];
			doClicked(theImg,'','images/a1.gif',theDiv);
		}
	}	
}