
// ..................................................................


function onmenu(obj, ison)
{
   if (ison) obj.style.backgroundColor = "#D66186";
   else obj.style.backgroundColor = "#D51212";
}


// ..................................................................


function setColor(obj, clr)
{
   obj.style.backgroundColor = clr
}

function clickNode(node_id)
{
   node = document.getElementById("n_"+node_id);
   icon = document.images["i_"+node_id];
   if (node && icon)
   {
      if (node.style.display != 'none')
      {
         node.style.display = "none";
         icon.src = "img/icon-plus.gif";
         setCookie("node_"+node_id, "0");
      }
      else
      {
         node.style.display = "";
         icon.src = "img/icon-minus.gif";
         setCookie("node_"+node_id, "1");
      }
   }
}


// ..................................................................


function windowPopup(content, imageW, imageH)
{
	x3 = imageW;
	y3 = imageH;
	x4 = (screen.width < 2000) ? (screen.width / 2 - (x3 / 2)) : (screen.width / 4 - (x3 / 2));
	y4 = screen.height / 2 - (y3 / 2);
	mywin = window.open('', 'big', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=' + x3 + ',height=' + y3 + ',top=' + y4 + ',left=' + x4 + '');
	mywin.document.open();

	if(navigator.appName == "Microsoft Internet Explorer")
	{
		mywin.window.resizeTo(x3 + 10, y3 + 25);
	}

	mywin.document.write(content);
	mywin.document.close;
	mywin.focus();

	return false;
}


// ..................................................................


function imagePopup(imageUrl, imageW, imageH, _title)
{
	x3 = imageW;
	y3 = imageH;
	x4 = (screen.width < 2000) ? (screen.width / 2 - (x3 / 2)) : (screen.width / 4 - (x3 / 2));
	y4 = screen.height / 2 - (y3 / 2);
	mywin = window.open('', 'big', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=' + x3 + ',height=' + y3 + ',top=' + y4 + ',left=' + x4 + '');
	mywin.document.open();

/*
	if(navigator.appName == "Microsoft Internet Explorer")
	{
		mywin.window.resizeTo(x3 + 10, y3 + 25);
	}
*/
	mywin.document.write("<title>"+_title+"</title><body bgcolor=#ffffff leftmargin=0 topmargin=0 marginheight=0 marginwidth=0 onblur='window.close();'><a href='javascript:window.close()'><img src='" + imageUrl + "' border=0></a></body>");
	mywin.document.close;
	mywin.focus();

	return mywin;
}


// ..................................................................


function imagePopup2(imageUrl, imageW, imageH, _title)
{
	var date = new Date;
	var winTitle = date.getTime();
	x3 = imageW;
	y3 = imageH;
	x4 = (screen.width < 2000) ? (screen.width / 2 - (x3 / 2)) : (screen.width / 4 - (x3 / 2));
	y4 = screen.height / 2 - (y3 / 2);
	mywin = window.open('', '' + winTitle + '', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=' + x3 + ',height=' + y3 + ',top=' + y4 + ',left=' + x4 + '');
	mywin.document.open();

/*
	if(navigator.appName == "Microsoft Internet Explorer")
	{
		mywin.window.resizeTo(x3 + 10, y3 + 25);
	}
*/
	mywin.document.write("<title>"+_title+"</title><body bgcolor=#ffffff leftmargin=0 topmargin=0 marginheight=0 marginwidth=0 onblur='window.close();'><a href='javascript:window.close()'><img src='" + imageUrl + "' border=0></a></body>");
	mywin.document.close;
	mywin.focus();

	return mywin;
}


// ..................................................................


function popup(href, title, width, height)
{
	this_top = (screen.height - height) / 2;
	this_left = (screen.width - width) / 2;
	xx = window.open(href, title, 'toolbar=no, scrollbars=yes, menubar=no, directories=no, status=no, resizable=no, width=' + width + ', height=' + height + ', top=' + this_top + ', left=' + this_left);
	xx.focus();

	return false;
}


// ..................................................................


function on_button() 
{ 
	document.getElementById('pollsend').disabled = false; 
}

// ..................................................................
