
function validEmailAddress(email) 
{
	var goodEmail = email.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\.info)|(\.biz)|(\..{2,2}))$)\b/gi);
	if (!goodEmail)
	{
		return false;
	}
	return true;
}


function trimStr(str) 
{
  	return str.replace(/^\s+|\s+$/g,'');
}


function getWindowHeight()
{
    if (self.innerHeight)
		return self.innerHeight;
    if (document.documentElement && document.documentElement.clientHeight)
        return document.documentElement.clientHeight;
    if (document.body) 
		return document.body.clientHeight;
    return 0;
}

function getWindowWidth()
{
    if (self.innerWidth)
		return self.innerWidth;
    if (document.documentElement && document.documentElement.clientWidth)
        return document.documentElement.clientWidth;
    if (document.body)
		return document.body.clientWidth;
    return 0;
}




function submitConfirm(message,theform)
{
if (confirm(message))
	document.theform.submit()
}


function isInteger(sText)
{
   var ValidChars = "0123456789";
   var isInteger=true;
   var Char;

 
   for (var i = 0; i < sText.length && isInteger == true; i++) 
    { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
      {
         isInteger = false;
      }
    }
   return isInteger;
}


function pressReturnOnInputText(currentEvent)
{
	var keyCode = (currentEvent.which != null ? currentEvent.which : currentEvent.keyCode);

	if (keyCode == 13) 
	{
 		return(false);
	} 
	else 
	{
		return(true);
	}
}


function getWindowHeight()
{
    if (self.innerHeight)
		return self.innerHeight;
    if (document.documentElement && document.documentElement.clientHeight)
        return document.documentElement.clientHeight;
    if (document.body) 
		return document.body.clientHeight;
		
    return 0;
}

function getWindowWidth()
{
    if (self.innerWidth)
		return self.innerWidth;
    if (document.documentElement && document.documentElement.clientWidth)
        return document.documentElement.clientWidth;
    if (document.body)
		return document.body.clientWidth;
		
    return 0;
}


function getScreenHeight()
{
    if (screen.height)
	{
		return screen.height;
	}
	else
	{
		return 0;
	}
}

function getScreenWidth()
{
    if (screen.width)
	{
		return screen.width;
	}
	else
	{
		return 0;
	}
}
