preload= new Array;
var preind = 0;
function scrPreload(ar) {
	for (var i=0; i < ar.length; i++) {
		preload[preind] = new Image();
		preload[preind].src = ar[i];
		preind++;
	}
}

function showSmallScr(which) {
	var ind = which - 1;
	
	scrCurrent = which;

	// Reset number links
	resetIcons();

	// Set Screenshot
	document.images["ScrSmall"].src = scr[ind];
	
	// Set Blurb
	document.images["ScrBlurb"].src = cap[ind];
	
	// Set Number
	document.images["Ico" + which].src = icodn[ind];
	
	// Set Arrows
	if (scrCurrent > 1) {
		document.images["IcoPrev"].src = icobase + "arrow_bl_back.gif";
	} else {
		document.images["IcoPrev"].src = icobase + "dot_clear.gif";
	}
	if (scrCurrent < icoup.length) {
		document.images["IcoNext"].src = icobase + "arrow_bl_next.gif";
	} else {
		document.images["IcoNext"].src = icobase + "dot_clear.gif";
	}
}

function resetIcons() {
	for (var i=0; i < icoup.length; i++) {
		document.images["Ico" + (i + 1)].src = icoup[i];
	}
}

function showLargeScr() {
	var wid = 800;
	var hei = 600;

	var options = "location=0,toolbar=0,menubar=0,resizable=1,scrollbars=0,width=" + wid + ",height=" + hei;
	scrWin = window.open("", "scrWin", options);
	
	scrWin.focus();

	timerID = setTimeout("drawScrWin()", 500);
}

function drawScrWin() {
	scrWin.document.writeln("<html><head><title>panFora Screenshot</title></head>");
	scrWin.document.writeln("<body bgcolor=\"#FFFFFF\" leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>");
	scrWin.document.writeln("<img src=\"" + ful[scrCurrent - 1] + "\">");
	scrWin.document.writeln("</body></html>");
	scrWin.document.close();
}

function scrNext() {
	if (scrCurrent < scr.length) {
		showSmallScr(scrCurrent + 1);
	}
}

function scrPrev() {
	if (scrCurrent > 1) {
		showSmallScr(scrCurrent - 1);
	}
}
