<!-- Common Site JS -->

var g_form_modified = false;

function pause(milliseconds) 
{
    var dt = new Date();
    while ((new Date()) - dt <= milliseconds) { /* Do nothing */ }
}

function PopupWindow( url )
{
	winParams='toolbar=no,status=no,resizable=yes,scrollbars=yes';	
	window.open( url, 2, winParams );
}

function DropDownChange(url)
{
	if (url != '')
	{
		window.location = url;
	}
}

RHOR_SetValueFromRequestNumeric( $sectorId, 'sectorid', -1 );
RHOR_SetValueFromRequestNumeric( $dealTypeId, 'dealtypeid', -1 );
RHOR_SetValueFromRequestNumeric( $dealSizeId, 'dealsizeid', -1 );
RHOR_SetValueFromRequestNumeric( $eventId, 'eventid', -1 );
RHOR_SetValueFromRequestNumeric( $geographyId, 'geographyid', -1 );
RHOR_SetValueFromRequestNumeric( $roleId, 'roleid', -1 );

function ConfirmDeleteContact(contactid, urlAppend)
{
    var message = "You are about to delete this contact.  If you are sure you wish to do this, type DELETE to confirm.";
    var def = "";
    var rv = prompt(message,def);
    
    if ( rv.toLowerCase() == 'delete' )
    {
       window.location = '/deletecontact.php?contactid=' + contactid + '&urlappend=' + urlAppend;
    }
}

function ConfirmDeleteSponsor(sponsorid)
{
    var message = "You are about to delete this sponsor.  If you are sure you wish to do this, type DELETE to confirm.";
    var def = "";
    var rv = prompt(message,def);
    
    if ( rv.toLowerCase() == 'delete' )
    {
       window.location = '/deletesponsor.php?id=' + sponsorid;
    }
}

function ConfirmDeleteSector(sectorid, page, col, srt)
{
    var message = "You are about to delete this sector.  If you are sure you wish to do this, type DELETE to confirm.";
    var def = "";
    var rv = prompt(message,def);
    
    if ( rv.toLowerCase() == 'delete' )
    {
       window.location = '/deletesector.php?page=' + page + '&col=' + col + '&srt=' + srt + '&sectorid=' + sectorid;
    }
}
