// JavaScript Document

document.write('<div id="IVMainDiv" style="width:600px;margin:15px auto;text-align:center;display:none;">');
document.write('<div style="width:600px;text-align:center;border:10px solid #D4D0C8;padding:0px 0px 0px 0px;">');
document.write('<div style="background-color:#BBBBBB;text-align:center;height:20px;padding:10px 10px 10px 10px;border-style:solid; border-width:1px 1px 0px 1px;border-color:#000000;"><table><tr><td width="44"><p style="margin:0px;padding:1px 1px 1px 1px;background-color:#999999;border: 1px solid #000000;"><a onclick="javascript:IVResize()" href="#" style="font-size:11px;color:#800080;font-family:Arial, Helvetica, sans-serif;font-weight:bold;text-decoration:none;">resize</a></p></td><td width="500"><p style="font-size:16px;margin:0px;padding:0px;color:#008080;font-family:Arial, Helvetica, sans-serif;font-weight:bold;"><span id="IVPortfolioSpan"></span></p></td><td width="40" align="center"><p style="margin:0px;padding:1px 1px 1px 1px;background-color:#999999;border: 1px solid #000000;"><a onclick="javascript:IVEnd()" href="#" style="font-size:11px;color:#800080;font-family:Arial, Helvetica, sans-serif;font-weight:bold;text-decoration:none;">close</a></p></td></tr></table></div>');
document.write('<div style="background-color:#EEEEE4;text-align:center;padding:0px 0px 0px 0px;border-style:solid; border-width:1px 1px 1px 1px;border-color:#000000;">')
document.write('<table><tr><td height="540" valign="middle" align="center" width="580" id="IVImageCell"><img src="/blank.gif" id="IVImageTag" style="display:none;"></td></tr>');
document.write('<tr><td height="50" valign="bottom" align="center" width="580">');
document.write('<p style="font-size:13px;color:#000080;font-family:Arial, Helvetica, sans-serif;padding:0px 0px 5px 0px;margin:0px 0px 0px 0px;"><span id="IVCaptionSpan"></span></p>');
document.write('<p style="font-size:11px;color:#000080;font-family:Arial, Helvetica, sans-serif;padding:0px 0px 5px 0px;margin:0px 0px 0px 0px;"><span id="IVSubCaptSpan"></span></p>');
document.write('</td></tr>');
document.write('</table></div>');
document.write('<div style="background-color:#BBBBBB;text-align:center;height:20px;padding:10px 10px 10px 10px;border-style:solid; border-width:0px 1px 1px 1px;border-color:#000000;">');
document.write('<a onclick="IVNext(-1);"><img src="http://feedingthemind.com/xfiles/admingraphics/gv/prev.gif" style="border:0px;margin:0px 0px 0px 0px;padding:0px 0px 0px 0px;"></a>');
document.write('<a onclick="IVNext(+1);"><img src="http://feedingthemind.com/xfiles/admingraphics/gv/next.gif" style="border:0px;margin:0px 0px 0px 0px;padding:0px 0px 0px 0px;"></a>');
document.write('<img src="/blank.gif"></div>');
document.write('</div>');
document.write('</div>');
document.write('<div id="IVHide">');

ElementIVImageTag = document.getElementById('IVImageTag');
ElementIVHide = document.getElementById('IVHide');
ElementIVMainDiv = document.getElementById('IVMainDiv');
ElementIVCaption = document.getElementById('IVCaptionSpan');
ElementIVSubCapt = document.getElementById('IVSubCaptSpan');
ElementIVPortfolio = document.getElementById('IVPortfolioSpan');
ElementIVImageCell = document.getElementById('IVImageCell');

ElementIVPortfolio.innerHTML = IVPortfolio;
ElementIVImageTag.src = IVImageBase + '/V' + IVimage[0] ;
ElementIVCaption.innerHTML = IVCaptions[0];

ImageShowing = 0;

// Size is either V (max 500) or W (max 350)
Size = "V";

ElementIVImageCell.height = "550";

DummyImageNext = new Image();
DummyImagePrev = new Image();

M = 100;
L = M.toString();
DummyImageNext.src = IVImageBase + '/' + Size + IVimage[0];



function IVStart(J) {
ElementIVImageTag.src = "/blank.gif";
ImageShowing = J;	
ElementIVImageTag.src = IVImageBase + '/' + Size + IVimage[ImageShowing];
ElementIVCaption.innerHTML = IVCaptions[ImageShowing];
if   (IVSubCapts[ImageShowing])
     {ElementIVSubCapt.innerHTML = IVSubCapts[ImageShowing];}
else {ElementIVSubCapt.innerHTML = "";}
ElementIVImageTag.style.display = "block";
ElementIVHide.style.display="none";
ElementIVMainDiv.style.display="block";
}

function IVNext(D) {
ElementIVImageTag.src = "/blank.gif";
ImageShowing = ImageShowing + D;
if (ImageShowing > IVCaptions.length-1) {ImageShowing = 0;}
if (ImageShowing < 0) {ImageShowing = IVCaptions.length-1;}
ElementIVImageTag.src = IVImageBase + '/' + Size + IVimage[ImageShowing];
ElementIVCaption.innerHTML = IVCaptions[ImageShowing];
if   (IVSubCapts[ImageShowing])
     {ElementIVSubCapt.innerHTML = IVSubCapts[ImageShowing];}
else {ElementIVSubCapt.innerHTML = "";}


ImageNext = ImageShowing + 1;
if (ImageNext > IVCaptions.length-1) {ImageNext = 0;}
if (ImageNext < 0) {ImageNext = IVCaptions.length-1;}
DummyImageNext.src = IVImageBase + '/' + Size + IVimage[ImageNext];

ImagePrev = ImageShowing - 1;
if (ImagePrev > IVCaptions.length-1) {ImagePrev = 0;}
if (ImagePrev < 0) {ImagePrev = IVCaptions.length-1;}
DummyImagePrev.src = IVImageBase + '/' + Size + IVimage[ImagePrev];

}

function IVEnd(){
ElementIVMainDiv.style.display="none";
ElementIVHide.style.display="";
ElementIVImageTag.src = "/blank.gif";
}

function IVResize(){
ElementIVImageTag.src = "/blank.gif";
if   (Size == "V")
     {ElementIVImageCell.height = "400";
//      ElementIVImageTag.height = "350";
	  Size = "W";
	  ElementIVImageTag.src = IVImageBase + '/' + Size + IVimage[ImageShowing];}
else {ElementIVImageCell.height = "550";
//      ElementIVImageTag.height = "500";
	  Size = "V";
	  ElementIVImageTag.src = IVImageBase + '/' + Size + IVimage[ImageShowing];}
}



