var img_array2 = new Array('MySites-Capacity-Report.png', 'Overview.png', 'Disk-Capacity.png', 'Documents-Capacity.png');
var img_array = new Array('MySites-Capacity-Report-sm.png', 'Overview-sm.png', 'Disk-Capacity-sm.png', 'Documents-Capacity-sm.png');
var img_dim = new Array('948x879', '948x879', '948x879', '948x879');
var img_title = new Array('MySites Capacity Report', 'Overview Report', 'Disk Capacity Report', 'Documents Capacity Report');
var pointer = 0;
var maxnum = img_array.length;
var prod_path = "/Capacity-Manager-for-SharePoint/images/";
var dim = img_dim[pointer].split("x");

for(i = 0; i < img_array.length; i++)
{
	eval('var img' + i + ' = new Image();');
	eval('img' + i + '.src = "' + prod_path + img_array[i] + '";');
}

function nextimage()
{
	pointer++;
	if(pointer >= maxnum) { pointer = 0; }
	dim = img_dim[pointer].split("x");
	document.getElementById('rotateimage').src = prod_path + img_array[pointer];
	document.getElementById('imagelink').href = "javascript:popup('" + prod_path + img_array2[pointer] + "', " + dim[0] + ", " + dim[1] + ", 0);";
	document.getElementById('imagetitle').innerHTML = img_title[pointer];
}

function previmage()
{
	pointer--;
	if(pointer < 0) { pointer = maxnum - 1; }
	dim = img_dim[pointer].split("x");
	document.getElementById('rotateimage').src = prod_path + img_array[pointer];
	document.getElementById('imagelink').href = "javascript:popup('" + prod_path + img_array2[pointer] + "', " + dim[0] + ", " + dim[1] + ", 0);";
	document.getElementById('imagetitle').innerHTML = img_title[pointer];
}

document.write('<table align="center">');
document.write('<tbody>');
document.write('<tr>');
document.write('<td align="center">');
document.write('<strong><span id="imagetitle">' + img_title[0] + '</span></strong><br>');
document.write('<a id="imagelink" href="javascript:popup(\'' + prod_path + img_array2[0] + '\', ' + dim[0] + ', ' + dim[1] + ', 0);"><img border="0" id="rotateimage" alt="" src="' + prod_path + img_array[0] + '" /></a> </td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td align="center"><a href="javascript:previmage();"><img border="0" alt="" src="/images/home/arrow-blue-left.gif" /></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:nextimage();"><img border="0" alt="" src="/images/home/arrow-blue-right.gif" /></a> </td>');
document.write('</tr>');
document.write('</tbody>');
document.write('</table>');
document.write('<div align="center"><p><em><strong>Click on the image to enlarge</strong></em></p></div>');