function ViewImage(ifile,ix,iy,ititle) {
	var sOut; 
	var win;
	var sWidth;
	var sHeight;
	var NS = (document.layers) ? 1 : 0;
	win = window.open("","imageviewer","width="+ix+",height="+iy+",menubar=no,toolbar=no");
	if (NS) {
		sWidth = win.innerWidth;
		sHeight = win.innerHeight;
	} else {
		sWidth = win.document.body.clientWidth;
		sHeight = win.document.body.clientHeight;
	}	
	if(sWidth!=ix || sHeight!=iy) {
		win.close();
		setTimeout("ViewImage('"+ifile+"',"+ix+","+iy+",'"+ititle+"')",0);
		return;
	}
	sOut = '<html><head><title>'+ititle+'</title>';
	sOut += '<meta http-equiv="imagetoolbar" content="no">';
	sOut += '<script src="http://www.pinturadecorativa.com/scripts/botonderecho.js"></script>';
	sOut += '</head><body style="margin: 0px;">';
	sOut += '<div style="position:absolute;width:'+ix+'px;height:'+iy+'px;left:0px;top:0px">';
	sOut += '<img src='+ifile+'></div></body></html>';
	
	win.document.open();
	win.document.write(sOut);
	win.document.close();
}

