
function switchyellowcolors(RecipeID, X)
{
	if (document.ratingform.Recipething.value == 0)
	{
		for (i=1; i<=5; i++)
		{
			document['bigheart_'+RecipeID+i].src='http://www.reciperewards.com/imgs/bigstar_clear.gif';
		}

		for (i=1; i<=X; i++)
		{
			document['bigheart_'+RecipeID+i].src='http://www.reciperewards.com/imgs/bigstar_yellow_100.gif';
		}
	}
}

function switchredcolors(RecipeID, X, TheImage)
{
	if (document.ratingform.Recipething.value == 0)
	{
		for (i=1; i<=5; i++)
		{
			document['bigheart_'+RecipeID+i].src='http://www.reciperewards.com/imgs/bigstar_clear.gif';
		}

		for (i=1; i<=X; i++)
		{
			document['bigheart_'+RecipeID+i].src='http://www.reciperewards.com/imgs/bigstar_yellow_100.gif';
		}
	}
}

function originalimages(RecipeID, Image_List, Image_Name)
{
	if (document.ratingform.Recipething.value == 0)
	{
		Image_List_Array = Image_List.split("|");
		Image_Name_Array = Image_Name.split("|");
					
		for (i=0; i<5; i++)
		{
			document[Image_Name_Array[i]].src=Image_List_Array[i];
		}
	}
}

function collectrating(RecipeID, X)
{
	if (document.ratingform.Recipething.value == 0)
	{
		for (i=1; i<=5; i++)
		{
			document['bigheart_'+RecipeID+i].src='http://www.reciperewards.com/imgs/bigstar_clear.gif';
		}

		for (i=1; i<=X; i++)
		{
			document['bigheart_'+RecipeID+i].src='http://www.reciperewards.com/imgs/bigstar_yellow_100.gif';
		}
		
		document.ratingform.Recipething.value = 1;
		window.open("http://www.reciperewards.com/raterecipe.html?RecipeID="+RecipeID+"&Rating="+X, "collectrating", "width=575,height=325,left=1,top=1,resizable=1")
	}
	
	else
		return false;
}

//**********************************************************
function SelectTool(Tool,showInts){
	if (Tool==1){
	
		if (showInts == 1)
		{
			var urlLink = "http://www.reciperewards.com/InterTriggers/getTrigger.cfm?TID=53&RecipeID=#RecipeID#&popup=0";
		}
		else
		{
			var urlLink = "http://www.reciperewards.com/PrintableVersion-RecipeID-#RecipeID#.html";
		}
		window.open(urlLink, "Print", "width=650,height=600,top=1,left=1,resizable=1,scrollbars=1");
	}
	else if (Tool==2){
		window.open("http://www.reciperewards.com/recipereview-recipeid-#recipeid#.html", "review", "width=575,height=350,left=1,top=1,resizable=1, scrolling=1, scrollbars=1");
	}
	else if(Tool==3) {
		var saveRecipe = confirm("Are you sure you want to Save this Recipe?");
		if (showInts == 1)
		{
			var urlLink = "http://www.reciperewards.com/InterTriggers/getTrigger.cfm?TID=54&recipe=#getCurrentRecipe.urlTitle#";
		}
		else
		{
			var urlLink = "http://www.reciperewards.com/recipe/#getCurrentRecipe.urlTitle#-saveRecipe-true.html";
		}
		if(saveRecipe) {
			window.location = urlLink;
		}
	}
	else if (Tool==4){
		alert("This feature is coming soon!");
	}
}



function rateRecipe(X){
	document.ReviewForm.ReviewRating.value=X
}
function showYellowHearts(X){
	for (i=X; i<=5; i++) {
		document.getElementById("hearth_" + i).src="http://www.reciperewards.com/imgs/bigstar_clear.gif";
	}
	for (i=1; i<=X; i++) {
		document.getElementById("hearth_" + i).src="http://www.reciperewards.com/imgs/bigstar_yellow_100.gif";
	}
}
function originalImages(){
	for (i=1; i<=5; i++) {
		document.getElementById("hearth_" + i).src="http://www.reciperewards.com/imgs/bigstar_clear.gif";
	}
}

/****** for RecipeCard Widget ********/
function selectWidgetCode(obj){
	obj.select();
}

