// JavaScript Document
//Funktiot hakemussivujen käyttöön
function cc()
{
 /* check for a cookie */
  if (document.cookie == "") 
  {
    /* if a cookie is not found - alert user -
     change cookieexists field value to false */
    alert("COOKIES need to be enabled!");

    /* If the user has Cookies disabled an alert will let him know 
        that cookies need to be enabled to log on.*/ 

    document.loginForm.cookieexists.value ="false";
	document.loginForm.submitLogin.disabled =true;
	document.loginForm.submitLogin.value = "Javascript ja evästeet täytyy olla käytössä"; 
  } else {
   /* this sets the value to true and nothing else will happen,
       the user will be able to log on*/
    document.loginForm.cookieexists.value ="true";
	document.loginForm.submitLogin.disabled =false;
	document.loginForm.submitLogin.value = "Kirjaudu - Logga in";
  }
}

