﻿function EmptyBox(txtBox, text)
{
    if(txtBox.value==text)
        txtBox.value = '';
}
function FillBox(txtBox, text)
{
if(txtBox.value == '')
{
txtBox.value = text;
}
}

function ClickButton(e, btnId)
{

    if(e.keyCode==13)
    {
        var btn = document.getElementById(btnId);    
        btn.focus();
        btn.click();
    }
}

function MoveToPage(dropdown)
{
    var value = dropdown.options[dropdown.selectedIndex].value;
    if(value!=0 && value!=-1)
    {
        window.location.href = value;
    }   
    else if(value==-1)
    {   alert('Coming Soon');    }
    return false;
}

function ChangeTab(tabid, divid)
{
    document.getElementById('MyCard').className = '';
    document.getElementById('RelatedCard').className = '';
    document.getElementById('Transfer').className = '';
    document.getElementById(tabid).className = 'Selected';
    document.getElementById('PrimaryCard').style.display = 'none';
    document.getElementById('ContentRelatedCard').style.display = 'none';
    document.getElementById(divid).style.display = '';

}   

function isEmail(aStr)
{
	var reEmail=/^[0-9a-zA-Z_\.-]+\@[0-9a-zA-Z_\.-]+\.[0-9a-zA-Z_\.-]+$/;
	if(!reEmail.test(aStr))
	{
		return false;
	}
	return true;
}
