﻿function toggleDiv(id,flagit) {
    if (flagit=="0"){
    if (document.layers) document.layers[''+id+''].visibility = "hide" // this is the way nn4 works
    else if (document.all) document.all[''+id+''].style.visibility = "hidden"  // this is the way old msie versions work
    else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "hidden" // this is the way the standards wor
    }
else
    if (flagit=="1"){
    if (document.layers) document.layers[''+id+''].visibility = "show"
    else if (document.all) document.all[''+id+''].style.visibility = "visible"
    else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "visible"
    }
}
function ValidateEmailBox()   
{   
    var v1=Page_ClientValidate("ValidationGroup_Email");   
    alert(v1)
    if(!v1)
    {   
        return false;   
    }   
    return true;   
} 
function maxtext(field, countfield, maxlimit)
{
	if (field.value.length > maxlimit)
	{
		field.value = field.value.substring(0, maxlimit);
	}
	else
	{
		countfield.value = maxlimit - field.value.length;
	}
}
