// Unsubscribe User From Product Subscriptions
function ajaxProdUpdatesUnsubscribe(lngID)
{
	ajaxDraw('productTakeActionMenu','/includes/AJAXFuncs/index.asp?AAction=ProdUpdatesUnsubscribe&ID='+lngID);
	alert('We have removed your subscription.');
}

function ajaxProdUpdatesSubscribe(lngID)
{
	ajaxDraw('productTakeActionMenu','/includes/AJAXFuncs/index.asp?AAction=ProdUpdatesSubscribe&ID='+lngID);
	alert('You have now been subscribed to this product and will receive updates.');
}

function ajaxAddHerbalImage(lngID)
{
	var strImg = document.getElementById('txtImageURL').value;
	
	if (strImg=='')
	{
		alert('Please enter the image URL and try again.');
		document.getElementById('txtImageURL').focus();
		return;
	}
	
	ajaxDraw('DrawSingleHerbalMedImages','/includes/AJAXFuncs/index.asp?AAction=AddHerbalImage&ID='+lngID+'&strImage='+strImg);


}

function ajaxAddHerbalMedContent(lngID,lngType,strTxtID)
{
	var strTextField = document.getElementById(strTxtID).value;
	var strVImage = document.getElementById('txtImage'+lngType).value;
	
	if(strTextField=='')
	{
		alert('Please enter the information you wish to post and try again.');
		document.getElementById(strTxtID).focus();
		return;
	}
	
	if (strVImage=='')
	{
		alert('Please verify that you are a human before you continue.');
		document.getElementById('txtImage'+lngType).focus();
		return;
	}
	
	
	ajaxDraw('DrawSingleHerbalMedHeadingContent'+lngType,'/includes/AJAXFuncs/index.asp?AAction=AddHerbalContent&ID='+lngID+'&lngType='+lngType+'&strContent='+strTextField+'&vImage='+strVImage);
	
}


function updateHerbContent(oFrm,lngType,lngHerbID,lngID)
{
	
	if(oFrm.txtHerbContent.value=='')
	{
		alert('Please enter the content before you update.');
		oFrm.txtHerbContent.focus();
		return;
	}
	
	ajaxDraw('DrawSingleHerbalMedHeadingContent'+lngType,'/admin/ajax.asp?PageAction=SaveHerbContent&HerbID='+lngHerbID+'&TypeID='+lngType+'&ID='+lngID+'&strContent='+oFrm.txtHerbContent.value);
	
}

function ajaxAddDiseAndCondition(lngID,strName,strTitle,strLongDesc,intDiseConditionsCategories_ID)
{
	var strTextField = document.getElementById(strName).value;
	
	if(strTextField=='')
	{
		alert('Please enter the name of the treatment you wish to post and try again.');
		document.getElementById(strName).focus();
		return;
	}

	var strTextField2 = document.getElementById(strTitle).value;
	
	if(strTextField2=='')
	{
		alert('Please enter the title of the treatment you wish to post and try again.');
		document.getElementById(strTitle).focus();
		return;
	}


	var strTextField3 = document.getElementById(strLongDesc).value;
	
	if(strTextField3=='')
	{
		alert('Please enter the description of the treatment you wish to post and try again.');
		document.getElementById(strLongDesc).focus();
		return;
	}
	
	var intTextField4 = document.getElementById(intDiseConditionsCategories_ID).value;
	
	if(intTextField4=='')
	{
		alert('Please select a category and try again.');
		document.getElementById(intDiseConditionsCategories_ID).focus();
		return;
	}
	
	ajaxDraw('DrawSingleHerbalMedDisConditions','/includes/AJAXFuncs/index.asp?AAction=AddDiseAndCondition&ID='+lngID+'&strName='+strTextField+'&strTitle='+strTextField2+'&strLongDesc='+strTextField3+'&intDiseConditionsCategories_ID='+intTextField4);
	
}

function ajaxListDiseAndCondition(lngID,strLetter)
{
	ajaxDraw('DrawDieaseConditionList','/includes/AJAXFuncs/index.asp?AAction=ListDiseAndCondition&ID='+lngID+'&strLetter='+strLetter);
	
	document.getElementById('TestName').style.display='block';
	
}

function ajaxSaveDiseAndCondition(HerbalMedication_ID,DiseAndConditions_ID)
{
	ajaxDraw('DrawSingleHerbalMedDisConditions','/includes/AJAXFuncs/index.asp?AAction=SaveDiseAndCondition&HerbalMedication_ID='+HerbalMedication_ID+'&DiseAndConditions_ID='+DiseAndConditions_ID);
	slideDiv('DrawDieaseConditionListHolder');
	
}