function InvalidUser()
{
	Ext.Msg.alert('Invalid User', 'Your account has not been approved to make bids.');
}

function GridLoginMessage()
{
	Ext.Msg.alert('Not Signed in', 'Please Sign in to access.');
}



function addWatch()
{
 if (disableVar!=true)
 {
	Ext.MessageBox.buttonText.yes = "OK"; 
	Ext.MessageBox.buttonText.no = "Cancel";
	Ext.MessageBox.confirm('Watch this Item', 'You have requested to add item <b>'+ itemid + '</b> to the watch list', addWatchResult);
 }
}

function addWatchResult(btn)
{
	if (btn=="yes")
	{	   
	   Ext.Msg.alert('Thanks', 'Item <b>'+ itemid + '</b> has been added to your watch list. <br>You can view your watch list in the folders tab.');
	   top.postbid.location.href="./addwatch.asp?watchitem="+ itemid +"&itemid="+itemid;	   
	}  
	
}




function removeWatch()
{
 if (disableVar!=true)
 {
	Ext.MessageBox.buttonText.yes = "OK"; 
	Ext.MessageBox.buttonText.no = "Cancel";
	Ext.MessageBox.confirm('Remove from Watch List', 'You have requested to remove item <b>'+ itemid + '</b> from the watch list', removeWatchResult);
 }
}

function removeWatchResult(btn)
{
	if (btn=="yes")
	{	   
	   Ext.Msg.alert('Confirmation', 'Item <b>'+ itemid + '</b> has been removed from your watch list.');
	   top.postbid.location.href="./mywatching.asp?chkitemid="+ itemid +"&watch_action=hide";
	   clearPostBidFrame();
	}  	
}



function archiveBuyerItem(iBidID)
{

 if (disableVar!=true)
 {
	buyerArchiveItemID=iBidID;
	Ext.MessageBox.buttonText.yes = "OK"; 
	Ext.MessageBox.buttonText.no = "Cancel";
	Ext.MessageBox.confirm('Archive', 'Archive this listing?', archiveBuyerItemResult);
 }
}

function archiveBuyerItemResult(btn)
{
	if (btn=="yes")
	{	   
	   Ext.Msg.alert('Message', 'This listing is archived.');
	   top.postbid.location.href="./mybuying_won.asp?won_action=hide&chkbidid="+buyerArchiveItemID;	   
	}  	
}



function removeBuyerItem()
{
 if (disableVar!=true)
 {
	Ext.MessageBox.buttonText.yes = "OK"; 
	Ext.MessageBox.buttonText.no = "Cancel";
	Ext.MessageBox.confirm('Remove Listing', 'Remove this listing?', removeBuyerItemResult);
 }
}

function removeBuyerItemResult(btn)
{
	if (btn=="yes")
	{	   
	   Ext.Msg.alert('Message', 'This listing is removed.');
	   top.postbid.location.href="./mybuying_notwon.asp?notwon_action=hide&chkitemid="+itemid;
	   clearPostBidFrame();
	}	
}




function endEarly()
{
 if (disableVar!=true)
 {
	Ext.MessageBox.buttonText.yes = "OK"; 
	Ext.MessageBox.buttonText.no = "Cancel";
	Ext.MessageBox.confirm('End early', 'Really end this listing early? <br> THIS ACTION CANNOT BE UNDONE', endEarlyResult);
 }
}

function endEarlyResult(btn)
{
	if (btn=="yes")
	{	   
	   Ext.Msg.alert('Message', 'This listing is closed.');
	   
	   top.postbid.location.href="./edit_processendcancel.asp?from=endearly&endearly=endearly&itemid=" + itemid + "&verifyEndearly=end";	  	
	   
	   top.window.location.reload();
	} 	
}




function removeItem()
{
 if (disableVar!=true)
 {
	Ext.MessageBox.buttonText.yes = "OK"; 
	Ext.MessageBox.buttonText.no = "Cancel";
	Ext.MessageBox.confirm('Remove Listing', 'Remove this listing?', removeItemResult);
 }
}

function removeItemResult(btn)
{
	if (btn=="yes")
	{	   
	   Ext.Msg.alert('Message', 'This listing is removed.');
	   top.postbid.location.href="./myselling_unsold.asp?unsold_action=remove&chkitemid="+itemid;	   
	}	
}



function archiveItem(iBidID)
{
 if (disableVar!=true)
 {
	sellerArchiveItemID=iBidID;
	Ext.MessageBox.buttonText.yes = "OK"; 
	Ext.MessageBox.buttonText.no = "Cancel";
	Ext.MessageBox.confirm('Archive', 'Archive this listing?', archiveItemResult);
 }
}

function archiveItemResult(btn)
{
	if (btn=="yes")
	{	   
	   Ext.Msg.alert('Message', 'This listing is archived.');
	   top.postbid.location.href="./myselling_sold.asp?sold_action=hide&chkbidid="+sellerArchiveItemID;	   
	} 	 
}