﻿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 , "/", "haon.hu");
} else if (window.location.hostname.indexOf("boon.hu") > 0)
{
	SetMyCookie("TQRDGUZTRE4RFDKK", datum.toGMTString(), exptime , "/", "boon.hu");
} else if (window.location.hostname.indexOf("szon.hu") > 0)
{
	SetMyCookie("TQRDGUZTRE4RFDKK", datum.toGMTString(), exptime , "/", "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('Kérem válasszon egy választ!');
  }
  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;
}
function w_o(vform)
{
	var myform;
	if (typeof vform != "undefined")
	{
		myform = vform;
	} else 
	{
		myform = document.minitedform;
	}
	target= "/tools/minited2002/InfoBox.asp?id="+myform.qid.value+"&aid="+myform.aid.value;
	width=200;
	height=300;
	open_window(target,name,width,height,0,0,"location=no,toolbar=no,status=no,statusbar=no,scrollbars=no,resizable=yes,dependent=yes","_blank");
}
 