function validateLength(oSrc, args)
{
	args.IsValid = (args.Value.length >= 4);
}

//-------------------------------------------------------------------------------
// EditEmail
// ADD by - Deepa S
// Modified by Bela G
// Descr: hide label, show textbox
//-------------------------------------------------------------------------------
function EditEmail(id)
{
	document.getElementById(id + '_Label_div').className = 'DivHidden';
	document.getElementById(id + '_div').className = 'DivVisible';
}

function RemErrMsg()
{
	var divColl = document.getElementsByTagName('div');
    for (var i=0; i<divColl.length; i++) 
    {
        if (divColl[i].getAttribute("id").substring(0,8) == 'divError') 
        {
			var a = divColl[i].getAttribute("id");
			document.getElementById(a).InnerHtml = '';
        }
    }
}


/*function EditEmail(lbl, txt, btn)
{
    document.getElementById(lbl).style.visibility = 'hidden';
    document.getElementById(txt).style.visibility = 'visible';
    document.getElementById(btn).style.visibility = 'visible';
}*/

function Hide()
{
	var numOfElements = document.form1.length;
	for(var i = 0; i < numOfElements; i++)
	{
		if((document.form1.elements[i].id).indexOf('txtUserID') == 0)
			{
				//alert(document.form1.elements[i].id);
				var id = document.form1.elements[i].id;
				document.getElementById(id).style.visibility = 'hidden';
			}
	}
}

function checkCookies()
{
	var tmpcookie = new Date();
	chkcookie = (tmpcookie.getTime() + '');
	document.cookie = "chkcookie=" + chkcookie + "; path=/";
		
	if (document.cookie.indexOf(chkcookie,0) < 0)
	{
		window.location = '/bcapp/BioCenturyCommon/BCEnablingCookiesCode.html';
		//alert("Please enable your cookies..");						
	}
}


