
function checkMsgLang (msgContentId, msgTypeId, msgTypeSpanId,msgCountId) {
	
	var match =  /[\u4E00-\u9FFF]/.test($(msgContentId).value);
	if (match) {
		$(msgTypeId).checked=true;
		new Effect.Appear(msgTypeSpanId,{duration:1});
		$(msgCountId).value="70";
	}
	else {
		$(msgTypeSpanId).style.display="none";
		$(msgTypeId).checked=false;
		$(msgCountId).value="160";		
	}
}
// Validate Sign-up Page


function validateSignup() {
			 
       var returnval;

       if(document.signup_form.userName.value == ''){
       
              alert("Please enter your user name");
		document.signup_form.userName.focus();
				
		new Effect.Highlight('userName');
				
		returnval = false;
		
	}			
       else if(document.signup_form.email.value == ''){
       
              alert("Please enter your email address");
		document.signup_form.email.focus();
				
		new Effect.Highlight('email');
				
		returnval = false;
		
	}
	else if(document.signup_form.email.value.substr(-13) == 'sgcompass.com'){
			    
              alert("You have exceeded the number of free accounts for your domain, please contact customerservice@commzgate.com");
		document.signup_form.email.focus();
				
		new Effect.Highlight('email');
				
		returnval = false;
		
	}			 
	else if(document.signup_form.country.selectedIndex==0) {
					
              alert("Please select your country!");
		document.signup_form.country.focus();
				
		new Effect.Highlight('country');
				
		returnval = false;
		
	}
	else{
		
              returnval = true;

       }
			
	return returnval;
	
}


function verifyCode() {
	
			 var returnval;
			
			  if  (document.verify_code.validator.value == '') {
			    alert("Please enter the verification code you see");
				document.verify_code.validator.focus();
				returnval = false;
			  }
			  
			  else {
					returnval = true;
			  }
			
			  return returnval;
}


function validateSignupEmail() {
	
		if (emailCheck(document.signup_form.email.value)) {
			
			 document.signup_form.password1.focus();
			 //alert("Your Email valid!");
			
		}
		
		else {
			
			alert("Please enter a valid Email address!");
						
			new Effect.Highlight('email');
			document.signup_form.email.focus();	
		}			
		
		//new Effect.SlideDown('password_again');

}



function passwordAgain() {
		
		//alert("True!"+document.signup_form.password1.value.length);
		
		if ( (document.signup_form.password1.value.length) > 4 ) {
			
				new Effect.SlideDown('password_again',{duration:3});
				document.getElementById("password1_prompt").innerHTML="";
				document.getElementById("password2_prompt").innerHTML='<font color="#999999">Confirm your chosen password</font>';
		
		}
		
		else {
			 	document.getElementById("password1_prompt").innerHTML='<font color="#999999">6 or more characters please</font>';
		}

}


function emailCheck (emailStr) {
	
		/* The following pattern is used to check if the entered e-mail address
		   fits the user@domain format.  It also is used to separate the username
		   from the domain. */
		var emailPat=/^(.+)@(.+)$/
		/* The following string represents the pattern for matching all special
		   characters.  We don't want to allow special characters in the address. 
		   These characters include ( ) < > @ , ; : \ " . [ ]    */
		var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
		/* The following string represents the range of characters allowed in a 
		   username or domainname.  It really states which chars aren't allowed. */
		var validChars="\[^\\s" + specialChars + "\]"
		/* The following pattern applies if the "user" is a quoted string (in
		   which case, there are no rules about which characters are allowed
		   and which aren't; anything goes).  E.g. "jiminy cricket"@disney.com
		   is a legal e-mail address. */
		var quotedUser="(\"[^\"]*\")"
		/* The following pattern applies for domains that are IP addresses,
		   rather than symbolic names.  E.g. joe@[123.124.233.4] is a legal
		   e-mail address. NOTE: The square brackets are required. */
		var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
		/* The following string represents an atom (basically a series of
		   non-special characters.) */
		var atom=validChars + '+'
		/* The following string represents one word in the typical username.
		   For example, in john.doe@somewhere.com, john and doe are words.
		   Basically, a word is either an atom or quoted string. */
		var word="(" + atom + "|" + quotedUser + ")"
		// The following pattern describes the structure of the user
		var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
		/* The following pattern describes the structure of a normal symbolic
		   domain, as opposed to ipDomainPat, shown above. */
		var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")
		
		
		/* Finally, let's start trying to figure out if the supplied address is
		   valid. */
		
		/* Begin with the coarse pattern to simply break up user@domain into
		   different pieces that are easy to analyze. */
		var matchArray=emailStr.match(emailPat)
		if (matchArray==null) {
		  /* Too many/few @'s or something; basically, this address doesn't
			 even fit the general mould of a valid e-mail address. */
			
			//alert("Email address seems incorrect (check @ and .'s)")
			return false
		}
		var user=matchArray[1]
		var domain=matchArray[2]
		
		// See if "user" is valid 
		if (user.match(userPat)==null) {
			// user is not valid
			
			//alert("The username doesn't seem to be valid.")
			return false
		}
		
		/* if the e-mail address is at an IP address (as opposed to a symbolic
		   host name) make sure the IP address is valid. */
		var IPArray=domain.match(ipDomainPat)
		if (IPArray!=null) {
			// this is an IP address
			  for (var i=1;i<=4;i++) {
				if (IPArray[i]>255) {
					//alert("Destination IP address is invalid!")
				return false
				}
			}
			return true
		}
		
		// Domain is symbolic name
		var domainArray=domain.match(domainPat)
		if (domainArray==null) {
			//alert("The domain name doesn't seem to be valid.")
			return false
		}
		
		/* domain name seems valid, but now make sure that it ends in a
		   three-letter word (like com, edu, gov) or a two-letter word,
		   representing country (uk, nl), and that there's a hostname preceding 
		   the domain or country. */
		
		/* Now we need to break up the domain to get a count of how many atoms
		   it consists of. */
		var atomPat=new RegExp(atom,"g")
		var domArr=domain.match(atomPat)
		var len=domArr.length
		if (domArr[domArr.length-1].length<2 || 
			domArr[domArr.length-1].length>3) {
		   // the address must end in a two letter or three letter word.
		   //alert("The address must end in a three-letter domain, or two letter country.")
		   return false
		}
		
		// Make sure there's a host name preceding the domain.
		if (len<2) {
		   var errStr="This address is missing a hostname!"
		   //alert(errStr)
		   return false
		}
		
		// If we've gotten this far, everything's valid!
		return true;
		
}

//----------------------------------------

function checkForm() {
			  var returnval;
			  if (document.login.txtemail.value == '') {
				alert("Please enter your User ID!");
				document.login.txtemail.focus();
				returnval =  false;
			  }
			  else
			  if (document.login.txtpass.value == '') {
				alert("Please enter your password!");
				document.login.txtpass.focus();
				returnval = false;
			  }
			  else {		  
				returnval = true;
			  }
			  
			  return returnval;
}


function checkCampaign1() {
			  var returnval;
			  if (document.campaign.ca_name.value == '') {
				alert("Please enter the Name you wish to give for this Campaign!");
				document.campaign.ca_name.focus();
				returnval =  false;
			  }
			  else {		  
				returnval = true;
			  }
			  
			  return returnval;
}

function checkCampaign2() {
			  var returnval;
			  if (document.campaign2.ca_subject.value == '') {
				alert("Please enter the Subject you wish to give for the Email!");
				document.campaign2.ca_subject.focus();
				returnval =  false;
			  }
			  else if (document.campaign2.ca_from_name.value == '') {
				alert("Please enter the Name you wish for the Email to apper to come from!");
				document.campaign2.ca_from_name.focus();
				returnval =  false;
			  }
			  else if (document.campaign2.ca_from_email.value == '') {
				alert("Please enter the Email Address your wish for the email to apper to come from!");
				document.campaign2.ca_from_email.focus();
				returnval =  false;
			  }
			  else if (document.campaign2.ca_reply_to.value == '') {
				alert("Please enter the Email Address you wish for recipeints to reply to!");
				document.campaign2.ca_reply_to.focus();
				returnval =  false;
			  }
			  
			  else if (checkEmailSyntax_2()==false) {		
			   	returnval =  false;
			  }

			  else {		  
				returnval = true;
			  }
			  
			  return returnval;
}


function checkCampaign3() {
			  var returnval;
			  if (document.campaign3.htmlfile.value == '') {
				alert("Please select a HTML file to be uploaded!");
				document.campaign3.htmlfile.focus();
				returnval =  false;
			  }
			  else {		  
				returnval = true;
			  }
			  
			  return returnval;
}


function checkCampaign4() {
			  var returnval;
			  if (document.getElementById("secondlist").innerHTML=='' ) {
					alert("Please select a recipient group!");
					//document.campaign4.select_list.focus();
					returnval =  false;
			  }
			  else {		  
				returnval = true;
			  }
			  
			  return returnval;
}


/***********     Kuo Wei 2-11-2007                start                                   ***********/
function checkCampaign4_1() {//check the upload content is not empty
			  var returnval;
			  if (document.campaign4.htmlfile.value == '') {
				alert("Please select a HTML file to be uploaded!");
				document.campaign4.htmlfile.focus();
				returnval =  false;
			  }
			 
			  else {		  
				returnval = true;
			  }
			  
			  return returnval;
}

function checkCampaign4_2() {//check the write content is not empty
			  var returnval;
			  if (document.campaign4.html_content.value == '') {
				alert("Textarea should not be empty!");
				document.campaign4.html_content.focus();
				returnval =  false;
			  }
			  else {		  
				returnval = true;
			  }
			  
			  return returnval;
			  
}




/***********     Kuo Wei 2-11-2007      end                                             ***********/


function checkCampaign5() {
			  var returnval;
			  if (document.campaign5.select_list.value == 'NONE') {
					alert("Please select a recipient group!");
					document.campaign5.select_list.focus();
					returnval =  false;
			  }
			  else {		  
				returnval = true;
			  }
			  
			  return returnval;
}


//-------------------------------------



function checkCampaignSMS(type) { //update bt 2008-03-08
			
			  //var keyword_result=checkKeyword(); alert(keyword_result);
			  
			 var returnval;
			  
			 if ( type=='MT' && $("campaignRecipients").value == '' ){
				  
					alert("Please select a recipient group!");
					//document.campaign_sms.select_sms_list1.focus();
					returnval =  false;
			 }		 
					 
			  else if (document.campaign_sms.ca_sms_name.value=='') {
					alert("Please go back and enter a name for your Campaign!");
					document.campaign_sms.ca_sms_name.focus();
					returnval =  false;
			  }

			  else if ( (document.campaign_sms.campaign_type.value!="contest") && (document.campaign_sms.campaign_type.value!="broadcast") && (document.campaign_sms.keyword.value == '') ) {
					alert("Please go back and enter a Keyword for your Campaign!");
					document.campaign_sms.keyword.focus();
					returnval =  false;
			  }
			  
			  //keyword availability check here!
			  else if ( (document.campaign_sms.keyword_uniqueness=="false") && (document.campaign_sms.campaign_type.value!="broadcast") ){
			  
			  		alert("The keyword you chose is not available. Please go back and enter a new Keyword!");
		      		//document.campaign_sms.keyword.focus();
			  		returnval =  false;
			  }
			  else if ( ($("messageCampaign").value == "") && (document.campaign_sms.campaign_type.value=="broadcast") ){
			  
			  		alert("Your message content is blank. Please go back and enter your message!");
		      		
			  		returnval =  false;
			  }		 
			  
			
			  else {		  
					returnval = true;
			  }
			  
			  return returnval;
}

		  
function checkKeyword() {
								
       var keyword=document.campaign_sms.keyword.value;

       if(/[^0-9a-zA-Z]/.test(keyword)){
       
              alert("Please enter a keyword containing only letters and digits and with no spaces!");
              var limit=keyword.length-1;
              keyword=keyword.substring(0,limit);//notice: never use substr, due to no cross browse
              $("keyword").value = keyword;
              return false;
                   
       }
	else{
       		
              var handlerFunc = function(t) {
					
                     if (t.responseText!="")  {
						
              	       document.campaign_sms.keyword.blur();
                            alert(t.responseText);
						
				document.campaign_sms.keyword_uniqueness.value="false";
              		return false;
              		
			}
			else {
              
              		document.campaign_sms.keyword_uniqueness.value="true";
              		return true;

                     }
		}
				
		var errFunc = function(t) {
					
			alert('Error ' + t.status + ' -- ' + t.statusText);
          		return false;
          		
		}

		var ajax1;			
		ajax1= new Ajax.Request('../processors/check_keyword.php', {parameters:'keyword='+keyword, onSuccess:handlerFunc, onFailure:errFunc});

       }			
}

/* to delete
function checkQuickSend() {
			  var returnval;
			  if (document.quicksend.mobile_numbers.value == '') {
					alert("Please enter at least 1 Mobile Number");
					document.quicksend.mobile_numbers.focus();
					returnval =  false;
			  }
			  else if (document.quicksend.mobile_numbers.value == 'Enter Mobile Numbers') {
					alert("Please enter at least 1 Mobile Number");
					document.quicksend.mobile_numbers.focus();
					returnval =  false;
			  }
			  else {		  
				returnval = true;
			  }
			  
			  return returnval;
}
*/
//-----------------------------------
//for mach textarea, it's height will expand depend on the line break user input and characters count
//currently, 62 English characters form 1 line and 39 Chinese characters form 1 line
/*function textMachCounter(fieldName) {

       var msgLength = $('message'+fieldName).value.length;
       var msg       = $('message'+fieldName).value;
             
       var lineBreakCount = msg.split("\n").length;
       alert($('message'+fieldName).cols);
       msg.split("\n").each(function(item) {
       
              var match =  /[\u4E00-\u9FFF]/.test(item);
              
              if(match){
              
                     var chCharCount = 0;
                     var charCount = 0;
                     item.toArray().each(function(character){
                     
                            var isChinese =  /[\u4E00-\u9FFF]/.test(character);
                            
                            if(isChinese)chCharCount++;
                            else charCount++;                                   
                     
                     });
                               
                     lineBreakCount = lineBreakCount + Math.floor((charCount + (chCharCount * (59/37)))/59);
              
              }
              else{
              
                     if(item.length > 59)lineBreakCount = lineBreakCount + Math.floor(item.length/59);
              
              }
              
       });

       $('message'+fieldName).style.height = lineBreakCount * 16 + "px";
       
       textCounter(fieldName);

} */

//auto grow textarea height
function textLongMachCounter(fieldName) {
       
       var msg       = $('message'+fieldName).value;
       var lineBreakCount = msg.split("\n").length;
       
       msg.split("\n").each(function(item) {
       
              $("hiddenMessage"+fieldName).innerHTML = item;
              if($("hiddenMessage"+fieldName).getWidth() >= 1230){
              
                     lineBreakCount = lineBreakCount + Math.floor($("hiddenMessage"+fieldName).getWidth() / 410);
              
              }
       
       });
       
       if(lineBreakCount >= 3)$('message'+fieldName).style.height = lineBreakCount * 16 + "px";
      
       textCounter(fieldName);

} 

//auto grow textarea height
function textMachCounter(fieldName) {
       
       var msg       = $('message'+fieldName).value;
       var lineBreakCount = msg.split("\n").length;
       
       msg.split("\n").each(function(item) {
       
              $("hiddenMessage"+fieldName).innerHTML = item;
              if($("hiddenMessage"+fieldName).getWidth() >= 410){
              
                     lineBreakCount = lineBreakCount + Math.floor($("hiddenMessage"+fieldName).getWidth() / 410);
              
              }
       
       });
       
       $('message'+fieldName).style.height = lineBreakCount * 16 + "px";
      
       textCounter(fieldName);

} 

function textCounter(fieldName) {
       
	//var optoutLength = $('optout'+fieldName).value;
	var msgLength    = $('message'+fieldName).value.length;
	var charCount    = $('charCount'+fieldName).value;
	var maxCharCount = $('maxCharCount'+fieldName).value;

       if ( msgLength > maxCharCount ) // if too long...trim it!
       
              $('message'+fieldName).value = $('message'+fieldName).value.substring(0, (maxCharCount));
		     
	// otherwise, update 'characters left' counter
       else{
		
              $('charCount'+fieldName).value =  msgLength;
              
              if($('messageType'+fieldName).checked == false){
              
                     if(charCount > 160){
                    
                            $('msgCount'+fieldName).value = parseInt(Math.ceil(charCount / 153));
                            $('messageCountPlural'+fieldName).innerHTML = 's';                                   
                    
                     }
                     else {
                     
                            $('msgCount'+fieldName).value = 1;
                            $('messageCountPlural'+fieldName).innerHTML = '';
                            
                     }
              
              }
              else if($('messageType'+fieldName).checked == true){
              
                     if(charCount > 70){
                            
                            $('msgCount'+fieldName).value = parseInt(Math.ceil(charCount / 67));
                            $('messageCountPlural'+fieldName).innerHTML = 's';                                    
                     }
                     else {
                     
                            $('msgCount'+fieldName).value = 1;
                            $('messageCountPlural'+fieldName).innerHTML = '';
                            
                     }
                     
              }
              
       }
       
}

function checkMsgType(fieldName) {
	
	var match =  /[\u4E00-\u9FFF]/.test($('message'+fieldName).value);
	
	if (match) {
	
		$('messageType'+fieldName).checked=true;
		new Effect.Appear('sendChinese'+fieldName,{duration:1});
		toggleMessageTypeCounter(fieldName);
		
	}
	else{
	
		$('sendChinese'+fieldName).style.display="none";
		$('messageType'+fieldName).checked=false;
		toggleMessageTypeCounter(fieldName);
		
	}
	
}
//for mach textarea, it doesn't show send Chinese msg checkbox
function checkMachMsgType(fieldName) {
	
	var match =  /[\u4E00-\u9FFF]/.test($('message'+fieldName).value);
	
	if (match) {
	
		$('messageType'+fieldName).checked=true;
		toggleMessageTypeCounter(fieldName);
		
	}
	else{
	
		$('messageType'+fieldName).checked=false;
		toggleMessageTypeCounter(fieldName);
		
	}
	
}

function blurMachTextarea(id){
       
       if($("message"+id).value == ""){

              if($("message_container"+id))$("message_container"+id).style.display = "none";
              else if($("topic_container"))$("topic_container").style.display = "none";
              
              if($("wrap_message"+id))$("wrap_message"+id).style.display = "";                          
              else if($("wrap_topic"))$("wrap_topic").style.display = "";    
                    
       }

}

function toggleMessageTypeCounter(fieldName){
       
       var messageName=$('messageName'+fieldName).value;
       
       if($('messageType'+fieldName).checked == true){
                 
              if(messageName == "Quicksend"){
              
                     $('maxCharCount'+fieldName).value=2010;
                     $('sendChinese'+fieldName).style.backgroundColor='#FFFF99';
              
                     if ($('message'+fieldName).value.length > 335) {
		
                            new Effect.Appear('event_1',{duration:0.5});
                            $("event_1").innerHTML ='<span class="footerstyle">You are sending a long message of more than 700 characters, this may take some time for the message to arrive..</span> '; 
				
                     }                      
              
              }
              else if(messageName == "Campaign"){
              
                     $('maxCharCount'+fieldName).value=400;
                     $('sendChinese'+fieldName).style.backgroundColor='#FFFF99';
                             
              }       
       
       }
       else if($('messageType'+fieldName).checked == false){

              if(messageName == "Quicksend"){
              
                     $('maxCharCount'+fieldName).value=4590;
                     $('sendChinese'+fieldName).style.backgroundColor='#EDF3FE';
              
                     if ($('message'+fieldName).value.length > 765) {
		
                            new Effect.Appear('event_1',{duration:0.5});
                            $("event_1").innerHTML ='<span class="footerstyle">You are sending a long message of more than 700 characters, this may take some time for the message to arrive..</span> '; 
				
                     }                      
              
              }
              else if(messageName == "Campaign"){
              
                     $('maxCharCount'+fieldName).value=800;
                     $('sendChinese'+fieldName).style.backgroundColor='#FFFFFF'; 
                             
              }       
       
       }
       
       textCounter(fieldName);       
       		
}


function checkLangCampaign (field) {
	
	var match =  /[\u4E00-\u9FFF]/.test(field.value);
	if (match) {
		document.getElementById("campaign_message_type").checked=true;
		new Effect.Appear('SendChinese',{duration:1});
	}
	else {
		document.getElementById("SendChinese").style.display="none";
		document.getElementById("campaign_message_type").checked=false;
	}
}
	
function toggleChineseCounter() { //check maxcount setting on acutal page!

		var currentMode=document.campaign_sms.maxcharcount.value;
		if (currentMode==800) {//was 402
			document.campaign_sms.maxcharcount.value=400;//was 268
			document.getElementById('SendChinese').style.backgroundColor='#FFFFFF';
		}	
		
		
		else if (currentMode==400) {//was 268
			document.campaign_sms.maxcharcount.value=800;//was 402
			document.getElementById('SendChinese').style.backgroundColor='#FFFF99';
		}
		
}

function checkMsisdnBox() {
	
	 if (document.quicksend.mobile_numbers.value=="Enter Mobile Numbers")
	 		
	 		document.quicksend.mobile_numbers.value='';
	 		
}


function validateQuickSendMsisdn() { //removes newline and carraige return)
	
	 
	 var numbers=removeCharacters(document.quicksend.mobile_numbers.value,'\n*');
	 numbers=removeCharacters(numbers,'\r*');
	 var returnval= validateNumeric(numbers);
	 return returnval;

}
	

//--------------

function MM_findObj(n, d) { //v4.01
 		 var p,i,x;  
		 
		 if(!d) d=document; 
		 if((p=n.indexOf("?"))>0&&parent.frames.length) {
   				 d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);
		 }
 		
		 if(!(x=d[n])&&d.all) x=d.all[n]; 
		 
		 for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
		 
  		 for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
		 
  		 if(!x && d.getElementById) x=d.getElementById(n); 
		 
		 return x;
    }

	
function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
	if ((obj=MM_findObj(args[i]))!=null) { 
		
		v=args[i+2];
	
		if (obj.style) { 
			obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; 
		}
		
		obj.visibility=v; 
	}
}
//-->

function tcampaign_hover(){
	
	document.getElementById("tcampaign_a").style.backgroundPosition="0 -30px";

}

function tcampaign_revert(){
	
	document.getElementById("tcampaign_a").style.backgroundPosition="0 0";

}



<!--
if (document.images) {
    button_scroll_right_r       = new Image();
    button_scroll_right_r.src   = "../images/button-scroll-right-r.gif" ;
    button_scroll_right     = new Image() ;
    button_scroll_right.src = "../images/button-scroll-right.gif" ;
    
    button_scroll_left_r       = new Image();
    button_scroll_left_r.src   = "../images/button-scroll-left-r.gif" ;  
    button_scroll_left     = new Image() ;
    button_scroll_left.src = "../images/button-scroll-left.gif" ;
    
}

function buttondown( buttonname )
{
    if (document.images) {
      document[buttonname].src = eval( buttonname + "_r.src" );
    }
}
function buttonup (buttonname)
{
    if (document.images) {
      document[buttonname].src = eval( buttonname + ".src" );
    }
}
// -->





function  validateNumeric( strValue ) {
/*****************************************************************
DESCRIPTION: Validates that a string contains only valid numbers.

PARAMETERS:
   strValue - String to be tested for validity

RETURNS:
   True if valid, otherwise false.
******************************************************************/
  var objRegExp  =  /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/;

  //check for numeric characters
  return objRegExp.test(strValue);
}


function removeCharacters( strValue, strMatchPattern ) {
/************************************************
DESCRIPTION: Removes characters from a source string
  based upon matches of the supplied pattern.

PARAMETERS:
  strValue - source string containing number.

RETURNS: String modified with characters
  matching search pattern removed

USAGE:  strNoSpaces = removeCharacters( ' sfdf  dfd',
                                '\s*')
*************************************************/
 var objRegExp =  new RegExp( strMatchPattern, 'gi' );

 //replace passed pattern matches with blanks
  return strValue.replace(objRegExp,'');
}



