// JavaScript Document

/* -- Common functions -- */

function xGetElementById(e)
{
	if(typeof(e)!='string') return e;
	if(document.getElementById) e=document.getElementById(e);
	else if(document.all) e=document.all[e];
	else e=null;
	return e;
}

function checkUrl(url)
{
	if ( (url.indexOf('http://') != -1) || (url.indexOf('https://') != -1) ) return true;
	else return false;
}

function isValidEmail(strEmail){
  validRegExp = /^[^@]+@[^@]+.[a-z]{2,}$/i;
  //strEmail = document.forms[0].email.value;

   // search email text for regular exp matches
    if (strEmail.search(validRegExp) == -1) 
   {
      return false;
    } 
    return true; 
}
