view templates.joi/static/preview.js @ 2:c44d020e5f8a 1.1.29-extended

Importing extended patched version from http://www.uli-eckhardt.de/bins/index.en.html
author Peter Gervai <grin@grin.hu>
date Wed, 15 Oct 2008 23:31:54 +0200
parents a84c32f131df
children
line wrap: on
line source

var preview = null;


function showPreview(name, pos) {
	if (document.getElementById) {
		preview = document.getElementById(name);
		if (preview) {
			if (pos == 'nw') {
				preview.style.bottom = null;
				preview.style.right = null;;
				preview.style.top = '0px';
				preview.style.left = '0px';
			} else if (pos == 'ne') {
				preview.style.bottom = null;
				preview.style.left = null;
				preview.style.top = '0px';
				preview.style.right = '0px';
			} else if (pos == 'sw') {
				preview.style.top = null;
				preview.style.right = null;
				preview.style.bottom = '0px';
				preview.style.left = '0px';
			} else if (pos == 'se') {
				preview.style.top = null;
				preview.style.left = null;
				preview.style.bottom = '0px';
				preview.style.right = '0px';
			} else if (pos == 'nc') {
				preview.style.bottom = null;
				preview.style.right = null;
				preview.style.top = '0px';
				preview.style.left = '50%';
			} else if (pos == 'sc') {
				preview.style.top = null;
				preview.style.right = null;
				preview.style.bottom = '0px';
				preview.style.left = '50%';
			}
			preview.style.visibility = 'visible';
		}
	}
}


function hidePreview(name) {
	if (preview) {
		preview.style.visibility = 'hidden';
	}
}


function PreloadNextImage(image) {
	nextimg = new Image();
	nextimg.src = image;
}