function createnewcampaign()
	{
		$('#createarea').hide();
		var campaignname =  $("#campaign_name").val();
		var landingpage =  $("#landingpage").val();
		$.post('include/home/submitcreate.php', { 
			   campaign_name: campaignname, landingpage: landingpage 
			   },
			function(output) {
				$('#createarea').html(output).fadeIn(500);
			});	
		
	}

function confirmation(str) 
{ 
	answer = confirm(str);
	if (answer) return true;
	else return false;
}

function checkconfirm(myval, str) 
{ 
	if (myval == 4 || myval ==5 || myval == 6)
	{
		if(myval == 4)
			str = "This will delete both CLICKS and ACTIONS occurred during the selected timespan for the selected campaign. Are you sure you want to delete?";
		else if(myval == 5)
			str = "This will delete actions occurred during the selected timespan for the selected campaign. Are you sure you want to delete?";
		else if(myval == 6)
			str = "This will physically remove the selected campaign and all its records permanently. Are you sure you want to remove?";
		answer = confirm(str);
		if (answer)
			$("#myform").submit();
		else
			return false;
	}
	else
		$("#myform").submit();
}

checked=false;
function allcheck (myform) 
{
	var aa= document.getElementById('myform');
	 if (checked == false)
          {
           checked = true
          }
        else
          {
          checked = false
          }
	for (var i =0; i < aa.elements.length; i++) 
	{
	 aa.elements[i].checked = checked;
	}
 }
			

function emailpassword()
	{
		$('#forgotarea').hide();
		var email = $("#forgotemail").val();

		$.post('include/emailpassword.php', { email: email },
			function(output) {
				$('#forgotarea').html(output).fadeIn(500);
			});
	}


