// JavaScript Document
function ps2(вход,  страница){  
//var expDate = new Date ();			// устанавливаем "срок годности"cookie на час  
//expDate.setTime(expDate.getTime() + (3600 * 1000)); 
if      ( вход=="Войти" ) {				
	i=document.form1.Пароль.value;
	if (i.lendht > 0) {i=i.trimAll} else{}
	if ( i=="Пароль")           { 							
							document.form1.URLpage.value=страница;
							document.form1.action="../y_avtor.php";							
							document.form1.submit();
							return; }//Авторизация
	else  				  {											
						//	setCookie('id',document.form1.Пароль.value/*,expDate*/); 
							//alert(getCookie('id'));//
						//	document.form1.id.value=i;								
							document.form1.Действие.value=вход;
							document.form1.URLpage.value=страница;
						//	document.form1.action="../cgi/e14_web.exe";
							document.form1.action="../login.php";
							document.form1.submit();
							return true;}	
}

else if ( вход=="Персональная страница" )     {	alert("Получаем куки");
/*
							ID=getCookie('id'); alert(ID);
							if (ID==null){} else {document.form1.id.value=ID;	}
							document.form1.Действие.value='ПерсональнаяСтраница';															
							document.form1.URLpage.value=страница;
						//	document.form1.action="../cgi/e14_web.exe";
							document.form1.action="login.php";
							document.form1.submit();
							return true;									
							*/
}
else if ( вход=="Отменить" )     {	//	alert(ID);
/*
							document.form1.Действие.value='Отменить авторизацию';
							document.form1.URLpage.value=страница;				
						//	document.form1.action="../cgi/e14_web.exe";	
							document.form1.action="login.php";
							document.form1.submit();
							return true;
							*/
}
else {}
return true;
}

