function blog_open(uid)
	{
	window.open('/addons/blogs/sections.php?conf='+uid+'','','resizable=yes,scrollbars=yes,width=950,height=800,left=10,top=4');
	}

function open_chatWindow(uid, window_name)
	{
	window.open('/modules/members/chat/chat.php?to_id='+uid+'',window_name,'resizable=yes,scrollbars=yes,width=600,height=600,left=10,top=4');
	}

function visible(name)
	{
	var name;

	if (document.all[name].style.display == "none")
		document.all[name].style.display = "";
       else
		if (document.all[name].style.display == "")
		document.all[name].style.display = "none";
	}

function addFile(btn)
	{
	if(document.getElementById)
		{
		tr = btn;
		while (tr.tagName != 'TR') tr = tr.parentNode;
		var idSuffix = Math.round(Math.random()*1000);
		var newTr = tr.parentNode.insertBefore(tr.cloneNode(true),tr.nextSibling);
		thisChilds = newTr.getElementsByTagName('td');
		for (var i = 0; i < thisChilds.length; i++)
			{
			if (thisChilds[i].className == 'header') thisChilds[i].innerHTML = '';
			}
		checkForLast();
		}
	}

function dropFile(btn)
	{
	if(document.getElementById)
		{
		tr = btn;
		while (tr.tagName != 'TR') tr = tr.parentNode;
		tr.parentNode.removeChild(tr);
		checkForLast();
		}
	}

function checkForLast(){
	p_counts = document.getElementsByName('drop');
	for (i = 0; i < p_counts.length; i++){
		p_counts[i].disabled = (p_counts.length == 1) ? true : false;
	}
	}

function alert_message(text)
	{
	alert(text);
	}
	
	function Clear (el)
		{
		if (document.forms[0].elements[el].value == 'Ваш логин')
			{
			document.forms[0].elements[el].value = "";
			return true;
			}

		if (document.forms[0].elements[el].value == 'Пароль')
			{
			document.forms[0].elements[el].value = "";
			return true;
			}
		}
	





