/* General Scripts */

function MouseRoll(linkid, mouseover)
{	
	if (mouseover)
	{
		document.getElementById(linkid).style.color="#ffd700";
	}
	else
	{
		document.getElementById(linkid).style.color="#ffffff";
	}
}

//*****CHECK PAYMENT FORM*****

function checkpaymentform()
{
	name_ok=true;
   	if (document.payonline.clientname.value == "") name_ok=false;

   	amount_ok=true;
	if (document.payonline.amount.value == "") 
   	{
   		amount_ok=false;
   	}
   	else
   	{
		if (isNaN(document.payonline.amount.value) == true) 
		{
			amount_ok=false;
		}
   	}

   	form_ok=(name_ok && amount_ok);

   	if (!form_ok)
   	{
      	if (name_ok==false) alert("Please enter your name");
      	if (amount_ok==false) alert("Please enter the amount you want to pay");
   	}

   	return form_ok;
}

function checknewsletter()
{
	email_ok=true;
	if (document.newsletter.email.value == "") 
	{
		email_ok=false;
	}
	else
	{
		var apos=document.newsletter.email.value.indexOf("@");
		var dotpos=document.newsletter.email.value.lastIndexOf(".");
		if (apos<1 || dotpos-apos<2)
		{
			email_ok=false;
		}
	}
	
	form_ok=email_ok;
	
	if (!form_ok)
	{
		if (email_ok==false) alert("Please enter your email address");
	}
	
	return form_ok;
}