//dynamic style switching to show image upload previews
function updatepreview() {
	strUrl = document.getElementById('upfile').value;
	e = document.getElementById('imgPreview');
	
	// local preview (if on Windows, add the file:// prefix)
	e.src = "file://" + strUrl;
	
	if (strUrl.length > 0) {
		e.style.display = "inline";
	} else {
		e.style.display = "none";
	}
}



function preview_image(img, strpath) {
	strUrl = strpath;
	e = document.getElementById(img);
	
	// local preview (if on Windows, add the file:// prefix)
	e.src = "file://" + strUrl;
	/*
	if (window.navigator.platform.toLowerCase().indexOf("win") != -1) {
		e.src = "file://" + strUrl;
	} else {
		e.src = strUrl;
	}
	*/
	
	
	if (strUrl.length > 0) {
		e.style.display = "inline";
	} else {
		e.style.display = "none";
	}
}






