﻿// JScript File

function CreateXMLObj()
{
  	var obj = null;
	if (window.ActiveXObject) 
	{
		try
		{ 
			obj = new ActiveXObject("Msxml2.XMLHTTP"); 
		}
		catch(e)
		{
			try
			{
				obj = new ActiveXObject("Microsoft.XMLHTTP");
			}
		catch(e1)
			{
				obj = null;	
			}
		}
	}
	else if(window.XMLHttpRequest) 
	{
		obj = new XMLHttpRequest();
		obj.overrideMimeType('text/xml');
	}
	return obj;
}

function GetBrowserType()
{
	var isIE = ((document.all)? true  : false ); //for Internet Explorer
	var isFF = ((document.getElementById && !document.all)? true: false ); //for Mozilla Firefox
	if (isIE)
	{
		return "isIE";
	}
	else if(isFF)
	{
		return "isFF";
	}
}

 function Redirect(url)
 {
      location.href = url;
 }
 
 
function checkEmail(myForm) 
{

  if (myForm.value=="") 
    {
      return (true);
    }

if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(myForm.value))
{
return (true)
}
alert("Invalid E-mail Address! Please re-enter.")
myForm.value="";
myForm.focus();
return (false)
}