function checkArticleInfo(){
	if(!$("#edtName").val()){alert("Please Enter the Website Name");return false;};
	if(!$("#edtURL").val()){alert("Please Enter the Website URL");return false;};
	if(!$("#txaIntro").val()){alert("Please Enter the Website Introduction ");return false;};
	if(!$("#edtLocation").val()){alert("Please Enter the Website Location");return false;};
	sendmail();
	return false
}



function sendmail(){

	var c="";

	c="<table border='1' cellpadding='5' cellspacing='1'>"

	c=c+"<tr>"
	c=c+"<td width='25%'>"+"Website Name:"+"</td>"
	c=c+"<td>"+$("#edtName").val()+"</td>"
	c=c+"</tr>"

	c=c+"<tr>"
	c=c+"<td width='25%'>"+"Website URL:"+"</td>"
	c=c+"<td>"+$("#edtURL").val()+"</td>"
	c=c+"</tr>"

	c=c+"<tr>"
	c=c+"<td width='25%'>"+"Introduction:"+"</td>"
	c=c+"<td>"+$("#txaIntro").val()+"</td>"
	c=c+"</tr>"

	c=c+"<tr>"
	c=c+"<td width='25%'>"+"Category:"+"</td>"
	c=c+"<td>"+$("#edtCategory").val()+"</td>"
	c=c+"</tr>"

	c=c+"<tr>"
	c=c+"<td width='25%'>"+"Location:"+"</td>"
	c=c+"<td>"+$("#edtLocation").val()+"</td>"
	c=c+"</tr>"

	c=c+"<tr>"
	c=c+"<td width='25%'>"+"Alexa Rank:"+"</td>"
	c=c+"<td>"+$("#edtAlexa").val()+"</td>"
	c=c+"</tr>"

	c=c+"<tr>"
	c=c+"<td width='25%'>"+"Google PR:"+"</td>"
	c=c+"<td>"+$("#edtPR").val()+"</td>"
	c=c+"</tr>"

	c=c+"</table>"

	$("#submitBtn").html("Sending Mail...");
	$.post(document.getElementById("edit").action,
		{
		"subject":escape($("#edtName").val()),
		"content":escape(c),
		"message":escape($("#txaIntro").val()),
		"name_mail":escape("()"),
		"item_name":escape($("#edtCategory").val()),
		"item_url":escape($("#edtUrl").val())
		},
		function(data){
			var s =data;
			if((s.length>0))
			{
				if(s.indexOf("!DOCTYPE")>0){
					alert(s.match("<p>.+?</p>")[0].replace("<p>","").replace("</p>","")+"\nSent Failure!");
				}else{
					alert(s+"\nSent Failure!");
				}
			}
			else{
				$("#edit").html("<p><font color=blue><b>Submit Successfully!</b></font> <a href=\"javascript:void(0)\" onclick=\"window.location.reload();\">[Submit Another]</a></p>");
				//alert("Sent Successfully");
			}

		}
	);
}



function ChangeValue(obj){

	if (obj.value=="True")
	{
	obj.value="False";
	return true;
	}

	if (obj.value=="False")
	{
	obj.value="True";
	return true;
	}
}

