var xmlHttp;
var gDiaplayId;
function startRequest(DisplayId,Url) {
gDiaplayId = DisplayId;

if (window.ActiveXObject) {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
else if (window.XMLHttpRequest) {
xmlHttp = new XMLHttpRequest();
}
xmlHttp.onreadystatechange = handleStateChange;
xmlHttp.open("GET", Url, true);
xmlHttp.send(null);
}
function handleStateChange() {
if(xmlHttp.readyState == 4) {
if(xmlHttp.status == 200) {
document.getElementById(gDiaplayId).innerHTML = xmlHttp.responseText;
}
}
}

function preview (width, height, file, ext, auto)
{
	startRequest ('results','ajax.php?do=preview&file=' + file + '&ext=' + ext + '&thumbnail=' + width + '&height=' + height + '&auto=' + auto);
}