function setCookie (name, value, expiredays, path) {

   var exdate=new Date();
   exdate.setDate(exdate.getDate()+expiredays);
   
   document.cookie = name + "=" + escape(value) +
     ((expiredays) ? "; expires=" + exdate.toGMTString() : "") +
     ((path) ? "; path=" + path : "/");
     // +
     //((domain) ? "; domain=" + domain : "") +
     //((secure) ? "; secure" : "");
}

function getCookie(name) {
  var cookie = " " + document.cookie;
  var search = " " + name + "=";
  var setStr = null;
  var offset = 0;
  var end = 0;
  if (cookie.length > 0) {
    offset = cookie.indexOf(search);
    if (offset != -1) {
      offset += search.length;
      end = cookie.indexOf(";", offset)
      if (end == -1) {
        end = cookie.length;
      }
      setStr = unescape(cookie.substring(offset, end));
    }
  }
  return(setStr);
}


function getBodyScrollTop()
{
  return self.pageYOffset || (document.documentElement && document.documentElement.scrollTop) || (document.body && document.body.scrollTop);
}

function getBodyScrollLeft()
{
  return self.pageXOffset || (document.documentElement && document.documentElement.scrollLeft) || (document.body && document.body.scrollLeft);
}

function getClientWidth()
{
  return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientWidth:document.body.clientWidth;
}

function getClientHeight()
{
  return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientHeight:document.body.clientHeight;
}


function TestGetStep() {

  var value = $('input[name=group1]:checked').val();  
  
  if (!value) {
    alert('Укажите ваш ответ');
    return false;
  } else {
    document.location.href= value;
  } 
}

