function ValidateEmail(src)
{
 //make sure that any changes to this validation still match Storage's validation.
 //make sure changes to this also get in web/sharedutil/Utility/StorageUtility.cs.
 var emailReg = /^([a-zA-Z0-9_\-\.\+]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/
 return emailReg.test(src);
}
function ValidateEmailEx(src)
{
 var emailReg = /^[\w\.\+\-]+@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
 return emailReg.test(src);
}
function ValidateAlphaNumeric(src)
{
 var alphaReg = /[^a-zA-Z0-9]/g
 return !alphaReg.test(src);
}
function encodeURI(strUrl)
{
 var returnString;
 returnString = escape( strUrl )
 returnString = returnString.replace(/\+/g,"%2B");
 return returnString
}
function decodeURI(strUrl)
{
 return unescape(strUrl)
}
function IsIE()
{
 if (navigator.userAgent.indexOf('MSIE')>-1)
 {
 if (navigator.userAgent.indexOf("Opera") == (-1))
 {
 return true;
 }
 }
 return false;
}
function IsWin()
{
 if (navigator.userAgent.toLowerCase().indexOf("windows") > 0)
 {
 return true;
 }
 return false;
}
function UseShowModalDialog()
{
 if(IsWin() && window.showModalDialog)
 {
 return true;
 }
 return false;
}
function IsRich()
{
 if (IsIE())
 {
 var appVer = navigator.appVersion.toLowerCase();
 var iePos = appVer.indexOf('msie');
 minorVer = parseFloat(appVer.substring(iePos+5,appVer.indexOf(';',iePos)));
 majorVer = parseInt(minorVer);
 if (majorVer >= 6)
 return true;
 }
 return false;
}