﻿function $CEmail(email)
{
	emailpat = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if( !emailpat.test( email) )
		return false
	else
		return true 
}

String.prototype.replaceAll = function(pcFrom, pcTo)
{
	var i = this.indexOf(pcFrom)
	var c = this
	while (i > -1)
	{
		c = c.replace(pcFrom, pcTo)
		i = c.indexOf(pcFrom)
	}
	return c
}

function isCheckedById(id) 
{ 
	var checked = $("input[@id="+id+"]:checked").length; 
	if (checked == 0) 
	{ 
		return false; 
	} 
	else 
	{ 
		return true; 
	} 
}