
function popUp(URL, id, ieWidth,ieHeight,ffWidth, ffHeight) 
{
	// default width and height to ff
	
	var width   = ffWidth;
	var height  = ffHeight;
	
	if (navigator.appName == "Microsoft Internet Explorer")
	{                   
		width = ieWidth;
		height = ieHeight;
	}                        
	
	var left    = (screen.width - width) / 2;
	var top     = (screen.height - height) / 2;               
	
	window.open(URL, id, 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=' + width + ',height=' + height + ',left = ' + left +',top = ' + top + '');
}

function ClickButton(event, focusControl)
{
    event = event || window.event;	
    
    var keyCode = null;

    if( event.which ) 
    {
        keyCode = event.which;
    } 
    else if( event.keyCode )
    {
        keyCode = event.keyCode;
    }
                
    if( 13 == keyCode ) 
    {                
        document.getElementById(focusControl).focus();                    
        return false;
    }
                
    return true;
}

function IsIE()
{
    var agt=navigator.userAgent.toLowerCase();
    
    if (agt.indexOf("msie") != -1)
        return true;
       
    return false;
}

function adjustLayout2(openclose, ie, other)
{        
    var cContent = document.getElementById('contentcenter3');
    
    if(cContent == null)
        return;
            
    if(openclose == true)
    {
        if(IsIE())
        {
            cContent.style.height = parseInt(cContent.style.height) + ie + 'px'; 
        }
        else
        {
            cContent.style.height = parseInt(cContent.style.height) + other + 'px';
        }
    }
    else
    {
        if(IsIE())
        {            
            cContent.style.height = parseInt(cContent.style.height) - ie +  'px';
        }
        else
        {
            cContent.style.height = parseInt(cContent.style.height) - other +  'px';
        }                
    }                                 
} 

function CheckBid(sender, args)
{
    var maxBid = parseFloat(args.Value);
    
    if(minBid > maxBid)
    {
        args.IsValid = false;
        return;
    }

    args.IsValid = true;
}
