﻿/**************************************************************************
**
**		                       Popup windows
**
**************************************************************************/

function OpenWindow(URL, name, left, top, width, height, menubar, 
	scrollbars, resizable, status)
{
	wnd = window.open(URL, name, 
		  'top='         + top 
		+ ',left='       + left
		+ ',height='     + height
		+ ',width='      + width
		+ ',menubar='    + menubar
		+ ',scrollbars=' + scrollbars
		+ ',resizable='  + resizable
		+ ',status='     + status);
	wnd.focus();
	return wnd;     
}

function OpenPopupWindowView(URL, name)
{
	OpenWindow(URL, name, 10, 10, 600, 500, 0, 1, 1, 0);
	return false;     
}

function OpenPopupWindowStat(URL, name)
{
	OpenWindow(URL, name, 0, 0, 950, 630, 0, 1, 1, 0);
	return false;     
}


function OpenPopupEmpty(name, left, top)
{
	var str_buffer = new String (
		"<html>\n"+
		"<head>\n"+
		"	<title>Page in Under Construction</title>\n"+
		"</head>\n"+
		"<body bgcolor=\"White\" style=\"margin : 0 0 0 0;\">\n"+
		"<BR><P align=center>\n"+
		"<B>Page in Under Construction</B>\n"+
		"</P>\n"+
		"</body></html>\n");
	var winH = OpenWindow('', name, left, top, 770, 600, 0, 0, 0, 1);
	winH.opener = self;
	var doc = winH.document;
	doc.write (str_buffer);
	doc.close();
	
	return false;     
}

function ChangeAcceptStatus(btnID, cbID)
{
    var btnControl = document.getElementById(btnID);
    var cbControl = document.getElementById(cbID);
    if(cbControl.checked)
    {
        btnControl.disabled = false;
    }
    else
    {
        btnControl.disabled = true;
    }
}

