function getXhr() {
	try {
		req = new XMLHttpRequest
	} catch (a) {
		try {
			req = new ActiveXObject("Msxml2.XMLHTTP")
		} catch (b) {
			try {
				req = new ActiveXObject("Microsoft.XMLHTTP")
			} catch (c) {
				req = !1
			}
		}
	}
	return req
}
function getcurrentboard() {
	document.getElementById("CreateBoard").style.display = "block"
}
function getpin(a, b, c) {

	document.getElementById("descriptionerror").innerHTML = '';

	if ("0" == c)
		return window.open(b + "?option=com_wishlogue&view=people", "_self"), !1;
	document.getElementById("Header").style.zIndex = 9999;
	var d = getXhr();
	d.onreadystatechange = function() {
		if (4 == d.readyState)
			try {
				var a = d.responseText;
				if ("" != a) {
					var b = a.split("*&@#@%asdfbk"), c = b[0], g = b[1], k = b[2], m = b[3], l = b[4], n = b[5];
					document.getElementById("DescriptionTextarea").value = n;
					"" != l && (document.getElementById("pinImage") ? document.getElementById("pinImage").src = l : document.getElementById("imagepin").innerHTML =
							'<img src="' + l + '" name="pinImage" id="pinImage">');
					document.getElementById("pin_type_id").value = c;
					document.getElementById("pin_repin_id").value = g;
					document.getElementById("pin_url").value = m;
					document.getElementById("pin_real_pin_id").value = k;
					var p = b[7], q = b[8], r = b[9], s = b[10], t = b[11], u = b[12], v = b[13], w = b[14], x = b[15];
					document.getElementById("re_wishItem").value = q;
					document.getElementById("re_wishRetailer").value = r;
					document.getElementById("re_wishProductURL").value = s;
					document.getElementById("re_wishPrice").value =
							p;
					document.getElementById("re_wishCurrency").value = t;
					document.getElementById("re_wishQuantity").value = u;
					document.getElementById("re_wishSize").value = v;
					document.getElementById("re_wishStyle").value = w;
					document.getElementById("re_wishColor").value = x;
					Modal.show("Repin")
				}
			} catch (y) {
				alert(y.message)
			}
	};
	d.open("GET", "?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=getpininfo&pin_id=" + a, !0);
	d.send(null);
	return!0
}
function getcomment(a, b, c, d) {
	var e = document.getElementById("GridComment" + a).value, f = getXhr();
	f.onreadystatechange = function() {
		if (4 == f.readyState)
			try {
				if ("" != f.responseText) {
					var b = document.getElementById("comments_new" + a), g = document.createElement("div");
					g.setAttribute("id", "comments_new" + a);
					content = '<a href="' + d + '" class="ImgLink"><img src="' + c + '" width="50" height="50"/></a>';
					content += "<p>" + e + "</p>";
					g.innerHTML = content;
					b.appendChild(g)
				}
			} catch (k) {
				alert(k.message)
			}
	};
	f.open("GET", "?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=getcommentinfo&pin_id=" +
			a + "&user_id=" + b + "&comment=" + e, !0);
	f.send(null)
}
function addcommentElement(a, b, c, d) {
	var e = document.getElementById("comment" + a), f = document.createElement("div"), h = a + "_0_comment";
	f.setAttribute("id", h);
	"" == document.getElementById("comment_hidden_" + a).value ? (content = '<a href="' + b + '" class="ImgLink"><img src="' + c + '" ></a>', content += '<textarea class="GridComment" id="GridComment' + a + "\" onclick=\"javascript:if(this.value=='Add a comment...'){ this.value=''}\"></textarea>", content += '<a href="javascript:void(0);" class="Button WhiteButton Button11 grid_comment_button" onclick="getcomment(' + a +
			"," + d + ",'" + c + "','" + b + '\')" style="visibility: visible; display: inline; "><strong>Comment</strong><span></span></a>', f.innerHTML = content, e.appendChild(f), document.getElementById("comment_hidden_" + a).value = 1) : 1 == document.getElementById("comment_hidden_" + a).value ? (document.getElementById(h).style.display = "none", document.getElementById("comment_hidden_" + a).value = 2) : (document.getElementById(h).style.display = "block", document.getElementById("comment_hidden_" + a).value = 1)
}
function addnewboard(a) {
	var b = document.getElementById("boardtxt").value;
	if ("" == b)
		return document.getElementById("descriptionerror").innerHTML = '<label id="login_error_msg" style="display: block;clear: both;">' + board_name_exist + "</label>", !1;
	document.getElementById("descriptionerror").innerHTML = "";
	var c = getXhr();
	c.onreadystatechange = function() {
		if (4 == c.readyState)
			try {
				var a = c.responseText;
				if ("" != a)
					ddMenu("one", -1), document.getElementById("one-ddheader").innerHTML = b, document.getElementById("board_selection").value =
							a;
				else
					return ddMenu("one", -1), document.getElementById("descriptionerror").innerHTML = '<label style="color:red">' + board_name_exist + "</label>", !1
			} catch (d) {
				alert(d.message)
			}
	};
	var d = 1 < b.indexOf("&") ? b.replace("&", "_") : b;
	c.open("GET", "?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=addnewboard&user_id=" + a + "&board_name=" + d, !0);
	c.send(null)
}
function addnewmenuboard(a) {

	var b = document.getElementById("uploadboardtxt").value, c = document.getElementById("upload_board");

	if ("" == b || "Enter New Board Name" == b || "Please Enter Board Name" == b || enter_board_name == b)
		return document.getElementById("boardError").innerHTML = '<label id="login_error_msg" >' + enter_board_name + "</label>", !1;
	var d = getXhr(), e = document.getElementById("re_board_category").value;
	d.onreadystatechange = function() {
		if (4 == d.readyState)
			try {
				var a = d.responseText;
				if ("" != a) {
					var f = document.createElement("OPTION");
					f.text = b;
					f.value = a;
					c.selectedIndex = f.value;
					c.options.add(f, 0);
					f.attributes.selected = "selected";
					document.getElementById("uploadboardtxt").value = "";
					document.getElementById("upload_board").value = f.value;
					scr(".customStyleSelectBoxInner").text(f.text);
					return document.getElementById("boardError").innerHTML = "", !1
				}
				return document.getElementById("boardError").innerHTML = '<label id="login_error_msg" style="color:red;">' + board_name_exist + "</label>", !1
			} catch (e) {
			}
	};
	var f = 1 < b.indexOf("&") ? b.replace("&", "_") : b;
	d.open("GET",
			"?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=addnewboard&user_id=" + a + "&board_name=" + f + "&board_category=" + e, !0);
	d.send(null)
}
function addrepinmenuboard(a) {

	var b = document.getElementById("boardtxt").value, c = document.getElementById("repin_board");
	if ("" == b)
		return document.getElementById("descriptionerror").innerHTML = '<label style="color:red">' + enter_board_name + " </label>", !1;
	var d = getXhr(), e = document.getElementById("re_board_category").value;
	d.onreadystatechange = function() {
		if (4 == d.readyState)
			try {
				var a = d.responseText;
				if ("" != a) {
					var f = document.createElement("OPTION");
					f.text = b;
					f.value = a;
					c.selectedIndex = f.value;
					c.options.add(f, 0);
					f.attributes.selected = "selected";
					document.getElementById("boardtxt").value = "";
					document.getElementById("repin_board").value = f.value;
					scr(".customStyleSelectBoxInner").text(f.text);
					return document.getElementById("descriptionerror").innerHTML = "", !1
				}
				return document.getElementById("descriptionerror").innerHTML = '<label style="color:red">' + board_name_exist + "</label>", !1
			} catch (e) {
				alert(e.message)
			}
	};
	var f = 1 < b.indexOf("&") ? b.replace("&", "_") : b;
	d.open("GET", "?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=addnewboard&user_id=" +
			a + "&board_name=" + f + "&board_category=" + e, !0);
	d.send(null)
}
function addnewmenupin(a) {
	var b = document.getElementById("uploadboardtxted").value, c = document.getElementById("pin_board"), d = document.getElementById("board_category").value;
	if ("" == b || "Enter New Board Name" == b || enter_board_name == b)
		return document.getElementById("boardErrorpin").innerHTML = '<div id="login_error_msg" style="margin: 10px 0 0 -22px;display: block;clear: both;padding: 8px 0 0 0;">' + enter_board_name + "</div>", !1;
	var e = getXhr();
	e.onreadystatechange = function() {
		if (4 == e.readyState)
			try {
				var a = e.responseText;
				if ("" != a) {
					var d = document.createElement("OPTION");
					d.text = b;
					d.value = a;
					c.selectedIndex = d.value;
					c.options.add(d);
					d.attributes.selected = "selected";
					document.getElementById("uploadboardtxted").value = "";
					document.getElementById("pin_board").value = d.value;
					scr(".customStyleSelectBoxInner").text(d.text);
					return document.getElementById("boardErrorpin").innerHTML = "", !1
				}
				return document.getElementById("boardErrorpin").innerHTML = '<div id="login_error_msg"  style="margin: 10px 0 0 -109px;display: block;clear: both;padding: 8px 0 0 0;">' +
						board_name_exist + "</label>", !1
			} catch (f) {
				alert(f.message)
			}
	};
	var f = 1 < b.indexOf("&") ? b.replace("&", "_") : b;
	e.open("GET", "?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=addnewboard&board_category=" + d + "&user_id=" + a + "&board_name=" + f, !0);
	e.send(null)
}

function getXhr() {
	try {
		req = new XMLHttpRequest
	} catch (a) {
		try {
			req = new ActiveXObject("Msxml2.XMLHTTP")
		} catch (b) {
			try {
				req = new ActiveXObject("Microsoft.XMLHTTP")
			} catch (c) {
				req = !1
			}
		}
	}
	return req
}
function ajxGetBoards(a) {
	alert('d');
	var b = getXhr(), c = document.getElementById("repin_board").value;
	if ("" == c)
		return document.getElementById("descriptionerror").innerHTML = '<label style="color:red">Please Select A Board </label>', !1;
	var d = document.getElementById("DescriptionTextarea").value;
	document.getElementById("boardLink").href = a + "?option=com_wishlogue&view=cataloguepage&bId=" + c;
	if ("" == d)
		return document.getElementById("descriptionerror").innerHTML = '<label style="color:red">Please enter description!!!!!</label>',
				!1;
	var e = document.getElementById("pin_repin_id").value;
	a = document.getElementById("pin_real_pin_id").value;
	var f = document.getElementById("pin_user_id").value;
	0 != f && (b.onreadystatechange = function() {
		if (4 == b.readyState)
			try {
				if (b.responseText) {
					var a, d = 0;
					isNaN(scr("#repincountspan" + e).text()) ? (d = parseInt(scr("#repincountspan" + e).text().substring(0, scr("#repincountspan" + e).text().indexOf(" "))) + 1, a = d + " Repins ") : a = "1 Repin ";
					scr("#repincountspan" + e).text(a);
					RepinDialog.append()
				}
			} catch (c) {
				alert(c.message)
			}
	},
			b.open("GET", "?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=getrepin&board_id=" + c + "&description=" + d + "&repin_id=" + e + "&real_pin_id=" + a + "&pin_user_id=" + f, !0), b.send(null))
}
function getcurrentboard() {
	document.getElementById("CreateBoard").style.display = "block"
}
function getlike(a, b, c) {
	var d = getXhr();
	if (0 == b)
		return d = getXhr(), window.open("?option=com_wishlogue&view=people", "_self"), !1;
	d.onreadystatechange = function() {
		0 == c ? (document.getElementById("like" + a).style.display = "none", document.getElementById("unlike" + a).style.display = "block") : 1 == c && (document.getElementById("unlike" + a).style.display = "none", document.getElementById("like" + a).style.display = "block");
		if (4 == d.readyState)
			try {
				var b = d.responseText;
				document.getElementById("likescountspan" + a).innerHTML = b
			} catch (f) {
				alert(f.message)
			}
	};
	d.open("GET", "?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=getlikeinfo&pin_id=" + a + "&user_id=" + b + "&pin_flag=" + c, !0);
	d.send(null);
	return!0
}
function getcomment(a, b, c, d) {
	var e = document.getElementById("GridComment" + a).value, f = getXhr();
	f.onreadystatechange = function() {
		if (4 == f.readyState)
			try {
				if ("" != f.responseText) {
					var b = document.getElementById("comments_new" + a), g = document.createElement("div");
					g.setAttribute("id", "comments_new" + a);
					content = '<a href="' + d + '" class="ImgLink"><img src="' + c + '" width="50" height="50"/></a>';
					content += "<p>" + e + "</p>";
					g.innerHTML = content;
					b.appendChild(g)
				}
			} catch (k) {
				alert(k.message)
			}
	};
	f.open("GET", "?option=com_wishlogue&tmpl=component&task=getcommentinfo&pin_id=" +
			a + "&user_id=" + b + "&comment=" + e, !0);
	f.send(null)
}
function addcommentElement(a, b, c, d) {
	var e = document.getElementById("comment" + a), f = document.createElement("div"), h = a + "_0_comment";
	f.setAttribute("id", h);
	"" == document.getElementById("comment_hidden_" + a).value ? (content = '<a href="' + b + '" class="ImgLink"><img src="' + c + '" ></a>', content += '<textarea class="GridComment" id="GridComment' + a + "\" onclick=\"javascript:if(this.value=='Add a comment...'){ this.value=''}\"></textarea>", content += '<a href="javascript:void(0);" class="Button WhiteButton Button11 grid_comment_button" onclick="getcomment(' + a +
			"," + d + ",'" + c + "','" + b + '\')" style="visibility: visible; display: inline; "><strong>Comment</strong><span></span></a>', f.innerHTML = content, e.appendChild(f), document.getElementById("comment_hidden_" + a).value = 1) : 1 == document.getElementById("comment_hidden_" + a).value ? (document.getElementById(h).style.display = "none", document.getElementById("comment_hidden_" + a).value = 2) : (document.getElementById(h).style.display = "block", document.getElementById("comment_hidden_" + a).value = 1)
}
function followall(a, b, c) {
	document.getElementById("follow").innerHTML = '<input type="button" name="unfollow" value="' + un_follow_lang + '" id="unfollow" class="unfollow_btn" onclick="unfollowall(' + a + "," + b + ",'" + c + "')\" />";
	var d = c.split(","), e = c.length;
	c = getXhr();
	c.onreadystatechange = function() {
	};
	c.open("GET", "?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=followall&user_id=" + a + "&fuser_id=" + b, !0);
	c.send(null);
	for (c = 0; c < e; c++) {
		var f = '<input type="button" name="unfollowboard" value="' + un_follow_board_lang +
				'" class="unfollowboard" id="unfollowboard' + d[c] + '"  onclick="unfollows(' + a + "," + b + "," + d[c] + ')" />';
		document.getElementById("newfollowboard" + d[c]).innerHTML = f
	}
	return!0
}
function unfollowall(a, b, c) {
	document.getElementById("follow").innerHTML = '<input type="button" name="followall" value="' + follow_all_lang + '" class="follow" id="follow" onclick="followall(' + a + "," + b + ",'" + c + "')\"/>";
	var d = c.split(","), e = c.length;
	c = getXhr();
	c.onreadystatechange = function() {
	};
	c.open("GET", "?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=unfollowall&user_id=" + a + "&fuser_id=" + b, !0);
	c.send(null);
	for (c = 0; c < e; c++) {
		var f = '<input type="button" name="followboard" value="' + follow_board_lang +
				'" class="followboard followboard-height" onclick="followboard(' + a + "," + b + "," + d[c] + ')"  id="followboard' + d[c] + '"/>';
		document.getElementById("newfollowboard" + d[c]).innerHTML = f
	}
	return!0
}
function followboard(a, b, c) {
	document.getElementById("newfollowboard" + c).innerHTML = '<input type="button" name="unfollowboard" value="' + un_follow_board_lang + '" class="unfollowboard" id="unfollowboard' + c + '"   onclick="unfollows(' + a + "," + b + "," + c + ')" />';
	var d = getXhr();
	d.onreadystatechange = function() {
	};
	d.open("GET", "?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=followboard&user_id=" + a + "&fuser_id=" + b + "&boardid=" + c, !0);
	d.send(null);
	return!0
}
function unfollows(a, b, c) {
	unfollowboard = '<input type="button" name="followboard" value="' + follow_board_lang + '" class="followboard followboard-height" id="followboard' + c + '"  onclick="followboard(' + a + "," + b + "," + c + ')" />';
	document.getElementById("newfollowboard" + c).innerHTML = unfollowboard;
	var d = getXhr();
	d.onreadystatechange = function() {
	};
	d.open("GET", "?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=unfollowboard&user_id=" + a + "&fuser_id=" + b + "&boardid=" + c, !0);
	d.send(null)
}
function getCategory(a, b) {
	document.getElementById("categoryimage" + a).style.display = "none";
	document.getElementById("tickcategory" + a).style.display = "block";
	var c = document.getElementById("categorycount").value, c = 1 + Number(c), d = getXhr();
	d.onreadystatechange = function() {
	};
	document.getElementById("categorycount").value = c;
	d.open("GET", "?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=getcategoryimage&cid=" + a + "&userId=" + b, !0);
	d.send(null)
}
function getUncategory(a, b) {
	document.getElementById("categoryimage" + a).style.display = "block";
	document.getElementById("tickcategory" + a).style.display = "none";
	var c = Number(document.getElementById("categorycount").value), d = getXhr();
	d.onreadystatechange = function() {
	};
	document.getElementById("categorycount").value = c - 1;
	d.open("GET", "?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=getuncategoryimage&cid=" + a + "&userId=" + b, !0);
	d.send(null)
}
function followusers(a, b) {
	document.getElementById("category_user_follow" + b).innerHTML = '<input type="button" name="unfollow" class="unfollow"  value="' + un_follow_lang + '" id="unfollow" onclick="unfollowusers(' + a + "," + b + ')" />';
	var c = getXhr();
	c.onreadystatechange = function() {
	};
	var d = Number(document.getElementById("followerscount").value);
	document.getElementById("followerscount").value = d + 1;
	c.open("GET", "?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=followall&user_id=" + a + "&fuser_id=" + b, !0);
	c.send(null);
	return!0
}
function unfollowusers(a, b) {
	unfollowboard = '<input type="button" name="followuser" class="follow"  value="' + follow_user_lang + '" id="followuser"  onclick="followusers(' + a + "," + b + ')" />';
	document.getElementById("category_user_follow" + b).innerHTML = unfollowboard;
	var c = getXhr();
	c.onreadystatechange = function() {
	};
	var d = Number(document.getElementById("followerscount").value);
	document.getElementById("followerscount").value = d - 1;
	c.open("GET", "?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=unfollowall&user_id=" + a +
			"&fuser_id=" + b, !0);
	c.send(null)
}
function userContributers() {
	var a = document.getElementById("contributers_name_addboard").value;
	if ("Name or Email Address" == a || "" == a)
		return alert("Please enter the name"), !1;
	var b = getXhr();
	b.onreadystatechange = function() {
		if (4 == b.readyState)
			try {
				var d = b.responseText;
				if ("" == d)
					return alert("Looks like something went wrong! We're looking into it. Try again"), !1;
				var c = document.getElementById("id_contributers").value;
				if ("" != c) {
					var f = c.split(",");
					for (i = 0; i < f.length; i++)
						if (d == f[i])
							return!1;
					document.getElementById("id_contributers").value =
							c + "," + d
				} else
					document.getElementById("id_contributers").value = d;
				document.getElementById("contributer_name").style.display = "block";
				var h = document.getElementById("contributer_name"), g = document.createElement("div");
				g.setAttribute("id", "contributer_addboard" + d);
				content = a + '  <span class="add_contr_success">added successfully</span>';
				g.innerHTML = content;
				h.appendChild(g)
			} catch (k) {
				alert(k.message)
			}
	};
	var c = "?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=addcontributers&name_contributers=" + a;
	document.getElementById("menuSearchVal").innerHTML =
			"";
	b.open("GET", c, !0);
	b.send(null)
}
function mobuserContributers() {
	var a = document.getElementById("mobcontributers_name_addboard").value;
	if ("Name or Email Address" == a || "" == a)
		return alert("Please enter the name"), !1;
	var b = getXhr();
	b.onreadystatechange = function() {
		if (4 == b.readyState)
			try {
				var d = b.responseText;
				if ("" == d)
					return alert("Looks like something went wrong! We're looking into it. Try again"), !1;
				var c = document.getElementById("mobid_contributers").value;
				if ("" != c) {
					var f = c.split(",");
					for (i = 0; i < f.length; i++)
						if (d == f[i])
							return!1;
					document.getElementById("mobid_contributers").value =
							c + "," + d
				} else
					document.getElementById("mobid_contributers").value = d;
				document.getElementById("mobcontributer_name").style.display = "block";
				var h = document.getElementById("mobcontributer_name"), g = document.createElement("div");
				g.setAttribute("id", "contributer_addboard" + d);
				content = a + '  <span class="add_contr_success">added successfully</span>';
				g.innerHTML = content;
				h.appendChild(g)
			} catch (k) {
				alert(k.message)
			}
	};
	var c = "?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=addcontributers&name_contributers=" +
			a;
	document.getElementById("menuSearchVal").innerHTML = "";
	b.open("GET", c, !0);
	b.send(null)
}
function mobaddnewmenuboard(a) {
	var b = document.getElementById("mobuploadboardtxt").value, c = document.getElementById("mobupload_board");
	if ("" == b || "Enter New Board Name" == b || enter_board_name == b)
		return document.getElementById("mobboardError").innerHTML = '<label id="login_error_msg" style="margin: 10px 0 0 -144px;">' + enter_board_name + "</label>", !1;
	var d = getXhr();
	d.onreadystatechange = function() {
		if (4 == d.readyState)
			try {
				var a = d.responseText;
				if ("" != a) {
					var e = document.createElement("OPTION");
					e.text = b;
					e.value = a;
					c.selectedIndex = e.value;
					c.options.add(e);
					e.attributes.selected = "selected";
					document.getElementById("mobuploadboardtxt").value = "";
					document.getElementById("mobupload_board").value = e.value;
					scr(".customStyleSelectBoxInner").text(e.text)
				} else
					return document.getElementById("mobboardError").innerHTML = '<label id="login_error_msg" style="color:red;margin-left: -167px;">' + board_name_exist + "</label>", !1
			} catch (g) {
			}
	};
	var e = 1 < b.indexOf("&") ? b.replace("&", "_") : b;
	a = "?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=addnewboard&user_id=" +
			a + "&board_name=" + escape(e);
	d.open("GET", a, !0);
	d.send(null)
}
function mobaddnewmenupin(a) {
	var b = document.getElementById("mobuploadboardtxted").value, c = document.getElementById("mobpin_board");
	if ("" == b || "Enter New Board Name" == b || enter_board_name == b)
		return document.getElementById("mobboardErrorpin").innerHTML = '<div id="login_error_msg" style="margin: 10px 0 0 -89px;display: block;clear: both;padding: 8px 0 0 0;">' + enter_board_name + "</div>", !1;
	var d = getXhr();
	d.onreadystatechange = function() {
		if (4 == d.readyState)
			try {
				var a = d.responseText;
				if ("" != a) {
					var e = document.createElement("OPTION");
					e.text = b;
					e.value = a;
					c.selectedIndex = e.value;
					c.options.add(e);
					e.attributes.selected = "selected";
					document.getElementById("mobuploadboardtxted").value = "";
					document.getElementById("mobpin_board").value = e.value;
					scr(".customStyleSelectBoxInner").text(e.text)
				} else
					return document.getElementById("mobboardErrorpin").innerHTML = '<div id="login_error_msg"  style="margin: 10px 0 0 -109px;display: block;clear: both;padding: 8px 0 0 0;">' + board_name_exist + "</label>", !1
			} catch (g) {
				alert(g.message)
			}
	};
	var e = 1 < b.indexOf("&") ?
			b.replace("&", "_") : b;
	a = "?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=addnewboard&user_id=" + a + "&board_name=" + escape(e);
	d.open("GET", a, !0);
	d.send(null)
}
function mobgetpin(a, b, c) {
	if ("0" == c)
		return window.open(b + "?option=com_wishlogue&view=people", "_self"), !1;
	var d = getXhr();
	d.onreadystatechange = function() {
		if (4 == d.readyState)
			try {
				var a = d.responseText;
				if ("" != a) {
					var b = a.split("*&@#@%asdfbk", 7), c = b[0], g = b[1], k = b[2], m = b[3], l = b[4], n = b[5];
					document.getElementById("mobrepin").style.display = "block";
					document.getElementById("container").style.display = "none";
					document.getElementById("mobDescriptionTextarea").value = n;
					"" != l && (document.getElementById("mobpinImage") ?
							document.getElementById("mobpinImage").src = l : document.getElementById("mobimagepin").innerHTML = '<img src="' + l + '" name="pinImage" id="mobpinImage">');
					document.getElementById("mobpin_type_id").value = c;
					document.getElementById("mobpin_repin_id").value = g;
					document.getElementById("mobpin_url").value = m;
					document.getElementById("mobpin_real_pin_id").value = k
				}
			} catch (p) {
				alert(p.message)
			}
	};
	d.open("GET", "?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=getpininfo&pin_id=" + a, !0);
	d.send(null);
	return!0
}
function mobaddrepinmenuboard(a) {
	var b = document.getElementById("mobboardtxt").value, c = document.getElementById("mobrepin_board");
	if ("" == b)
		return document.getElementById("mobdescriptionerror").innerHTML = '<label style="color:red">' + enter_board_name + " </label>", !1;
	var d = getXhr();
	d.onreadystatechange = function() {
		if (4 == d.readyState)
			try {
				var a = d.responseText;
				if ("" != a) {
					var e = document.createElement("OPTION");
					e.text = b;
					e.value = a;
					c.selectedIndex = e.value;
					c.options.add(e);
					e.attributes.selected = "selected";
					document.getElementById("mobboardtxt").value =
							"";
					document.getElementById("mobrepin_board").value = e.value;
					scr(".customStyleSelectBoxInner").text(e.text)
				} else
					return document.getElementById("mobdescriptionerror").innerHTML = '<label style="color:red">' + board_name_exist + "</label>", !1
			} catch (g) {
				alert(g.message)
			}
	};
	var e = 1 < b.indexOf("&") ? b.replace("&", "_") : b;
	a = "?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=addnewboard&user_id=" + a + "&board_name=" + escape(e);
	d.open("GET", a, !0);
	d.send(null)
}
function repinCancel() {
	document.getElementById("mobrepin").style.display = "none";
	document.getElementById("container").style.display = "block"
}
function mobajxGetBoards(a) {
	alert("ji..");
	var b = getXhr(), c = document.getElementById("mobrepin_board").value;
	if ("" == c)
		return document.getElementById("mobdescriptionerror").innerHTML = '<label style="color:red">Please Select A Board </label>', !1;
	var d = document.getElementById("mobDescriptionTextarea").value;
	if ("" == d)
		return document.getElementById("mobdescriptionerror").innerHTML = '<label style="color:red">Please enter description</label>', !1;
	var e = document.getElementById("mobpin_repin_id").value, f = document.getElementById("mobpin_real_pin_id").value,
			h = document.getElementById("mobpin_user_id").value;
	0 != h && (document.getElementById("mobPostwait").style.display = "block", b.onreadystatechange = function() {
		if (4 == b.readyState)
			try {
				b.responseText && isNaN(scr("#repincountspan" + e).text()) && parseInt(scr("#repincountspan" + e).text().substring(0, scr("#repincountspan" + e).text().indexOf(" "))), document.getElementById("mobPostwait").style.display = "none", document.getElementById("mobPostsuccess").style.display = "block", window.open("?option=com_wishlogue&view=home", "_self")
			} catch (a) {
				alert(a.message)
			}
	},
			b.open("GET", a + "index.php?board_id=" + c + "&description=" + d + "&repin_id=" + e + "&real_pin_id=" + f + "&pin_user_id=" + h, !0), b.send(null))
}
function mobpingetpin(a, b, c) {
	if ("0" == c)
		return window.open(b + "?option=com_wishlogue&view=people", "_self"), !1;
	var d = getXhr();
	d.onreadystatechange = function() {
		if (4 == d.readyState)
			try {
				var a = d.responseText;
				if ("" != a) {
					var b = a.split("*&@#@%asdfbk", 7), c = b[0], g = b[1], k = b[2], m = b[3], l = b[4], n = b[5];
					document.getElementById("mobrepin").style.display = "block";
					document.getElementById("boarddiv").style.display = "none";
					document.getElementById("sideboard").style.display = "none";
					document.getElementById("pindiv").style.display =
							"none";
					document.getElementById("SocialShare").style.display = "none";
					document.getElementById("mobDescriptionTextarea").value = n;
					"" != l && (document.getElementById("mobpinImage") ? document.getElementById("mobpinImage").src = l : document.getElementById("mobimagepin").innerHTML = '<img src="' + l + '" name="pinImage" id="mobpinImage">');
					document.getElementById("mobpin_type_id").value = c;
					document.getElementById("mobpin_repin_id").value = g;
					document.getElementById("mobpin_url").value = m;
					document.getElementById("mobpin_real_pin_id").value =
							k
				}
			} catch (p) {
				alert(p.message)
			}
	};
	d.open("GET", "?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=getpininfo&pin_id=" + a, !0);
	d.send(null);
	return!0
}
function block(a, b) {
	unfollowboard = '<input type="button" name="followuser"  style="float:right;cursor: pointer;"  value="Unblock"  class="Button Button13 RedButton clickable blockuserbutton" onclick="unblock(' + a + "," + b + ');" />';
	document.getElementById("category_user_follow" + a).innerHTML = unfollowboard;
	document.getElementById("ReportLabelblock").innerHTML = "You Blocked this user";
	document.getElementById("userblock").innerHTML = "Unblock";
	document.getElementById("blockUnblockUsermessagefirst").innerHTML =
			"If you unblock";
	document.getElementById("blockUnblockUsermessagesecond").innerHTML = "you will be able to Follow each other and interact with each others pins.";
	var c = getXhr();
	c.onreadystatechange = function() {
		if (4 == c.readyState)
			try {
				location.reload(!0)
			} catch (a) {
				alert(a.message)
			}
	};
	c.open("GET", "?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=block&user_id=" + a + "&fuser_id=" + b, !0);
	c.send(null);
	return!0
}
function unblock(a, b) {
	unfollowboard = '<input type="button" name="followuser"  style="float:right;cursor: pointer;"  value="Block"  class="Button Button13 RedButton clickable blockuserbutton" onclick="block(' + a + "," + b + ');" />';
	document.getElementById("category_user_follow" + a).innerHTML = unfollowboard;
	document.getElementById("userblock").innerHTML = "Block";
	document.getElementById("blockUnblockUsermessagefirst").innerHTML = "If you block";
	document.getElementById("blockUnblockUsermessagesecond").innerHTML =
			"you wont be able to Follow each other, or interact with each others pins.";
	var c = getXhr();
	c.onreadystatechange = function() {
		if (4 == c.readyState)
			try {
				location.reload(!0)
			} catch (a) {
				alert(a.message)
			}
	};
	c.open("GET", "?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=unblock&user_id=" + a + "&fuser_id=" + b, !0);
	c.send(null)
}
function remove_contributers_addboard(a) {
	xmlhttp = window.XMLHttpRequest ? new XMLHttpRequest : new ActiveXObject("Microsoft.XMLHTTP");
	xmlhttp.onreadystatechange = function() {
		if (4 == xmlhttp.readyState && 200 == xmlhttp.status)
			try {
				document.getElementById("contributer_addboard" + a).style.display = "none"
			} catch (b) {
				alert(b.message)
			}
	};
	document.getElementById("contributer_addboard" + a).style.display = "none";
	xmlhttp.open("GET", "?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=removeContributers&user_id=" + a + "&bidd=",
			!0);
	xmlhttp.send(null);
	return!0
}
function managefamily(a, b, c) {
	document.getElementById("DIVaddfriend" + a).style.display = "none";
	document.getElementById("DIVunfriend" + a).style.display = "none";
	document.getElementById("DIVacceptfriend" + a).style.display = "none";
	document.getElementById("DIVremovefriend" + a).style.display = "none";
	document.getElementById("DIVmessage" + a).style.display = "none";
	var d;
	"family" == b ? d = Joomla.JText._("COM_WISHLOGUE_FRIENDS_ONE") : "friends" == b && (d = Joomla.JText._("COM_WISHLOGUE_FAMILY_ONE"));
	var e = getXhr();
	e.onreadystatechange =
			function() {
				if (4 == e.readyState)
					try {
						var f = parseInt(document.getElementById(b + "membersCount").innerHTML);
						"addtoFamily" == c ? "already_exist" == e.responseText ? (document.getElementById("DIVunfriend" + a).style.display = "block", f++) : "another_exist" == e.responseText ? (document.getElementById("DIVmessage" + a).style.display = "block", document.getElementById("DIVmessage" + a).innerHTML = Joomla.JText._("COM_WISHLOGUE_RGS_ANOTHER_EXIST") + d) : "already_sent" == e.responseText ? document.getElementById("DIVremovefriend" + a).style.display =
								"block" : "another_sent" == e.responseText ? (document.getElementById("DIVmessage" + a).style.display = "block", document.getElementById("DIVmessage" + a).innerHTML = Joomla.JText._("COM_WISHLOGUE_RGS_ANOTHER_SENT") + d) : "another_received" == e.responseText ? (document.getElementById("DIVmessage" + a).style.display = "block", document.getElementById("DIVmessage" + a).innerHTML = Joomla.JText._("COM_WISHLOGUE_RGS_ANOTHER_RECEIVED") + d) : "request_sent" == e.responseText ? document.getElementById("DIVremovefriend" + a).style.display = "block" :
								"request_confirmed" == e.responseText ? (document.getElementById("DIVunfriend" + a).style.display = "block", f++) : "thats_you" == e.responseText ? (document.getElementById("DIVmessage" + a).style.display = "block", document.getElementById("DIVmessage" + a).innerHTML = Joomla.JText._("COM_WISHLOGUE_RGS_THATS_YOU")) : (document.getElementById("DIVmessage" + a).style.display = "block", document.getElementById("DIVmessage" + a).innerHTML = Joomla.JText._("COM_WISHLOGUE_SOMETHING_WENT_WRONG")) : "removefromFamily" == c && ("request_deleted" ==
								e.responseText ? document.getElementById("DIVaddfriend" + a).style.display = "block" : "member_removed" == e.responseText ? (document.getElementById("DIVaddfriend" + a).style.display = "block", f--) : "another_exist" == e.responseText ? (document.getElementById("DIVmessage" + a).style.display = "block", document.getElementById("DIVmessage" + a).innerHTML = Joomla.JText._("COM_WISHLOGUE_RGS_ANOTHER_EXIST") + d) : "another_sent" == e.responseText ? (document.getElementById("DIVmessage" + a).style.display = "block", document.getElementById("DIVmessage" +
								a).innerHTML = Joomla.JText._("COM_WISHLOGUE_RGS_ANOTHER_SENT") + d) : "another_received" == e.responseText ? (document.getElementById("DIVmessage" + a).style.display = "block", document.getElementById("DIVmessage" + a).innerHTML = Joomla.JText._("COM_WISHLOGUE_RGS_ANOTHER_RECEIVED") + d) : "thats_you" == e.responseText ? (document.getElementById("DIVmessage" + a).style.display = "block", document.getElementById("DIVmessage" + a).innerHTML = Joomla.JText._("COM_WISHLOGUE_RGS_THATS_YOU")) : (document.getElementById("DIVmessage" + a).style.display =
								"block", document.getElementById("DIVmessage" + a).innerHTML = Joomla.JText._("COM_WISHLOGUE_SOMETHING_WENT_WRONG")));
						0 <= f && (document.getElementById(b + "membersCount").innerHTML = f, 1 < f ? (document.getElementById(b + "membersCountONE").style.display = "none", document.getElementById(b + "membersCountMANY").style.display = "inline") : (document.getElementById(b + "membersCountMANY").style.display = "none", document.getElementById(b + "membersCountONE").style.display = "inline"))
					} catch (h) {
						alert(h.message)
					}
			};
	e.open("GET", "?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=" +
			c + "&member=" + a + "&field=" + b, !0);
	e.send(null)
}
function managefamilyFromNotifications(a, b, c, d) {
	var e = getXhr();
	e.onreadystatechange = function() {
		if (4 == e.readyState)
			try {
				var b = parseInt(document.getElementById("DIVNotificationCount").innerHTML);
				"acceptRequest" == d ? "request_confirmed" == e.responseText ? (document.getElementById("family_manage_" + a).innerHTML = Joomla.JText._("COM_WISHLOGUE_REQUEST_ACCEPTED_SUCESSFULLY"), b--, document.getElementById("remove_from_notification_" + a).innerHTML = '<a class="Button13 Button WhiteButton"><strong>' + Joomla.JText._("COM_WISHLOGUE_NOTIFICATION_REMOVED") +
						"</strong></a>") : (document.getElementById("remove_from_notification_" + a).innerHTML = '<a class="Button13 Button WhiteButton"><strong>' + Joomla.JText._("COM_WISHLOGUE_SOMETHING_WENT_WRONG") + "</strong></a>", document.getElementById("family_manage_" + a).innerHTML = Joomla.JText._("COM_WISHLOGUE_SOMETHING_WENT_WRONG")) : "declineRequest" == d && ("request_deleted" == e.responseText ? (b--, document.getElementById("remove_from_notification_" + a).innerHTML = '<a class="Button13 Button WhiteButton"><strong>' + Joomla.JText._("COM_WISHLOGUE_NOTIFICATION_REMOVED") +
						"</strong></a>", document.getElementById("family_manage_" + a).innerHTML = Joomla.JText._("COM_WISHLOGUE_REQUEST_DECLINED_SUCESSFULLY")) : (document.getElementById("remove_from_notification_" + a).innerHTML = '<a class="Button13 Button WhiteButton"><strong>' + Joomla.JText._("COM_WISHLOGUE_SOMETHING_WENT_WRONG") + "</strong></a>", document.getElementById("family_manage_" + a).innerHTML = Joomla.JText._("COM_WISHLOGUE_SOMETHING_WENT_WRONG")));
				0 <= b && (document.getElementById("DIVNotificationCount").innerHTML = b, 1 < b ? document.getElementById("DIVNotificationCountText").innerHTML =
						" " + Joomla.JText._("COM_WISHLOGUE_NOTIFICATIONS") : document.getElementById("DIVNotificationCountText").innerHTML = " " + Joomla.JText._("COM_WISHLOGUE_NOTIFICATION"))
			} catch (c) {
				alert(c.message)
			}
	};
	e.open("GET", "?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=" + d + "&member=" + b + "&field=" + c, !0);
	e.send(null)
}
function managefamilyFromProfile(a, b, c) {
	var d = getXhr();
	d.onreadystatechange = function() {
		if (4 == d.readyState)
			try {
				"request_deleted" == d.responseText ? document.getElementById("RelationProfile").innerHTML = Joomla.JText._("COM_WISHLOGUE_REQUEST_DELETED") : "member_removed" == d.responseText ? document.getElementById("RelationProfile").innerHTML = Joomla.JText._("COM_WISHLOGUE_NOTIFICATION_REMOVED") : "request_sent" == d.responseText ? document.getElementById("RelationProfile").innerHTML = Joomla.JText._("COM_WISHLOGUE_REQUEST_SENT") :
						"request_confirmed" == d.responseText ? document.getElementById("RelationProfile").innerHTML = Joomla.JText._("COM_WISHLOGUE_REQUEST_ACCEPTED_SUCESSFULLY") : document.getElementById("RelationProfile").innerHTML = Joomla.JText._("COM_WISHLOGUE_SOMETHING_WENT_WRONG")
			} catch (a) {
				alert(a.message)
			}
	};
	d.open("GET", "?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=" + c + "&member=" + a + "&field=" + b, !0);
	d.send(null)
}
function addfamilysearch(a) {
	var b;
	"family" == a ? b = Joomla.JText._("COM_WISHLOGUE_FRIENDS_ONE") : "friends" == a && (b = Joomla.JText._("COM_WISHLOGUE_FAMILY_ONE"));
	var c = document.getElementById("familysearch").value.split("(");
	document.getElementById("addedsuccessfully").innerHTML = "";
	"" != c[1] && null != c[1] && -1 != c[1].indexOf(")") && (c[1] = c[1].replace(")", ""));
	if ("" != c[1] && null != c[1]) {
		var d = getXhr();
		d.onreadystatechange = function() {
			if (4 == d.readyState)
				try {
					if ("failed" == d.responseText)
						document.getElementById("addedsuccessfully").innerHTML =
								Joomla.JText._("COM_WISHLOGUE_RGS_USER_NOT_EXIST"), document.getElementById("familysearch").focus();
					else if ("request_sent" == d.responseText) {
						document.getElementById("addedsuccessfully").innerHTML = Joomla.JText._("COM_WISHLOGUE_RGS_REQUEST_SENT_SUCCESSFULLY");
						document.getElementById("familysearch").value = "";
						document.getElementById("familysearch").focus();
						var e = "userbox_" + c[1];
						if (document.getElementById(e)) {
							var f = document.getElementById("userid_" + c[1]).value;
							document.getElementById("DIVaddfriend" + f).style.display =
									"none";
							document.getElementById("DIVacceptfriend" + f).style.display = "none";
							document.getElementById("DIVmessage" + f).style.display = "none";
							document.getElementById("DIVunfriend" + f).style.display = "none";
							document.getElementById("DIVremovefriend" + f).style.display = "block"
						}
					} else if ("thats_you" == d.responseText)
						document.getElementById("addedsuccessfully").innerHTML = Joomla.JText._("COM_WISHLOGUE_RGS_THATS_YOU"), document.getElementById("familysearch").focus();
					else if ("already_exist" == d.responseText)
						document.getElementById("addedsuccessfully").innerHTML =
								Joomla.JText._("COM_WISHLOGUE_RGS_ALREADY_EXIST") + a, document.getElementById("familysearch").focus();
					else if ("another_exist" == d.responseText)
						document.getElementById("addedsuccessfully").innerHTML = Joomla.JText._("COM_WISHLOGUE_RGS_ANOTHER_EXIST") + b, document.getElementById("familysearch").focus();
					else if ("already_sent" == d.responseText)
						document.getElementById("addedsuccessfully").innerHTML = Joomla.JText._("COM_WISHLOGUE_RGS_ALREADY_SENT") + a, document.getElementById("familysearch").focus();
					else if ("another_sent" ==
							d.responseText)
						document.getElementById("addedsuccessfully").innerHTML = Joomla.JText._("COM_WISHLOGUE_RGS_ANOTHER_SENT") + b, document.getElementById("familysearch").focus();
					else if ("another_received" == d.responseText)
						document.getElementById("addedsuccessfully").innerHTML = Joomla.JText._("COM_WISHLOGUE_RGS_ANOTHER_RECEIVED") + b, document.getElementById("familysearch").focus();
					else if ("" != d.responseText) {
						document.getElementById("familysearch").value = "";
						document.getElementById("familysearch").focus();
						document.getElementById("errorDisp") &&
								(document.getElementById("errorDisp").style.display = "none");
						document.getElementById("addedsuccessfully").innerHTML = Joomla.JText._("COM_WISHLOGUE_REQUEST_ACCEPTED_SUCESSFULLY");
						var h = parseInt(document.getElementById(a + "membersCount").innerHTML) + 1;
						document.getElementById(a + "membersCount").innerHTML = h;
						1 < h ? (document.getElementById(a + "membersCountONE").style.display = "none", document.getElementById(a + "membersCountMANY").style.display = "inline") : (document.getElementById(a + "membersCountMANY").style.display =
								"none", document.getElementById(a + "membersCountONE").style.display = "inline");
						e = "userbox_" + c[1];
						document.getElementById(e) ? (f = document.getElementById("userid_" + c[1]).value, document.getElementById("DIVaddfriend" + f).style.display = "none", document.getElementById("DIVacceptfriend" + f).style.display = "none", document.getElementById("DIVremovefriend" + f).style.display = "none", document.getElementById("DIVmessage" + f).style.display = "none", document.getElementById("DIVunfriend" + f).style.display = "block") : "Disabled" ==
								document.getElementById("SearchTrue").value && (document.getElementById("board-followers-members").innerHTML += d.responseText)
					}
				} catch (g) {
					alert(g.message)
				}
		};
		d.open("GET", "?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=addfamilysearch&member=" + c[1] + "&field=" + a, !0);
		d.send(null)
	} else
		document.getElementById("addedsuccessfully").innerHTML = Joomla.JText._("COM_WISHLOGUE_RGS_USER_NOT_EXIST"), document.getElementById("familysearch").focus()
}
function anonymouslyGrantedWish(a) {
	var b = getXhr();
	b.onreadystatechange = function() {
		if (4 == b.readyState)
			try {
				"success" == b.responseText ? document.getElementById("anonymousStar").innerHTML = '<p class="star-success">' + Joomla.JText._("COM_WISHLOGUE_RGS_GRANTED_WISH_REQUEST_SENT") + "</p>" : document.getElementById("anonymousStar").innerHTML = '<p class="star-failed">' + Joomla.JText._("COM_WISHLOGUE_RGS_GRANTED_WISH_NOT_PERMISSION") + "</p>"
			} catch (a) {
				alert(a.message)
			}
	};
	b.open("GET", "?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=anonymouslyGrantedWish&wishID=" +
			a, !0);
	b.send(null)
}
function acceptGrantedWish(a, b) {
	var c = getXhr();
	c.onreadystatechange = function() {
		if (4 == c.readyState)
			try {
				"success" == c.responseText ? document.getElementById("grantReceived").innerHTML = '<p class="grant-granted">' + Joomla.JText._("COM_WISHLOGUE_WISH_GRANTED_SUCCESSFULLY") + "</p>" : document.getElementById("grantReceived").innerHTML = '<p class="grant-failed">' + Joomla.JText._("COM_WISHLOGUE_SOMETHING_WENT_WRONG") + "</p>"
			} catch (a) {
				alert(a.message)
			}
	};
	c.open("GET", "?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=acceptGrantedWish&wishID=" + a +
			"&memberID=" + b, !0);
	c.send(null)
}
function declineGrantedWish(a, b) {
	var c = getXhr();
	c.onreadystatechange = function() {
		if (4 == c.readyState)
			try {
				"success" == c.responseText ? document.getElementById("grantReceived").innerHTML = '<p class="grant-not-granted">' + Joomla.JText._("COM_WISHLOGUE_WISH_NOT_GRANTED") + "</p>" : document.getElementById("grantReceived").innerHTML = '<p class="grant-failed">' + Joomla.JText._("COM_WISHLOGUE_SOMETHING_WENT_WRONG") + "</p>"
			} catch (a) {
				alert(a.message)
			}
	};
	c.open("GET", "?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=declineGrantedWish&wishID=" + a +
			"&memberID=" + b, !0);
	c.send(null)
}
function manageGWFN(a, b, c, d) {
//	var getApproveMsg = '';
//	if (a === 'acceptGrantedWish') {
//		getApproveMsg = Joomla.JText._("COM_WISHLOGUE_ANAONYMOUSLY_NOTIFY_APPROVE_ACCEPT");
//	} else if (a === 'declineGrantedWish') {
//		getApproveMsg = Joomla.JText._("COM_WISHLOGUE_ANAONYMOUSLY_NOTIFY_APPROVE_DECLINE");
//	}
	var getApprove = true;
//	if (getApproveMsg != '') {
//		getApprove = confirm(getApproveMsg);
//	}

	if (getApprove === true)
	{
		var e = getXhr();
		e.onreadystatechange = function() {
			if (4 == e.readyState)
				try {

					document.getElementById("grant_manage_" + b).style.display = '';
					document.getElementById("decline_grantedwish_confirmation_box_" + b).style.display = 'none';
					document.getElementById("accept_grantedwish_confirmation_box_" + b).style.display = 'none';

					var c = parseInt(document.getElementById("DIVNotificationCount").innerHTML), d = parseInt(document.getElementById("DIVGrantedWishCount").innerHTML);
					"success" == e.responseText ? "acceptGrantedWish" == a ? (document.getElementById("grant_manage_" + b).innerHTML = '<div class="buttons-wish">' + Joomla.JText._("COM_WISHLOGUE_WISH_GRANTED_SUCCESSFULLY") + '</div>', c--, d++, document.getElementById("remove_from_notification_" + b).innerHTML = '<a class="Button13 Button WhiteButton"><strong>' +
							Joomla.JText._("COM_WISHLOGUE_NOTIFICATION_REMOVED") + "</strong></a>") : (  document.getElementById("grant_manage_" + b).innerHTML = '<div class="buttons-wish">' + Joomla.JText._("COM_WISHLOGUE_WISH_NOT_GRANTED") + '</div>') : ("declineGrantedWish" == a && (document.getElementById("remove_from_notification_" + b).innerHTML = '<a class="Button13 Button WhiteButton"><strong>' +
							Joomla.JText._("COM_WISHLOGUE_SOMETHING_WENT_WRONG") + "</strong></a>"), document.getElementById("grant_manage_" + b).innerHTML = '<div class="buttons-wish">' + Joomla.JText._("COM_WISHLOGUE_SOMETHING_WENT_WRONG") + '</div>');
					0 <= c && (document.getElementById("DIVNotificationCount").innerHTML = c, 1 < c ? document.getElementById("DIVNotificationCountText").innerHTML = " " + Joomla.JText._("COM_WISHLOGUE_NOTIFICATIONS") : document.getElementById("DIVNotificationCountText").innerHTML = " " + Joomla.JText._("COM_WISHLOGUE_NOTIFICATION"));
					0 <= d && (document.getElementById("DIVGrantedWishCount").innerHTML =
							d, 1 < d ? document.getElementById("DIVGrantedWishCountText").innerHTML = " " + Joomla.JText._("COM_WISHLOGUE_GRANTED_WISHES") : document.getElementById("DIVGrantedWishCountText").innerHTML = " " + Joomla.JText._("COM_WISHLOGUE_GRANTED_WISH"))
				} catch (g) {
					alert(g.message)
				}
		};
		e.open("GET", "?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=" + a + "&wishID=" + c + "&memberID=" + d, !0);
		e.send(null)
	}
}
function removeFromNotifications(a) {
	var b = getXhr();
	b.onreadystatechange = function() {
		if (4 == b.readyState)
			try {
				var c = parseInt(document.getElementById("DIVNotificationCount").innerHTML);
				"success" == b.responseText ? (c--, document.getElementById("remove_from_notification_" + a).innerHTML = '<a class="Button13 Button WhiteButton"><strong>' + Joomla.JText._("COM_WISHLOGUE_NOTIFICATION_REMOVED") + "</strong></a>") : document.getElementById("remove_from_notification_" + a).innerHTML = '<a class="Button13 Button WhiteButton"><strong>' +
						Joomla.JText._("COM_WISHLOGUE_SOMETHING_WENT_WRONG") + "</strong></a>";
				0 <= c && (document.getElementById("DIVNotificationCount").innerHTML = c, 1 < c ? document.getElementById("DIVNotificationCountText").innerHTML = " " + Joomla.JText._("COM_WISHLOGUE_NOTIFICATIONS") : document.getElementById("DIVNotificationCountText").innerHTML = " " + Joomla.JText._("COM_WISHLOGUE_NOTIFICATION"))
			} catch (d) {
				alert(d.message)
			}
	};
	b.open("GET", "?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=removeFromNotifications&notifyID=" + a,
			!0);
	b.send(null)
}