function netscapeF() {
	if ((navigator.appName == 'Netscape') || (navigator.appName.substring(0,9) != 'Microsoft'))
	return false;
	else return true;
}
function EmptyF(field){
	if (field.length==0) return true;
	else return false;
}
function CheckUserLogin(i){
	if (EmptyF(i.uEmail.value)){
		alert('Fill the "E-mail" field please');
		i.uEmail.focus();
		return false;
	}
	if (EmptyF(i.uPassword.value)){
		alert('Fill the "Password" field please');
		i.uPassword.focus();
		return false;
	}
	if (i.uPassword.value.length<4){
		alert('Password must be more then 3 characters.');
		i.uPassword.focus();
		return false;
	}
	return true;
}

function CheckCookies(){


	var Cook_uid = GetCookie("Cook_uid");
	var Cook_uFirstName = GetCookie("Cook_uFirstName");
	var Cook_uEmail = GetCookie("Cook_uEmail");
	var Cook_uPassword = GetCookie("Cook_uPassword");
	var Cook_uStatus = GetCookie("Cook_uStatus");

	if (Cook_uid!=null || Cook_uFirstName!=null || Cook_uEmail!=null || Cook_uStatus!=null || Cook_uStatus!="close"){
		return;
	}

	var CookCmId = GetCookie("CookCmId");
	var CookCmFirstName = GetCookie("CookCmFirstName");
	var CookCmEMail = GetCookie("CookCmEMail");
	var CookCmStatus = GetCookie("CookCmStatus");

	if (CookCmId==null || CookCmFirstName==null || CookCmEMail==null || CookCmStatus==null || CookCmStatus=="close"){
		//window.document.location.href="/members_area.html";
		window.top.location="/members_area.html";
		//document.location="/members_area.html";
	}
}
function getCookieVal(offset){
  var endstr = document.cookie.indexOf (";", offset);
  if (endstr == -1)
    endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));
}
function GetCookie(name){
  var arg = name + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var i = 0;
  while (i < clen) {
    var j = i + alen;
    if (document.cookie.substring(i, j) == arg)
      return getCookieVal (j);
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break; 
  }
  return null;
}