function sk3_cmt_submit()
{
    document.forms[0].sk3_dynamic_auth.value = 'ver' + 'ified';
    document.forms[0].action = './process.php?mode=' + document.forms[0].mode.value;
    document.forms[0].target = '';
    document.forms[0].submit();
}


// document.onmousemove = mousemove;
function thumb_view(id, filename)
{
	obj = document.getElementById('thumbnail').style;
	txt = "<img src='./data/" + id + "/thumbs/" + filename + ".png' />";
	document.getElementById('thumbnail').innerHTML = txt;
	obj.left = event.clientX + document.body.scrollLeft;
	obj.top = event.clientY + document.body.scrollTop;
	obj.visibility = "visible";	
}

function thumb_hide()
{
	obj = document.getElementById('thumbnail').style;
	obj.visibility = "hidden";
}

function cmt_show(v)
{
	var obj = document.getElementById('cmt_show' + v).style;
	obj.display = (obj.display == "none") ? "block" : "none";
}

function view_exif(obj, v)
{
	exit_obj = document.getElementById('exif' + v);
	exit_obj.style.left = posX(obj) + 10;
	exit_obj.style.top = posY(obj) + 10;
	
	exit_obj.style.display = (exit_obj.style.display == "none") ? "block" : "none";
}

function posX(obj){
	var curleft = 0;
	if (obj.offsetParent){
		while (obj.offsetParent){
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	return curleft;
}

function posY(obj){
	var curtop = 0;
	if (obj.offsetParent){
		while (obj.offsetParent){
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	return curtop;
}

/*
function mousemove(e)
{
	width = 100;
	height = 100;
	obj = document.getElementById('thumbnail').style;
	x = event.clientX + document.body.scrollLeft;
	y = event.clientY + document.body.scrollTop;
	if (x + width - document.body.scrollLeft > document.body.clientWidth) x = x - width - 25;
	if (y + height - document.body.scrollTop > document.body.clientHeight) y = y - height;
	obj.left = x;
	obj.top = y;
}
*/

