function BlockEnter() 
{
	if (event.keyCode == 13) 
	{
		return false;
	}
	else
	{
		return true;
	}

}

function fOpenWindow(strURL,W,H,X,Y,strName){
	// Get Current Window Width
		var winWidth=window.screen.width
	// Get Current Window Height
		var winHeight=window.screen.height
	// Set X-Axis Value If Passed, If X = null Then Center The New Window On The X-Axis
		var X=X||Math.ceil((winWidth-W)/2)
	// Set Y-Axis Value If Passed, If Y = null Then Center The New Window On The Y-Axis
		var Y=Y||Math.ceil((winHeight-H)/2)
	// Set The New Window Options 
		var strSettings ="toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=0,resizable=0,width="+W+",height="+H
	// Open The New Window
		var winOpener=window
		var winNew=winOpener.open(strURL,strName,strSettings)
	// Move The New Window To The Desired Location
		winNew.moveTo(X,Y)
	// Set Focus To The New Window
		//winNew.focus()
}

function fOpenWindowMax(strURL,strName){
		var winWidth=(screen.availWidth - 10).toString();
		var winHeight=(screen.availHeight - 122).toString();
		var strSettings ="toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=0,width="+winWidth+",height="+winHeight;
		var winOpener=window
		var winNew=winOpener.open(strURL,strName,strSettings);
		//winNew.focus();
		winNew.moveTo( 0, 0 );
		//winNew.focus();
		//winNew.resizeTo( screen.availWidth, screen.availHeight );
}


/// <summary>
///		Sets a specific button to enabled or not depending on isEnabled
/// </summary>
/// <param name="target" type="string">target button to change enabled.</param>
/// <param name="isEnabled" type="boolean">Should be enabled or not.</param>
/// <returns></returns>
/// <remarks></remarks>
function SetButtonActive(buttonName, isActive)
{
	var displayStyle;
	var onMouseOver;
	var onMouseOut;
	
	if (document.getElementById(buttonName).className != "buttonDisabledStyle")
	{
		if (isActive == true)
		{
			displayStyle = "buttonStyle";
			onMouseOut = "className='buttonStyle'";
			onMouseOver = "className='buttonActiveStyle'";
		}
		else
		{
			displayStyle = "buttonActiveStyle";
			onMouseOut = null;
			onMouseOver = null;
		}
		
		document.getElementById(buttonName).className = displayStyle;
		document.getElementById(buttonName).onmouseout = onMouseOut;
		document.getElementById(buttonName).onmouseover = onMouseOver;
	}
}
			
/// <summary>
///		Sets a specific panel to visible or not depending on isVisible
/// </summary>
/// <param name="target" type="string">target panel to change visibility</param>
/// <param name="isVisible" type="boolean">Should be visible or not</param>
/// <returns></returns>
/// <remarks></remarks>
function SetPanelVisiblity(target, isVisible)
{
	var displayStyle;
	
	if (isVisible == true)
	{
		displayStyle = "block";
	}
	else
	{
		displayStyle = "none";
	}
	
	document.getElementById(target).style.display = displayStyle;
}
//Show Character Count in window.status area
function cc(obj)
{
	window.status = 'VIN Length = ' + obj.value.length;
}

/*function SubmitOnEnterKey(ButtonId)
{
	
	if(event.which || event.keyCode)
	{
		if ((event.which == 13) || (event.keyCode == 13)) 
		{
			document.getElementById(ButtonId).click();
			return false;
		}
	}
	else 
	{
		return true;
	}
}*/
