function picPop(event, url, text) {
	if(event) event.cancelBubble = true;
	var rnd = (new Date()).getSeconds();
	var win = window.open('', 'picPopup', 'width=200,height=200,location=0,menubar=0,statusbar=0');
	win.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"\n' +
		'	"http://www.w3.org/TR/html4/strict.dtd">\n' +
		'<html><head><title>Full view</title><style type="text/css">\n' +
		'html,body{margin:0;padding:0;overflow:hidden;width:100%;height:100%;}\n' +
		'img{margin:0;padding:0;}\n' +
		'p{margin:0;padding:0.5em;text-align:center;}\n' +
		'</style><script type="text/javascript">\n' +
		'function imgLoaded() {\n' +
		'	var b = document.body;\n' +
		'	var d = document.getElementById("d");\n' + 
		'	if(!d.offsetWidth) { b.style.overflow = "visible"; b.style.overflow = "hidden"; }\n' +
		'	window.resizeBy(d.offsetWidth - b.offsetWidth, d.offsetHeight - b.offsetHeight);\n' +
		'	window.moveTo((screen.availWidth - b.offsetWidth) / 2, (screen.availHeight - b.offsetHeight) / 2);\n' + 
		'	window.focus();\n' +
		'}</scr' + 'ipt></head><body onclick="window.close()" onload="imgLoaded();"><div id="d"><img src="' + url + '">\n');
	if(text) win.document.write('<p>' + text + '</p>');
	win.document.write('</div></body></html>');
	win.document.close();
	return !win;
}

function preload() {
	var arrhref = document.getElementsByTagName("a");

	for (i = 0; i < arrhref.length; i++)
	{
		if (arrhref[i].href.match("jpg/index.html")) {
			
			var split1 = arrhref[i].href.split("index.html");
			var split2 = split1[3].split(".");
			eval(split2[0]+" = new Image(); "+split2[0]+".src = arrhref[i].href;");
		
		}
		
	}

}
