﻿function SetMyCookie(name,value,expires,path,domain,secure){
    document.cookie = name + "=" +escape(value) +
        ( (expires) ? ";expires=" + expires.toGMTString() : "") +
        ( (path) ? ";path=" + path : "") + 
        ( (domain) ? ";domain=" + domain : "") +
        ( (secure) ? ";secure" : "");
}
var datum = new Date();
var exptime = new Date(datum.getTime() + 30*60*1000);
if (window.location.hostname.indexOf("haon.hu") > 0)
{
	SetMyCookie("TQRDGUZTRE4RFDKK", datum.toGMTString(), exptime , "/", "apps.haon.hu");
} else if (window.location.hostname.indexOf("boon.hu") > 0)
{
	SetMyCookie("TQRDGUZTRE4RFDKK", datum.toGMTString(), exptime , "/", "apps.boon.hu");
} else if (window.location.hostname.indexOf("szon.hu") > 0)
{
	SetMyCookie("TQRDGUZTRE4RFDKK", datum.toGMTString(), exptime , "/", "apps.szon.hu");
}
else
{
	SetMyCookie("TQRDGUZTRE4RFDKK", datum.toGMTString(), exptime , "/");
}

function SetMinitedAnswer(i, vform){
	var myform;
	if (typeof vform != "undefined") {
		myform = vform;
	} else {
		myform = document.minitedform;
	}
	myform.aid.value = i;
}
function sendclick(vform){
	var myform;
	if (typeof vform != "undefined") {
		myform = vform;
	} else {
		myform = document.minitedform;
	}
  if (myform.aid.value != -1) {
    myform.submit();
  } else {
    alert('Bitte wählen Sie eine Antwort aus!');
  }
  return false;
}
function statclick(vform){
	var myform;
	if (typeof vform != "undefined") {
		myform = vform;
	} else {
		myform = document.minitedform;
	}
  myform.aid.value = -1;
  myform.submit();
  return false;
}
