// JavaScript Document
function CheckForm()
{
	Industry = (document.AForm.Industry.selectedIndex)-0;
	Location = (document.AForm.Location.selectedIndex)-0;
	Keyword = (document.AForm.txtKeyword.value);
	Keyword = Keyword.trim();
	if(Keyword=='Enter Keyword (s)')
		Keyword='';
	if((Industry==0 && Location==0 && Keyword=='' ) || (Industry==0 && Location==0 && Keyword.length<3))
	{
		 alert("You must enter at least one valid value for search"); 
		 document.AForm.txtKeyword.focus();
		 return false; 
	}
	return true;
}

function ClearKeywordText()
{
	Keyword = (document.AForm.txtKeyword.value);
	if (Keyword == 'Enter Keyword (s)')
	{
		document.AForm.txtKeyword.value = '';
		document.AForm.txtKeyword.style.color = '#000000';
	}
}

function SetKeywordText()
{
	Keyword = (document.AForm.txtKeyword.value);
	Keyword = Keyword.trim();
	if (Keyword == '')
	{
		document.AForm.txtKeyword.value = 'Enter Keyword (s)';
		document.AForm.txtKeyword.style.color = '#BBBBBB';
	}
}

String.prototype.trim = function () {
    return this.replace(/^\s*/, "").replace(/\s*$/, "");}

function getdate() {
 var mydate = new Date();
 var dayofweek = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
 var months = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
 var myYear = mydate.getYear();
 if (myYear < 1000) myYear += 1900;
 //document.write(dayofweek[mydate.getDay()] + ", " + months[mydate.getMonth()] + " " + mydate.getDate() + ", "  + myYear);
 document.write("Within last 5 minutes on " + months[mydate.getMonth()] + " " + mydate.getDate() + ", "  + myYear);
}