$(document).ready(function() {
	$(".signin").click(function(e) {          
		e.preventDefault();
		$("fieldset#signin_menu").toggle();
		$(".signin").toggleClass("menu-open");
	});
	$("fieldset#signin_menu").mouseup(function() {
		return false
	});
	$(document).mouseup(function(e) {
		if($(e.target).parent("a.signin").length==0) {
			$(".signin").removeClass("menu-open");
			$("fieldset#signin_menu").hide();
		}
	});			
});

function sendForm(form){  
 var plx = new PHPLiveX();  
 return plx.SubmitForm(form, {  
		 "preloader":"pr",  
		"target": "result"
 });  
}  
function sz(t) {
a = t.value.split('\n');
b=1;
for (x=0;x < a.length; x++) {
 if (a[x].length >= t.cols) b+= 2;
 }
b+= a.length;
if (b > 20) b=20;
if (b > t.rows) t.rows = b;
}
