function block(ip) {

	if(msg = prompt('Причина блокировки', '')) {
		f = document.block;
		f.ip.value=ip;
		f.reason.value=msg;
		f.submit();	
	}
}

function comment(commentId) {
	f = document.form;
	f.id.value=commentId;
	f.message.focus();
}

function smile(emotion) {

	m = document.form.message;
	m.value += ' *'+emotion+'* ';
	hideWindow('smiles');
}

function centerWindow(winId) {


	wT = document.all(winId);
	wTH = wT.offsetHeight;
	wTW = wT.offsetWidth;

	wBI = document.all('backImg_'+winId);
	wBI.height = wTH;
	wBI.width = wTW;

	maxH = 320;
	maxW = 420;
	
	wT.style.top = (maxH - wTH) / 2;
	wT.style.left = (maxW - wTW) / 2;
	
	wB = document.all('back_'+winId);
	
	wB.style.top = (maxH - wBI.height) / 2;
	wB.style.left = (maxW - wBI.width) / 2;
}

function hideWindow(winId) {

	wT = document.all(winId);
	wB = document.all('back_'+winId);
	
	wT.style.top = -1000;
	wT.style.left = -1000;
	wB.style.top = -1000;
	wB.style.left = -1000;
}

function fun(pSrc, pWidth, pHeight) {
maxW = document.body.clientWidth;
maxH = document.body.clientHeight;
var z = "scrollbars=no,width="+pWidth+",height="+pHeight+"top="+(maxH-pHeight)/2+",left="+(maxW-pWidth)/2; 
newWin = window.open('','',z);
newWin.document.write('<body style="margin:0px" onCLick="self.close()"><img src="/fotos/'+pSrc+'" onLoad="self.focus()"></body>')
}


function show(objId,srcObj) {
	document.getElementById(objId).style.display="block";
	document.getElementById(srcObj).style.display="none";
}
