function changeInpValue(trgt1,trgt2)
{
	if(document.getElementById(trgt1).value=='')
	{
		document.getElementById(trgt1).value=trgt2;
	}
}

function validateContact(trgt)
{
	var trgtfrm = document.getElementById('con_form');
	jAjax.sendRequest({
		  'url':trgt+'index.php?section=static_page&action=checkVal',
		  'dataType':'html',
		  'data':jAjax.serializeForm(trgtfrm),
		  'method':'post',
		  'callback':function(resp)
			{
				if(resp.length>0)
				{
					$("#val").show();
					$("#message").html(resp);
					$("#message").show();
					$(".successMsg").hide();
					document.getElementById('successMsg').style.display='none';
					return false;
				}
				else
				{
					trgtfrm.submit();
				}
			}
	});
	return false;
}

function categoryAll(trgt)
{
	jAjax.sendRequest({
		  'url':trgt+'index.php?section=news_articles&action=category',
		  'dataType':'html',
		  'method':'get',
		  'callback':function(resp)
			{
				if(resp.length>0)
				{
					$("#fiveCategory").hide();
					$("#allCategory").html(resp);
					$("#allCategory").show();
					return false;
				}
				else
				{
					return true;
				}
			}
	});
	return false;
}
