//Popups.js - Javascript popup messages and window functions displaying common messages

Cancel_it = 0;

function SetCancel(x)
{
Cancel_it = x;
}

function CancelChk(form)
{
if (Cancel_it == 1) 	{tbool = confirm("Do you want to cancel this process?  Click OK to delete it and return to the main menu, or Click CANCEL to continue working.");}
		else {tbool = true;}
if (Cancel_it == 2)     {tbool = false;}
return tbool;
}

function CancelFree(form)
{
if (Cancel_it == 1) 	{tbool = confirm("I understand that I will not see informal bids (usually bids under $20,000.  Click OK to continue or  Click CANCEL to return to Registration Options.");}
		else {tbool = true;}
if (Cancel_it == 2)     {tbool = false;}
return tbool;
}







function PopMsgWin(winmessage,w,h,x,y,autoclose)
{
	subWin = window.open("", 'PMWin', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width='+w+',height='+h+'');
	subWin.moveTo(x,y);
	subWin.focus();
	subWin.document.open();
	subWin.document.write("<html><head><title>Powered by GBS</title></head><body>");
	subWin.document.write(winmessage);
	subWin.document.write("<script language='Javascript'>setTimeout('self.close()'," );
	subWin.document.write(autoclose*1000) 
	subWin.document.write(");</script>");
	subWin.document.write("</body></html>");
//	if (autoclose != 0) {setTimeout('subWin.close();',(autoclose*10000));}
return subWin;
}

function WarnCancel(form, Canclmsg)
{
if (Cancel_it == 1) 	{tbool = confirm(Canclmsg);}
		else	{tbool = true;}
return tbool;
}

