function at_show_aux(parent, child){
	var p = document.getElementById(parent);
	var c = document.getElementById(child );

	var top  = (c["at_position"] == "y") ? p.offsetHeight+2 : 0;
	var left = (c["at_position"] == "x") ? p.offsetWidth +2 : 0;

	for (; p; p = p.offsetParent)
	{
		top  += p.offsetTop;
		left += p.offsetLeft;
	}

	c.style.position   = "absolute";
	c.style.top        = top +'px';
	c.style.left       = left+'px';
	c.style.visibility = "visible";
}

function at_show(){
	var p = document.getElementById(this["at_parent"]);
	var c = document.getElementById(this["at_child" ]);

	at_show_aux(p.id, c.id);
	clearTimeout(c["at_timeout"]);
}



function at_hide(){
	var p = document.getElementById(this["at_parent"]);
	var c = document.getElementById(this["at_child" ]);

	c["at_timeout"] = setTimeout("document.getElementById('"+c.id+"').style.visibility = 'hidden'", 333);
}

function at_click(){
	var p = document.getElementById(this["at_parent"]);
	var c = document.getElementById(this["at_child" ]);

	if (c.style.visibility != "visible") at_show_aux(p.id, c.id); else c.style.visibility = "hidden";
	return false;
}

function at_attach(parents, child, showtype, position, cursor){
	var p = document.getElementById(parents);
	var c = document.getElementById(child);

	p["at_parent"] = p.id;
	c["at_parent"]     = p.id;
	p["at_child"]      = c.id;
	c["at_child"]      = c.id;
	p["at_position"]   = position;
	c["at_position"]   = position;

	c.style.position   = "absolute";
	c.style.visibility = "hidden";

	if (cursor != undefined) p.style.cursor = cursor;

	switch (showtype)
	{
		case "click":
		p.onclick     = at_click;
		p.onmouseout  = at_hide;
		c.onmouseover = at_show;
		c.onmouseout  = at_hide;
		break;
		case "hover":
		p.onmouseover = at_show;
		p.onmouseout  = at_hide;
		c.onmouseover = at_show;
		c.onmouseout  = at_hide;
		break;
	}
}
function showHiden(hiden){
	var firstNameL = document.getElementById("firstNameL");
	var firstName = document.getElementById("firstName");
	var lastNameL = document.getElementById("lastNameL");
	var lastName = document.getElementById("lastName");
	var company_nameL = document.getElementById("company_nameL");
	var company_name = document.getElementById("company_name");
	var company_addressL = document.getElementById("company_addressL");
	var company_address = document.getElementById("company_address");
	var company_HVHHL = document.getElementById("company_HVHHL");
	var company_HVHH = document.getElementById("company_HVHH");
	var company_BankNameL = document.getElementById("company_BankNameL");
	var company_BankName = document.getElementById("company_BankName");
	var company_BankAccountL = document.getElementById("company_BankAccountL");
	var company_BankAccount = document.getElementById("company_BankAccount");
	var person_pasportL = document.getElementById("person_pasportL");
	var person_pasport = document.getElementById("person_pasport");
	var person_soc_cardL = document.getElementById("person_soc_cardL");
	var person_soc_card = document.getElementById("person_soc_card");
	var person_contactL = document.getElementById("person_contactL");
	var person_contact = document.getElementById("person_contact");

	if(hiden=='org'){
		firstNameL.style.display = 'none';
		firstName.style.display = 'none';
		lastNameL.style.display = 'none';
		lastName.style.display = 'none';
		company_nameL.style.display = '';
		company_name.style.display = '';
		company_addressL.style.display = '';
		company_address.style.display = '';
		person_contactL.style.display = '';
		person_contact.style.display = '';
		company_HVHHL.style.display = '';
		company_HVHH.style.display = '';
		company_BankNameL.style.display = '';
		company_BankName.style.display = '';
		company_BankAccountL.style.display = '';
		company_BankAccount.style.display = '';
		person_pasportL.style.display = 'none';
		person_pasport.style.display = 'none';
		person_soc_cardL.style.display = 'none';
		person_soc_card.style.display = 'none';

		//document.secQuestion.disabled="disabled";
	}else if(hiden=='person'){
		firstNameL.style.display = '';
		firstName.style.display = '';
		lastNameL.style.display = '';
		lastName.style.display = '';
		company_nameL.style.display = 'none';
		company_name.style.display = 'none';
		company_addressL.style.display = 'none';
		company_address.style.display = 'none';
		person_contactL.style.display = 'none';
		person_contact.style.display = 'none';
		company_HVHHL.style.display = 'none';
		company_HVHH.style.display = 'none';
		company_BankNameL.style.display = 'none';
		company_BankName.style.display = 'none';
		company_BankAccountL.style.display = 'none';
		company_BankAccount.style.display = 'none';
		person_pasportL.style.display = '';
		person_pasport.style.display = '';
		person_soc_cardL.style.display = '';
		person_soc_card.style.display = '';

		//document.secQuestion.disabled=false;
	}else{
		firstNameL.style.display = '';
		firstName.style.display = '';
		lastNameL.style.display = '';
		lastName.style.display = '';
		company_nameL.style.display = '';
		company_name.style.display = '';
		company_addressL.style.display = '';
		company_address.style.display = '';
		person_contactL.style.display = '';
		person_contact.style.display = '';
		company_HVHHL.style.display = '';
		company_HVHH.style.display = '';
		company_BankNameL.style.display = '';
		company_BankName.style.display = '';
		company_BankAccountL.style.display = '';
		company_BankAccount.style.display = '';
		person_pasportL.style.display = '';
		person_pasport.style.display = '';
		person_soc_cardL.style.display = '';
		person_soc_card.style.display = '';

	}
}
function run(){
	document.forms['form1'].submit();
}
