// JavaScript Document
/**********************************************
	Validate Assign New WRITER
***********************************************/
<!--
function validate()
{
	error_msg="";
	if(trim(document.request.name.value)=="")
		error_msg=error_msg+"\n	::-	Your Name";
	if(trim(document.request.website.value)=="")
		error_msg=error_msg+"\n	::-	Website Address";
	if(trim(document.request.email.value==""))
		error_msg=error_msg+"\n	::-	Email address";
	else
	{
		if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.request.email.value))
		{
			//return (true)
		}
		else
			error_msg=error_msg+"\n	::-	Valid E-mail Address"
	}		
	if(trim(document.request.phone.value)=="")
		error_msg=error_msg+"\n	::-	Phone Number";
	if(trim(document.request.image_code.value)=="")
		error_msg=error_msg+"\n	::-	Image Code";
	if(error_msg!="")
	{
		alert("You Failed to fill in the following Required Information\n"+error_msg);
		return false;
	}	
	else 
	return true;		
}
//-->
/***************************************************************************************
			function to TRIM
***************************************************************************************/
<!--
function trim(v){
		var t="";
		for(var tk=0;tk<v.length;tk++){
			if(v.charAt(tk)!=" ")
				t+=v.charAt(tk);
		}
		return t;
	}
//-->
