function ajaxFetch() { //url, target, class or id

	var args 	= ajaxFetch.arguments;
	var x 		= (window.ActiveXObject) ? 	new ActiveXObject("Microsoft.XMLHTTP"): 
											new XMLHttpRequest();
	if (x) {
		x.onreadystatechange = function() { 
			if (x.readyState == 4 && x.status == 200) {
				
				if (args[2] == "id") {
					el = document.getElementById(args[1]);
				} else {
					el = document.getElementByClass(args[1]);
				}
				el.innerHTML = x.responseText;
			}
		}
		x.open("GET", args[0], true);
		x.send(null);
	}
	
}


function showPic(whichpic) {
	var html;
	var popup;
	

	var rn = Math.floor(Math.random()*1001)


	var source = whichpic.getAttribute("href");
	
	html 	= "<HTML><HEAD><TITLE>Photo</TITLE>" 
		+ "</HEAD><BODY LEFTMARGIN=0 " 
		+ "MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0><CENTER>" 
		+ "<A HREF='javascript:window.close()'><IMG SRC='" + source + "' BORDER=0 NAME=image " 
		+ "onload='window.resizeTo(document.image.width,document.image.height)'></A>"
		+ "</CENTER>" 
		+ "</BODY></HTML>";
	popup	=
		window.open
		('','image'+rn,
		'toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=1');
	popup.document.open();
	popup.document.write(html);
	//popup.document.focus();
	popup.document.close();

 }


