function isEmpty(str)
{//this function checks if the string is empty
	for (var intloop = 0; intloop < str.length; intloop++)
		if (str.charAt(intloop) !=  " ")
			return false;
		return true ;
}
//*******************************************************************************************
function checkMail(str)
{
var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/ ; // not valid
var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; //valid
if (!reg1.test(str) && reg2.test(str))
	return true ;
return false ;
}
//********************************************************************************
function checkJoinForm()
{
		if (!checkMail(document.all.joinForm.email.value))
		{
			alert("Please enter a valid email.");
			document.all.joinForm.email.focus();
			return false ;
		}
}
//*********************************************************************************
function validFreeSearch(form)
{
	if (isEmpty(form.freeSearch.value))
	{
		alert("You must enter search field.") ;
		form.freeSearch.focus() ;
		return false;
	}

	return true;
}
//***************************************************************************************
function M_stop() 
{
	document.all.tags("marquee").item(0).stop();
}
function M_start() 
{
	document.all.tags("marquee").item(0).start();
}
//***************************************************************************************
function printSpecial()
{
	var gAutoPrint = false ;
	if (document.getElementById != null)
	{
		var html = '<HTML>\n<HEAD>\n';

		if (document.getElementsByTagName != null)
		{
			var headTags = document.getElementsByTagName("head");
			if (headTags.length > 0)
				html += headTags[0].innerHTML;
		}
		
		html +="<LINK rel='stylesheet' type='text/css' media='print' href='css/print.css'>";
		html+='\n</HE' + 'AD>\n<BODY>\n';
		
		var printReadyElem = document.getElementById("printReady");
		
		if (printReadyElem != null)
		{
				html += printReadyElem.innerHTML;
				gAutoPrint = true;
		}
		else
		{
			alert("Could not find the printReady section in the HTML");
			return;
		}
			
		html += '\n123</BO' + 'DY>\n</HT' + 'ML>';
		
		var printWin = window.open("","printSpecial");
		printWin.document.open();
		printWin.document.write(html);
		printWin.document.close();
		if (gAutoPrint)
			printWin.print();
	}
	else
	{
		alert("Sorry, the print ready feature is only available in modern browsers.");
	}
}
//******************************************************************************************************