function focusIt()
{
	document.getElementById("YourName").focus();
}

function IsEmail(Expression)
{
	if (Expression == null)
		return (false);

	var supported = 0;
	if (window.RegExp)
	{
		var tempStr = "a";
		var tempReg = new RegExp(tempStr);
		if (tempReg.test(tempStr)) supported = 1;
	}
	if (!supported) 
		return (Expression.indexOf(".") > 2) && (Expression.indexOf("@") > 0);
	var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
	var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
	return (!r1.test(Expression) && r2.test(Expression));
}

function hideText()
{
	if(document.getElementById("txtWord").value=="TYPE THE PRODUCT OR COMPANY HERE")
		document.getElementById("txtWord").value="";
}

function showText()
{
	if(document.getElementById("txtWord").value=="")
		document.getElementById("txtWord").value="TYPE THE PRODUCT OR COMPANY HERE";
}

function validateSearch()
{
	if(document.getElementById("txtWord").value=="TYPE THE PRODUCT OR COMPANY HERE")
	{
		alert("Enter the Product Name or Company Name to Search");
		document.getElementById("txtWord").focus();
		return false;
	}
	return true;
}

function setSts(ch)
{
	document.getElementById("txtSts").value=ch;
}

function ValidateFeed()
{
	if(document.getElementById("YourName").value=="")
	{
		alert("Enter your name");
		document.getElementById("YourName").focus();
		return false;
	}
	if(document.getElementById("Address").value=="")
	{
		alert("Enter your Contact Address");
		document.getElementById("Address").focus();
		return false;
	}
	if(document.getElementById("Comments").value=="")
	{
		alert("Enter your Comments");
		document.getElementById("Comments").focus();
		return false;
	}
	if(document.getElementById("Email").value!="")
	{
		if(!IsEmail(document.getElementById("Email").value))
		{
			alert("Enter a valid Email Address");
			document.getElementById("Email").focus();
			return false;
		}
	}
}

function Validate1()
{
	if(document.getElementById("Category").value=="0")
	{
		alert("Select the Category")
		document.getElementById("Category").focus()
		return false
	}
	return true
}

function ValidEnquiry()
{
	if(document.getElementById("YourName").value=="")
	{
		alert("Enter your name");
		document.getElementById("YourName").focus();
		return false;
	}
	if(document.getElementById("Address").value=="")
	{
		alert("Enter your Contact Address");
		document.getElementById("Address").focus();
		return false;
	}
	if(document.getElementById("Comments").value=="")
	{
		alert("Enter your Comments");
		document.getElementById("Comments").focus();
		return false;
	}
	if(document.getElementById("Email").value!="")
	{
		if(!IsEmail(document.getElementById("Email").value))
		{
			alert("Enter a valid Email Address");
			document.getElementById("Email").focus();
			return false;
		}
	}
}

function ShowAddress()
{
	document.getElementById("InfoDiv").innerHTML=document.getElementById("addDiv").innerHTML
	document.getElementById("InfoDiv").filters[0].apply()
	document.getElementById("InfoDiv").filters[0].play()
}

function ShowContact()
{
	document.getElementById("InfoDiv").innerHTML=document.getElementById("conDiv").innerHTML
	document.getElementById("InfoDiv").filters[0].apply()
	document.getElementById("InfoDiv").filters[0].play()
}

function ShowService()
{
	document.getElementById("InfoDiv").innerHTML=document.getElementById("serDiv").innerHTML
	document.getElementById("InfoDiv").filters[0].apply()
	document.getElementById("InfoDiv").filters[0].play()
}

