﻿// JScript 檔

//去掉兩端空格
String.prototype.trim = function()
{
	return this.replace(/(^\s*)|(\s*$)/g,'');
}


function email()
{ 
    var strEmail =document.all.ctl00_cphBody_vtxt_VQ_EmailAccount_EditText.value.trim();

    //alert('go check 4');
    //alert(strEmail);
    
    if(strEmail=="") { 
     alert(MessageCode('I0013','')); 
     return false; 
    }
    var objRe =/^[\w_.-]+@([\w-_]+\.)+[\w]{2,3}$/;

    if(objRe.test(strEmail))
	{
		return true;
	}else{
		alert(MessageCode("I0013",""));

		return false;
	}

/*
    //if (checkEmail(strEmail) == true)
   // {
     //   alert(MessageCode('I0013',''));
	//return false;
    //}
//     if( strEmail.match('[a-zA-Z0-9\._\+]+@([a-zA-Z0-9\.-]\.)*([a-zA-Z0-9\.-]+') != null )
   // if(strEmail.match(/^[\w|.]+@([\w]+\.)+[\w]{2,3}$/) != null)
  //   {
    //      return true;
   // }
   //else
   // {
       //  alert(MessageCode('I0013',''));
     //    return false;
    //
*/
}

 

function __doPostBack()
{
    return false;
}

