﻿// JScript File

function openEdInit(lang, id)
{
    manWindow = window.open('/bio.aspx?lang=' + lang + "&id=" + id, "manWindow", "width=740, height=500, status=yes,resizable=yes,scrollbars=yes");
    manWindow.focus();
}   

function openDiscl(lang, id, cat)
{
    cmWindow = window.open('/confirm.aspx?lang=' + lang + "&id=" + id + "&cat=" + cat, "cmWindow", "width=740, height=500, status=yes,resizable=yes,scrollbars=yes");
    cmWindow.focus();
}   
function openFriend(lang, id, cat)
{
    fWindow = window.open('/friend.aspx?l=' + lang + "&id=" + id + "&cat=" + cat, "fWindow", "width=740, height=500, status=yes,resizable=yes,scrollbars=yes");
    fWindow.focus();
}   
function shows(id){
	        var obj =  document.getElementById(id);
	        if (!obj) return;
	        if (obj.style.display == 'none' || obj.style.display == ''){
	                obj.style.display = 'block';
	                showitems = id;
	        }else{
	                obj.style.display = 'none';
	        }
}

	function showForm(fname)
	{
		if(document.getElementById(fname)) document.getElementById(fname).style.display = 'block';
		var scrl=0;
		if(document.documentElement.scrollTop){
			scrl=document.documentElement.scrollTop
		}else{
			if(window.scrollY) scrl=window.scrollY;
		}
		document.getElementById('tableForm').style.marginTop = scrl + (document.getElementById('panelForm').offsetHeight/2 - 165) + 'px';
		return false;
	}
	
	function hideForm(fname)
	{
		if(document.getElementById(fname)) document.getElementById(fname).style.display = 'none';
		return false;
	}