function jsCallSearch()
{
	varForm = document.getElementById('searchForm');
	vSearchText = document.getElementById('txtSearch').value;
	
	if(vSearchText.length < 1)
	{
		alert('Please enter text to search.');
		document.getElementById('txtSearch').focus();
		return false;
	}
	else if(!chkAlphaNumSpecial(document.getElementById('txtSearch'),'Search Text',' _-.:$!@*/'))
	{
		return false;
	}

	document.getElementById("hdnSearchText").value = vSearchText;
	varForm.action = '/memory/search/'+vSearchText+'/';
	return true;
}



function jsSearchMemory(username,vSearchText)
{
	
	if (username=='None')
	{
			window.location.href = '/memory/search/'+vSearchText+'/';
	}
	else
	{
			window.location.href = '/'+username+'/memory/search/'+vSearchText+'/';
	}
}

function jsSubmit()
{
	if(document.loginForm.num_username.value == null || document.loginForm.num_username.value.length < 1)
	{
		alert('Please enter User Name');
		document.loginForm.num_username.focus();
		return false;
	}
	if(document.loginForm.num_password.value == null || document.loginForm.num_password.value.length < 1)
	{
		alert('Please enter Password');
		document.loginForm.num_password.focus();
		return false;
	}
	document.loginForm.submit();
}

//
// ShowTheBox
//
function ShowTheBox(only_once, side, corner, direction)
{
	leftSide = 100;
	rightLeft = 100;
    if (side == leftSide)
    {
        if (direction == rightLeft)
            return;
        crossobj.style.left = '1px';
    }
    else
    {
        if (direction == leftRight)
            return;
        crossobj.style.right = '1px'; 
    }

    if ((corner == topCorner) && (direction == bottopUp))
        return;

    if ((corner == bottomCorner) && (direction == topDown))
        return;
        
    if ( (direction == topDown) && (corner == topCorner) )
        crossobj.style.top = '-' + popupHeight + 'px';    
    else if ( ((direction == rightLeft)||(direction == leftRight)) && (corner == topCorner) )
        crossobj.style.top = '1px';
    else if (corner == bottomCorner)
        crossobj.style.bottom = '2px';

    if (only_once)
        only_once_per_browser = only_once;
  
    if (only_once_per_browser)
    {
        // verify the presence of a cookie
        if (showOrNot())
            showIt(direction);
    }
    else
        setTimeout("showIt("+ direction + ")",1030);
}