
var newWindow;

function openScrollWin(thisURL,winName,winWidth,winHeight,xPos,yPos) 
// NB winname must be a single string non spaces
{
  if (!newWindow || newWindow.closed) {
    winOpts = "width=" + winWidth + ",height=" + winHeight + ",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes";
    if (xPos != "") winOpts += ",screenX=" + xPos + ",left=" + xPos;
    if (yPos != "") winOpts += ",screenY=" + yPos + ",top=" + yPos;
    newWindow = window.open("",winName,winOpts);
    newWindow.location.href = thisURL;
    if (!newWindow.opener) {
      newWindow.opener = window;
    }
  }
  else {
    // window's already open; bring to front
    newWindow.focus();
    newWindow.location.href = thisURL;
  }
}


function cookies_enabled()
{
eraseCookie("cs_test");
createCookie("cs_test","OK",1);
// alert(readCookie("cs_test"));
if (readCookie("cs_test") == "OK")
	{return true}
	else
	{return false};
eraseCookie("cs_test");
}


// call function before HEAD end
// use onload="javascript:happynewyear()" within BODY
function NoticeBoxOnce(boxName,winName,winWidth,winHeight,xPos,yPos,Cname,Cvalue,Cdays)
{
ctest = false;
ctest = cookies_enabled()
if (ctest === true)
{
	var hny;
	hny = readCookie(Cname)
	if (hny != Cvalue)
	{
	openPlainWin(boxName,winName,winWidth,winHeight,xPos,yPos)
	createCookie(Cname,Cvalue,Cdays)
	}
}
else
{
// cookies not enabled
}
}
