var productId;
var productName;

function retriveproddata(prod_id, table_id) {
	try {
		xmlhttp = new XMLHttpRequest()
	} catch (e) {
		try {
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP")
		} catch (e) {
			try {
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP")
			} catch (e) {
				alert("Your browser broke!");
				return false
			}
		}
	}
	var k = tmp_rootpath + "jcarousel/lightbox/retrive_product_data.php?prod_id=" + prod_id + "&table_id=" + table_id;
	xmlhttp.open('GET', k, true);
	xmlhttp.onreadystatechange = function () {
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
			var a = xmlhttp.responseText;
			document.getElementById('lightbox-container-image-fd-New').innerHTML = a;
		}
	};
	xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	xmlhttp.send('');
}

function retrivewritereview() {
	var callPage = document.getElementById('callingPage').value;
	var pb_type = document.getElementById('pb_set').value;
	var prod_id = document.getElementById('pid_1').value;
	try {
		xmlhttp = new XMLHttpRequest()
	} catch (e) {
		try {
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP")
		} catch (e) {
			try {
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP")
			} catch (e) {
				alert("Your browser broke!");
				return false
			}
		}
	}
	var k = tmp_rootpath + "jcarousel/lightbox/write_a_review_new.php?callPage=" + callPage + "&pb_type=" + pb_type;
	xmlhttp.open('GET', k, true);
	xmlhttp.onreadystatechange = function () {
		document.getElementById('lightbox-container-image-fd-New').innerHTML = "<div class='feedbackHoldernew2'><div class='padt125' align='center'><img src='" + tmp_rootpath + "images/Loader.gif'></div></div>"
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
			document.getElementById('lightbox-container-image-fd-New').innerHTML = xmlhttp.responseText;
			document.getElementById('fname').focus();
			vote_val = 0;
			vote_qua = 0;
			vote_per = 0;
		}
	};
	xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	xmlhttp.send();
}


function retrivewritereview2() {
	var callPage = document.getElementById('callingPage').value;
	var pb_type = document.getElementById('pb_set').value;
	var prod_id = document.getElementById('pid_1').value;
	try {
		xmlhttp = new XMLHttpRequest()
	} catch (e) {
		try {
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP")
		} catch (e) {
			try {
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP")
			} catch (e) {
				alert("Your browser broke!");
				return false
			}
		}
	}
  var k = tmp_rootpath + "jcarousel/lightbox/multi_buy_offer_condition_display.php?callPage=" + callPage + "&pb_type=" + pb_type+ "&prod_id=" + prod_id;
	xmlhttp.open('GET', k, true);
	xmlhttp.onreadystatechange = function () {
		document.getElementById('lightbox-container-image-fd-New').innerHTML = "<div class='feedbackHoldernewmultibuy'><div class='padt125' align='center'><img src='" + tmp_rootpath + "images/Loader.gif'></div></div>"
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
			document.getElementById('lightbox-container-image-fd-New').innerHTML = xmlhttp.responseText;
			
			vote_val = 0;
			vote_qua = 0;
			vote_per = 0;
		}
	};
	xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	xmlhttp.send();
}




function postUserReviewNew() {
	var security_code = document.getElementById('security_code').value;	
	var calledpage = document.getElementById('calledpage').value;
	var fname = document.getElementById('fname').value;
	var productid = document.getElementById('productid').value;
	var email = document.getElementById('email').value;
	var recommend = document.getElementsByName('recommend');
	var recom;
	if (isNaN(parseInt(productid)) || parseInt(productid) == 0) {
		return false;
	}
	if (recommend[0].checked == true) {
		recom = 1;
	} else if (recommend[1].checked == true) {
		recom = 2;
	}
	var review = document.getElementById('review').value;
	var rating = document.getElementById('rating11').value;
	var quality = document.getElementById('quality').value;
	var performance = document.getElementById('performance').value;
	var value = document.getElementById('value').value;
	if (isWhitespace(value)) {
		alert('Please rate money value');
		return false
	}
	if (isWhitespace(quality)) {
		alert('Please rate for quality');
		return false
	}
	if (isWhitespace(performance)) {
		alert('Please rate for performance');
		return false
	}
	if (!isWhitespace(review)) {
		if (isWhitespace(fname)) {
			alert('Please provide your name');
			document.getElementById('fname').focus();
			return false
		} else {
			if (!isCharsInBag(fname, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-' ")) {
				alert('Please provide valid value for name');
				document.getElementById('fname').focus();
				return false
			}
		}
		if (isWhitespace(email)) {
			alert('Please provide valid email address');
			document.getElementById('email').focus();
			return false
		}
		else {
			if (!isEmail(email)) {
				alert('Please provide valid email address');
				document.getElementById('email').focus();
				return false
			}
		}
	}
	if (isWhitespace(trimAll(security_code))) {
        alert('Please enter security code.');
        return false
    }
	try {
		xmlhttp = new XMLHttpRequest()
	} catch (e) {
		try {
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP")
		} catch (e) {
			try {
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP")
			} catch (e) {
				alert("Your browser broke!");
				return false
			}
		}
	}
	var k = tmp_rootpath + 'jcarousel/lightbox/write_a_review_new.php?security_code=' + security_code + '&fname=' + fname + '&prod_id=' + productid + '&review=' + review + '&email=' + email + '&recom=' + recom + '&rating11=' + rating + '&quality=' + quality + '&performance=' + performance + '&value=' + value;
	xmlhttp.open('GET', k, true);
	xmlhttp.onreadystatechange = function () {
		//document.getElementById('lightbox-container-image-fd-New').innerHTML = "<div class='feedbackHoldernew2'><div class='padt125' align='center'><img src='" + tmp_rootpath + "images/Loader.gif'></div></div>";
		document.getElementById('submitBtn').style.display = 'none';
        document.getElementById('loaderImg').style.display = 'block';
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
			document.getElementById('submitBtn').style.display = 'block';
            document.getElementById('loaderImg').style.display = 'none';
			var a = xmlhttp.responseText;
			if (a.length == 307) {
				doUpdateProductRatingFromReviewNew(productid, rating, calledpage);
			}else {
                if (trimAll(a) == 'NOSECURITYCODE') {
                    alert('Please enter security code.');
                } else if (trimAll(a) == 'INVALIDSECURITYCODE') {
                    alert('Please enter valid security code.');
                }
                if (document.getElementById('security_code_img')) {
                    document.getElementById('security_code_img').src = 'doctor_console/include/captcha.php?width=100&height=40&characters=5&rand=' + Math.floor((Math.random() * 100) + 1);
                }
            }
            if (trimAll(a) != 'NOSECURITYCODE' && trimAll(a) != 'INVALIDSECURITYCODE') {
				document.getElementById('lightbox-container-image-fd-New').innerHTML = xmlhttp.responseText;
			}
		}
	};
	xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	xmlhttp.send();
	return false
}

function validatesalescub(b) {
	if (b == 3) {
		var username = trimAll(document.getElementById('username').value);
		var password = document.getElementById('password').value;
		if (isWhitespace(username) || username == 'Enter Email Address') {
			alert("Please enter your email address.");
			document.getElementById('username').focus();
			return false
		} else if (!isEmail(username)) {
			alert("Please enter your email address in the correct format.");
			document.getElementById('username').focus();
			return false
		} else if (!isCharsInBag(username, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@._-")) {
			alert("Your email address contains invalid characters.");
			document.getElementById('username').focus();
			return false
		} else if (isWhitespace(password) || password == '') {
			alert("Please enter your password.");
			document.getElementById('password').focus();
			return false
		}
	}
	try {
		xmlhttp = new XMLHttpRequest()
	} catch (e) {
		try {
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP")
		} catch (e) {
			try {
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP")
			} catch (e) {
				alert("Your browser broke!");
				return false
			}
		}
	}
	if (b == 2) {
		var k = tmp_rootpath + "jcarousel/lightbox/salesclub_login.php?type=" + b;
	} else if (b == 3) {
		var f = document.getElementById("username").value;
		var g = document.getElementById("password").value;
		var h = document.getElementById("action").value;
		var k = tmp_rootpath + "jcarousel/lightbox/salesclub_login.php?username=" + f + '&password=' + g + '&type=' + b + '&action=' + h
		var l = 'username=' + f + '&password=' + g + '&type=' + b + '&action=' + h
	}
	xmlhttp.open('GET', k, true);
	xmlhttp.onreadystatechange = function () {
		if (b == 2 || b == 3) {
			document.getElementById('lightbox-container-image-fd-New').innerHTML = "<div class='feedbackHolder'><div class='padt125' align='center'><img src='" + tmp_rootpath + "images/Loader.gif'></div></div>"
		}
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
			var a = xmlhttp.responseText;
			if (a != null) {
				if (b == 2 || b == 3) {
					if (a == 1) {
						window.location.reload();
					}
					else {
						document.getElementById('lightbox-container-image-fd-New').innerHTML = a
					}
				}
			}
		}
	};
	xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	xmlhttp.send(l)
}
eval(function (p, a, c, k, e, r) {
	e = function (c) {
		return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36))
	};
	if (!''.replace(/^/, String)) {
		while (c--) r[e(c)] = k[c] || e(c);
		k = [function (e) {
			return r[e]
		}];
		e = function () {
			return '\\w+'
		};
		c = 1
	};
	while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]);
	return p
}('u C(a,b){9 c=6[a].2i[b];9 d=0;v(9 i=0;i<c.1v;i++){5(c[i].2j){d=c[i].n}}o d}u 2k(b){5(b==3){5(W(6.7(\'X\').n)||6.7(\'X\').n.2l(18,8)==\'Y\'){r("y 1e 1f Y.");6.7(\'X\').Z();o q}9 c=6.7(\'X\').n;9 d=6.7(\'O\').n;9 f=C("F","1g");9 g=C("F","1h");9 h=C("F","1i");9 i=C("F","1j");9 j=C("F","1k");9 m=C("F","1l");5(j==0){r("y G 2m 2n.");o q}}5(b!=2){9 d=P(6.7(\'O\').n);5(W(d)||d==\'Q 2o 2p\'){r("y 1e 1f D 1m.");6.7(\'O\').Z();o q}t 5(!2q(d)){r("y 1e 1f D 1m 2r 2s 2t 2u.");6.7(\'O\').Z();o q}t 5(!1n(d,"2v@.2w-")){r("1o D 1m 2x 2y 2z.");6.7(\'O\').Z();o q}}H{p=I 1w()}J(e){H{p=I 10("http://assets.chemistdirect.co.uk/include/1x.11")}J(e){H{p=I 10("http://assets.chemistdirect.co.uk/include/1y.11")}J(e){r("1o 1z 1A!");o q}}}5(b==2||b==1){9 k=12+"13/w/1B.14?D="+d+\'&z=\'+z+\'&15=\'+15+\'&A=\'+b;9 l="D="+d+\'&z=\'+z+\'&15=\'+15+\'&A=\'+b}t 5(b==3){9 k="13/w/1B.14?D="+d+\'&Y=\'+c+\'&1g=\'+f+\'&1h=\'+g+\'&1i=\'+h+\'&1j=\'+i+\'&1k=\'+j+\'&1l=\'+m+\'&A=\'+b;9 l=\'D=\'+d+\'&Y=\'+c+\'&1g=\'+f+\'&1h=\'+g+\'&1i=\'+h+\'&1j=\'+i+\'&1k=\'+j+\'&1l=\'+m+\'&A=\'+b}p.1C(\'1D\',k,1p);p.1E=u(){5(b==2||b==3){6.7(\'w-R-S-T-U\').E="<B 16=\'1F\'><B 16=\'1G\' 1H=\'1I\'><1J 1K=\'"+12+"1L/1M.1N\'></B></B>"}5(p.1O==4&&p.1P==1Q){9 a=p.1R;5(a!=1S){5(b==2||b==3){6.7(\'w-R-S-T-U\').E=a}t 5(b==1){6.7(\'1T\').K.L=\'17\';6.7(\'1U\').K.L=\'17\';6.7(\'1V\').K.L=\'\';6.7(\'1W\').E=a}}}};p.1X(\'1Y-1Z\',\'20/x-21-22-23\');p.24(l)}u 2A(b){5(b==3){9 c;5(6.7("25").n==0){c=6.7("1q").n;5(c==0){r("y G M v 19");o q}}t 5(6.7("25").n==1){c=6.7("2B").n;5(W(c)){r("Q M v 19");o q}5(c==0){r("y G 26 n v 19");o q}5(!1n(c,"27")){r("Q 2a 2b M v 19");o q}}9 d;5(6.7("1a").n==0){d=6.7("1b").n;5(d==0){r("y G M v 1c");o q}}t 5(6.7("1a").n==1){d=6.7("2c").n;5(W(d)){r("Q M v 1c");o q}5(d==0){r("y G 26 n v 1c");o q}5(!1n(d,"27")){r("Q 2a 2b M v 1c");o q}}9 i;5(6.7("1a").n==0){i=6.7("1b").n}t 5(6.7("1a").n==1){i=6.7("2c").n}9 j=6.7("1r").n;5((2d(i)>2d(j))&&j>0){r("2C 2D 2E 2F 2G "+j+" 2H(s) 2I 2J 2K.");o q}}H{p=I 1w()}J(e){H{p=I 10("http://assets.chemistdirect.co.uk/include/1x.11")}J(e){H{p=I 10("http://assets.chemistdirect.co.uk/include/1y.11")}J(e){r("1o 1z 1A!");o q}}}5(b==2||b==1){9 f=6.7("2e").n;9 g=6.7("N").n;9 j=6.7("2L").n;9 k=12+"13/w/2f.14?z="+f+\'&N=\'+g+\'&1r=\'+j+\'&A=\'+b;9 l=\'z=\'+f+\'&N=\'+g+\'&1r=\'+j+\'&A=\'+b}t 5(b==3){9 f=6.7("2e").n;9 g=6.7("N").n;9 h=6.7("1s").n;9 k="13/w/2f.14?1q="+c+\'&1b=\'+d+\'&z=\'+f+\'&N=\'+g+\'&1s=\'+h+\'&A=\'+b;9 l=\'1q=\'+c+\'&1b=\'+d+\'&z=\'+f+\'&N=\'+g+\'&1s=\'+h+\'&A=\'+b}p.1C(\'1D\',k,1p);p.1E=u(){5(b==2||b==3){6.7(\'w-R-S-T-U\').E="<B 16=\'1F\'><B 16=\'1G\' 1H=\'1I\'><1J 1K=\'"+12+"1L/1M.1N\'></B></B>"}5(p.1O==4&&p.1P==1Q){9 a=p.1R;9 c=a.2g("#$#");5(a!=1S){5(b==2){6.7(\'w-R-S-T-U\').E=a}t 5(b==3){6.7(\'w-R-S-T-U\').E=c[0];2M(\'2N\',\'2O\');$(\'#2P-2Q\').2R()}t 5(b==1){6.7(\'1T\').K.L=\'17\';6.7(\'1U\').K.L=\'17\';6.7(\'1V\').K.L=\'\';6.7(\'1W\').E=a}}}};p.1X(\'1Y-1Z\',\'20/x-21-22-23\');p.24(l)}u 2S(a){9 b=a.2g("-");9 c=b[0];9 d=b[1];9 e=b[2];9 f=6.7(\'2T\').n;9 g=6.7(\'2U\').n;9 h=6.7(\'2V\').n;V=(h-c);1d=(f-d);2h=(g-e);9 i=0;5(V>0){5(2h<0){1d=1d-1}5(1d<0){V=V-1}i=V}o i}u 2W(a){5(P(a.n)=="1t"){a.n=\'\'}t 5(P(a.n)=="1u"){a.n=\'\'}a.G()}u 2X(a,b){5(P(a.n)==""&&b==\'1t\'){a.n=\'1t\'}t 5(P(a.n)==""&&b==\'1u\'){a.n=\'1u\'}}u 2Y(s,a){9 i;v(i=0;i<s.1v;i++){9 c=s.2Z(i);5(a.30(c)==-1)o q}o 1p}u 31(a){o(((a%4==0)&&((!(a%32==0))||(a%33==0)))?29:28)}', 62, 190, '|||||if|document|getElementById||var||||||||||||||value|return|xmlhttp|false|alert||else|function|for|lightbox||Please|productId|type|div|getValueRadioButtonFeedback|email|innerHTML|frmFeedbackLightBox|select|try|new|catch|style|display|Value|auto_product_price|user_email|trimAll|Enter|container|image|fd|New|theYear|isWhitespace|sugg_text|feedback|focus|ActiveXObject|XMLHTTP|tmp_rootpath|jcarousel|php|productName|class|none||Frequency|type_qty|qty|Quantity|theMonth|enter|your|p_range_rate|prices_rate|search_rate|use_rate|overall_rate|reco_friend_rate|address|isCharsInBag|Your|true|freq|max_order_quantity|atotal_price|Day|Year|length|XMLHttpRequest|Msxml2|Microsoft|browser|broke|addstockuser_data|open|GET|onreadystatechange|feedbackHolder|padt125|align|center|img|src|images|Loader|gif|readyState|status|200|responseText|null|dispemail|hidthank|dispthank|getContent_light|setRequestHeader|Content|Type|application|www|form|urlencoded|send|type_freq|valid|0123456789|||Only|Numeric|text_qty|parseInt|auto_product_id|addautodelivery|split|theDate|elements|checked|validatefeedback|substr|overall|rating|Email|Address|isEmail|in|the|correct|format|abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789|_|contains|invalid|characters|validateautodelivery|text_freq|You|cannot|buy|more|than|unit|of|this|product|auto_max_quantity|doCart|ADD|123|jquery|overlay|hide|getAgeNewForAdult|hdnadlt_current_month|hdnadlt_current_date|hdnadlt_current_year|clearAdultBirthDateField|defaultAdultBirthDateText|isAdultPopupCharsInBag|charAt|indexOf|daysAdultPopupInFebruary|100|400'.split('|'), 0, {}))
eval(function (p, a, c, k, e, r) {
	e = function (c) {
		return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36))
	};
	if (!''.replace(/^/, String)) {
		while (c--) r[e(c)] = k[c] || e(c);
		k = [function (e) {
			return r[e]
		}];
		e = function () {
			return '\\w+'
		};
		c = 1
	};
	while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]);
	return p
}('k v(a,b){6 c=b;h(c=b;c<=a;c++){2.3("0"+c).7=8+\'9/w.e\';2.3("0"+c).x=\'l m n\';2.3("0"+c).y=\'l m n\'}}k z(a,b,c){6 d=a;h(d=a;d<=b;d++){A(d<=c)2.3("0"+d).7=8+\'9/o.e\';B 2.3("0"+d).7=8+\'9/p.e\'}}k C(j,a){6 b=\'\';h(5=a;5<=j;5++){2.3("0"+5).7=8+\'9/o.e\';2.3("0"+5).q=\'\';2.3("0"+5).r=\'\';2.3("0"+5).s=\'\';2.3("0"+5).t.u=\'\'}6 c=i(a)+4;h(0=j+1;0<=c;0++){2.3("0"+0).7=8+\'9/p.e\';2.3("0"+0).q=\'\';2.3("0"+0).r=\'\';2.3("0"+0).s=\'\';2.3("0"+0).t.u=\'\'}D(a){f E:b=\'F\';g;f G:b=\'H\';g;f I:b=\'J\';g;f K:b=\'L\';g;f M:b=\'N\';g}6 d=i((i(j)-i(a)))+1;2.3(b).O=d}', 51, 51, 'img||document|getElementById||im|var|src|tmp_rootpath|images|||||gif|case|break|for|parseInt||function|Click|to|rate|orange_star_17_16|grey_star_17_16|onmouseover|onclick|onmouseout|style|cursor|showOverRating_prod|yellow_star_17_16|alt|title|showOutRating_prod|if|else|setRating|switch|51|p_range_rate|56|prices_rate|61|search_rate|66|use_rate|71|overall_rate|value'.split('|'), 0, {}))
eval(function (a) {
	a.fn.lightBox = function (b, c, d, e) {
		function u(a) {
			var b = new Date;
			c = null;
			do {
				var c = new Date
			} while (c - b < a)
		}
		function t() {
			var a, b;
			if (self.pageYOffset) {
				b = self.pageYOffset;
				a = self.pageXOffset
			} else if (document.documentElement && document.documentElement.scrollTop) {
				b = document.documentElement.scrollTop;
				a = document.documentElement.scrollLeft
			} else if (document.body) {
				b = document.body.scrollTop;
				a = document.body.scrollLeft
			}
			arrayPageScroll = new Array(a, b);
			return arrayPageScroll
		}
		function s() {
			var a, b;
			if (window.innerHeight && window.scrollMaxY) {
				a = window.innerWidth + window.scrollMaxX;
				b = window.innerHeight + window.scrollMaxY
			} else if (document.body.scrollHeight > document.body.offsetHeight) {
				a = document.body.scrollWidth;
				b = document.body.scrollHeight
			} else {
				a = document.body.offsetWidth;
				b = document.body.offsetHeight
			}
			var c, d;
			if (self.innerHeight) {
				if (document.documentElement.clientWidth) {
					c = document.documentElement.clientWidth
				} else {
					c = self.innerWidth
				}
				d = self.innerHeight
			} else if (document.documentElement && document.documentElement.clientHeight) {
				c = document.documentElement.clientWidth;
				d = document.documentElement.clientHeight
			} else if (document.body) {
				c = document.body.clientWidth;
				d = document.body.clientHeight
			}
			if (b < d) {
				pageHeight = d
			} else {
				pageHeight = b
			}
			if (a < c) {
				pageWidth = a
			} else {
				pageWidth = c
			}
			arrayPageSize = new Array(pageWidth, pageHeight, c, d);
			return arrayPageSize
		}
		function r() {
			a(j).remove();
			a(i).fadeOut(function () {
				a(i).remove()
			});
			a("embed, object").css({
				visibility: "visible"
			})
		}
		function q() {
			a("#lightbox-loading-ad").show();
			if (e.fixedNavigation) {
				a("#lightbox-image-ad,#lightbox-container-image-ad-data-box-ad,#lightbox-image-ad-details-currentNumber").hide()
			} else {
				a("#lightbox-image-ad,#lightbox-nav-ad,#lightbox-nav-ad-btnPrev,#lightbox-nav-ad-btnNext,#lightbox-container-image-ad-data-box-ad,#lightbox-image-ad-details-currentNumber").hide()
			}
			var b = new Image;
			b.onload = function () {
				a("#lightbox-image-ad").attr("src", e.imageArray[e.activeImage][0]);
				_resize_container_image_box(b.width, b.height);
				b.onload = function () {}
			};
			b.src = e.imageArray[e.activeImage][0]
		}
		function p() {
			if (d == "adult") {
				var b = '<div id="jquery-overlay_ad"></div><div id="jquery-lightbox-ad"><div id="lightbox-container-image-ad-box-ad"><div id="lightbox-container-image-ad"><img id="lightbox-image-ad"><div style="" id="lightbox-nav-ad"><a href="#" id="lightbox-nav-ad-btnPrev"></a><a href="#" id="lightbox-nav-ad-btnNext"></a></div><div id="lightbox-loading-ad"><div class="popupHolder"><div class="popupclose-btn"><a href="#" id="lightbox-secNav-btnCloseNew-ad"><img src="tspacer-1.gif"/*tpa=http://assets.chemistdirect.co.uk/include/images/tspacer.gif*/ width="37" height="38" alt="Close" border="0" /></a></div><div class="pheader"><h1>Warning: Adult Content.</h1></div><div class="textarea" style="text-align:left !important;"><p style="padding:10px;">This area of the site contains sexually oriented adult material intended for individuals 18 years of age or older. If you are not yet 18, if adult material offends you or if you are accessing this site from any country or locale where adult material is specifically prohibited by law, GO NO FURTHER!</p><p style="padding:0 10px;">Entering this area of the site means that you understand and accept responsibility for your own actions, and thereby release the proprietors of this site from all liability.</p></div><div class="birthday"  style="padding:0;"><div class="popupbtnholder"><a href="#" id="Enter-button-ad">Yes, I am 18 or over: continue to adult section</a><br><br><a href="#" id="lightbox-secNav-btnClose-ad">No, I am under 18: return to home page</a></div></div></div></div></div></div><div id="lightbox-container-image-ad-data-box-ad"><div id="lightbox-container-image-ad-data"><div id="lightbox-image-ad-details"><span id="lightbox-image-ad-details-caption"></span><span id="lightbox-image-ad-details-currentNumber"></span></div></div></div></div>';
				a("body").append(b)
			} else if (d == "subodh") {
				var b = '<div id="jquery-overlay_ad"></div><div id="jquery-lightbox-ad"><div id="lightbox-container-image-ad-box-ad"><div id="lightbox-container-image-ad"><img id="lightbox-image-ad"><div style="" id="lightbox-nav-ad"><a href="#" id="lightbox-nav-ad-btnPrev"></a><a href="#" id="lightbox-nav-ad-btnNext"></a></div><div id="lightbox-loading-ad"><div class="popupHolder2" id="popupHolder"><div class="popupclose-btn" style="left:620px; *left:320px;"><a href="#" id="lightbox-secNav-btnCloseNew-ad"><img src="tspacer-1.gif"/*tpa=http://assets.chemistdirect.co.uk/include/images/tspacer.gif*/ width="37" height="38" alt="Close" border="0" /></a></div><div class="textarea" id="Enter-button-adz2222"><div class="padt125 padb125" align="center"><img src="' + tmp_rootpath + 'images/Loader.gif"></div></div><div class="birthday">';
				b += '<div class="popupbtnholder"></div></div></div></div></div></div><div id="lightbox-container-image-ad-data-box-ad"><div id="lightbox-container-image-ad-data"><div id="lightbox-image-ad-details"><span id="lightbox-image-ad-details-caption"></span><span id="lightbox-image-ad-details-currentNumber"></span></div></div></div></div>';
				a("body").append(b);
				if (c == 1) {
					mSurvey(3)
				}
				if (c != 1) {
					setDefaultInnerHTMLSurvey(1)
				}
			} else if (d == "stock") {
				a("body").append('<div id="jquery-overlay"></div><div id="jquery-lightbox" style="top: 60.6px; left: 200px;"><div id="lightbox-container-image-box"><div id="lightbox-container-image"><table width="100%" border="0"  cellpadding="0" cellspacing="0" ><tr><td colspan="2" class="htext" align="left"><input type="hidden" name="hidden_email" id="hidden_email"><table width="100%" border="0"><tr><td  align="left"></td><td width="25%" align="right"><a href="#" class="lightbox-secNav-btnClose" ><img src="icon_close.gif"/*tpa=http://assets.chemistdirect.co.uk/include/jcarousel/lightbox/images/icon_close.gif*/></a></td></tr><tr><td id="getContent_light" style="padding-top:10px; padding-bottom:5px; padding-left:5px; padding-right:5px; " colspan="2"><div class="floatl"><img src="email.gif"/*tpa=http://assets.chemistdirect.co.uk/include/jcarousel/lightbox/images/email.gif*/ align="absmiddle" class="padr10"></div><div ><b>This item is Out of Stock. Please enter your email address below and we\'ll alert you when it becomes available.</b></div></td></tr></table></td></tr><tr><td colspan="2"><div id="hidthank" style="display:"><table width="100%" id="dispemail"><tr><td class="text12 padr5" align="right" valign="middle"><img src="tspacer-1.gif"/*tpa=http://assets.chemistdirect.co.uk/include/images/tspacer.gif*/ height="10px" width="5"></td><td align="left" class=""></td></tr><tr><td class="text12 padr5" align="right" valign="middle"><img src="tspacer-1.gif"/*tpa=http://assets.chemistdirect.co.uk/include/images/tspacer.gif*/ height="10px" width="5"><b>Email:</b> </td><td align="left"  ><input class="textbox1" type="text" name="user_email" id="user_email" onBlur="javascript: defaultText(this);" onFocus="javascript: clearSearchField(this);" value="Enter Email Address"></td></tr><tr><td></td><td align="left" class="padt15" style="padding-bottom:10px;"><input type="image" src="submit.gif"/*tpa=http://assets.chemistdirect.co.uk/include/jcarousel/lightbox/images/submit.gif*/ name="btn_prod" onClick="return validatefeedback(1);"></td></tr><tr><td colspan="2"></td></tr></table></div><table width="100%" style="display:none;" id="dispthank"><tr><td colspan="3" align="center"> </td></tr></table></td></tr></table></table></div></div><div><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"></div></div></div></div>')
			} else if (d == "Feedback") {
				a("body").append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image-fd-New"></div></div><div><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"></div></div></div></div><map name="Maplight" id="Maplight"><area shape="rect" coords="-4,0,55,26" href="#" class="lightbox-secNav-btnClose" /></map>');
				validatefeedback(2)
			} else if (d == "salesclub") {
				a("body").append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image-fd-New"></div></div><div><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"></div></div></div></div><map name="Maplight" id="Maplight"><area shape="rect" coords="-4,0,55,26" href="#" class="lightbox-secNav-btnClose" /></map>');
				validatesalescub(2)
			} else if (d == "Help") {
				a("body").append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image-fd-New"></div></div><div><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"></div></div></div></div><map name="Maplight" id="Maplight"><area shape="rect" coords="-4,0,55,26" href="#" class="lightbox-secNav-btnClose" /></map>');
				getHelpdeskanswer()
			} else if (d == "Unsubscribe") {
				a("body").append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image-fd-New"></div></div><div><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"></div></div></div></div><map name="Maplight" id="Maplight"><area shape="rect" coords="-4,0,55,26" href="#" class="lightbox-secNav-btnClose" /></map>');
				confirmUnsubscription()
			} else if (d == "Autodelivery") {
				a("body").append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image-fd-New"></div></div><div><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"></div></div></div></div><map name="Maplight" id="Maplight"><area shape="rect" coords="-4,0,55,26" href="#" class="lightbox-secNav-btnClose" /></map>');
				validateautodelivery(2)
			} else if (d == "bioprod") {
				a("body").append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image-fd-New"></div></div><div><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"></div></div></div></div><map name="Maplight" id="Maplight"><area shape="rect" coords="-4,0,55,26" href="#" class="lightbox-secNav-btnClose" /></map>');
				retriveproddata(g, h)
			} else if (d == "Writereview") {
				a("body").append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image-fd-New"></div></div><div><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"></div></div></div></div><map name="Maplight" id="Maplight"><area shape="rect" coords="-4,0,55,26" href="#" class="lightbox-secNav-btnClose" /></map>');
				retrivewritereview()
			} else if (d == "Writereview2") {
				a("body").append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image-fd-New"></div></div><div><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"></div></div></div></div><map name="Maplight" id="Maplight"><area shape="rect" coords="-4,0,55,26" href="#" class="lightbox-secNav-btnClose" /></map>');
				retrivewritereview2()
			}
			var y = s();
			a(i).css({
				backgroundColor: e.overlayBgColor,
				opacity: e.overlayOpacity,
				width: y[0],
				height: y[1]
			}).fadeIn();
			var z = t();
			var A = alertSize();
			if (d == "adult") {
				var B = A[1] / 2 - 220;
				var C = z[0]
			} else if (d == "subodh") {
				var B = A[1] / 2 - 220;
				var C = z[0]
			} else if (d == "stock") {
				var B = z[1] + 240;
				var C = z[0]
			} else if (d == "Feedback" || d == "Help" || d == "Unsubscribe" || d == "Autodelivery" || d == "salesclub" || d == "bioprod" || d == "Writereview" || d == "Writereview2") {
				var B = A[1] / 2 - 215;
				if (navigator.appName == "Microsoft Internet Explorer") {
					var C = z[0]
				} else {
					var C = z[0]
				}
			} else if (d == "Writereview") {
				var B = A[1] / 2 - 250;


				var C = z[0] - 80
			}
			else if (d == "Writereview2") {
				var B = A[1] / 2 - 250;


				var C = z[0] - 80
			}
			a(j).css({
				top: B,
				left: C
			}).show();
			a(k).click(function () {
				r();
				if (d == "adult") {
					window.location = c
				} else if (d == "subodh") {
					window.location = c
				}
				return false
			});
			a(l).click(function () {
				r();
				if (d == "adult") {
					window.location = c
				} else if (d == "subodh") {
					mSurvey(1)
				}
				return false
			});
			a(m).click(function () {
				if (d == "adult") {
					
					/*
					if (document.getElementById("hdnadlt_current_date") && document.getElementById("hdnadlt_current_month") && document.getElementById("hdnadlt_current_year")) {
						var a = document.getElementById("hdnadlt_current_year").value;
						var b = document.getElementById("adlt_birth_month").value;
						var e = document.getElementById("adlt_birth_day").value;
						var f = document.getElementById("adlt_birth_year").value;
						if (e == "Day") {
							e = ""
						}
						if (f == "Year") {
							f = ""
						}
						if (b == "") {
							alert("Please enter month of birth.");
							document.getElementById("adlt_birth_month").focus();
							return false
						} else if (e == "") {
							alert("Please enter day of birth.");
							document.getElementById("adlt_birth_day").focus();
							return false
						} else if (f == "") {
							alert("Please enter year of birth.");
							document.getElementById("adlt_birth_year").focus();
							return false
						} else if (!isAdultPopupCharsInBag(b, "0123456789")) {
							alert("Please enter valid month of birth.");
							document.getElementById("adlt_birth_month").focus();
							return false
						} else if (!isAdultPopupCharsInBag(e, "0123456789")) {
							alert("Please enter valid day of birth.");
							document.getElementById("adlt_birth_day").focus();
							return false
						} else if (!isAdultPopupCharsInBag(f, "0123456789")) {
							alert("Please enter valid year of birth.");
							document.getElementById("adlt_birth_year").focus();
							return false
						} else if (parseInt(f) < parseInt(a - 120) || parseInt(f) > parseInt(a)) {
							alert("Please enter valid date of birth.");
							document.getElementById("adlt_birth_year").focus();
							return false
						} else if (parseInt(e) < 1) {
							alert("Please enter valid date of birth.");
							document.getElementById("adlt_birth_day").focus();
							return false
						} else if ((b == "4" || b == "6" || b == "9" || b == "11") && parseInt(e) > 30) {
							alert("Please enter valid date of birth.");
							document.getElementById("adlt_birth_day").focus();
							return false
						} else if ((b == "1" || b == "3" || b == "5" || b == "7" || b == "8" || b == "10" || b == "12") && parseInt(e) > 31) {
							alert("Please enter valid date of birth.");
							document.getElementById("adlt_birth_day").focus();
							return false
						} else if (b == "2" && parseInt(e) > daysAdultPopupInFebruary(f)) {
							alert("Please enter valid date of birth.");
							document.getElementById("adlt_birth_day").focus();
							return false
						} else {
							var g = f + "-" + b + "-" + e;
							var h = getAgeNewForAdult(g);
							if (parseInt(h) >= 18) {
								r();
								UpdateAge()
							} else {
								r();
								window.location = c;
								return false
							}
						}
					} else {
						r();
						UpdateAge()
					}
					*/
					
					r();
					UpdateAge()					
					
				} else if (d == "subodh") {
					r();
					mSurvey(1)
				} else {
					r();
					UpdateAge()
				}
			});
			a(xx).click(function () {
				if (d == "subodh") {
					r();
					mSurvey(1)
				} else {
					r()
				}
			});
			a(yy).click(function () {
				if (d == "subodh") {
					r();
					mSurvey(2)
				} else {
					r()
				}
			});
			a(zz).click(function () {
				if (d == "subodh") {
					mSurvey(3)
				} else {
					r()
				}
			});
			a(window).resize(function () {
				var b = s();
				a(i).css({
					width: b[0],
					height: b[1]
				});
				var c = t();
				a(j).css({
					top: c[1] + b[3] / 10,
					left: c[0]
				})
			})
		}
		function o(b, c) {
			a("embed object").css({
				visibility: "hidden"
			});
			p();
			e.imageArray.length = 0;
			e.activeImage = 0;
			if (c.length == 1) {
				e.imageArray.push(new Array(b.getAttribute("href"), b.getAttribute("title")))
			} else {
				for (var d = 0; d < c.length; d++) {
					e.imageArray.push(new Array(c[d].getAttribute("href"), c[d].getAttribute("title")))
				}
			}
			while (e.imageArray[e.activeImage][0] != b.getAttribute("href")) {
				e.activeImage++
			}
			q()
		}
		function n() {
			if (d == "stock") {
				productId = document.getElementById("stock_product_id" + b).value;
				productName = document.getElementById("stock_product_name" + b).value
			}
			o(this, f);
			return false
		}
		e = jQuery.extend({
			overlayBgColor: "#000",
			overlayOpacity: .8,
			fixedNavigation: false,
			imageLoading: "lightbox-ico-loading.gif"/*tpa=http://assets.chemistdirect.co.uk/include/jcarousel/lightbox/images/lightbox-ico-loading.gif*/,
			imageBtnPrev: "lightbox-btn-prev.gif"/*tpa=http://assets.chemistdirect.co.uk/include/jcarousel/lightbox/images/lightbox-btn-prev.gif*/,
			imageBtnNext: "lightbox-btn-next.gif"/*tpa=http://assets.chemistdirect.co.uk/include/jcarousel/lightbox/images/lightbox-btn-next.gif*/,
			imageBtnClose: "lightbox-btn-close.gif"/*tpa=http://assets.chemistdirect.co.uk/include/jcarousel/lightbox/images/lightbox-btn-close.gif*/,
			imageBlank: "lightbox-blank.gif"/*tpa=http://assets.chemistdirect.co.uk/include/jcarousel/lightbox/images/lightbox-blank.gif*/,
			containerBorderSize: 10,
			containerResizeSpeed: 400,
			txtImage: "Image",
			txtOf: "on",
			keyToClose: "c",
			keyToPrev: "p",
			keyToNext: "n",
			imageArray: [],
			activeImage: 0
		}, e);
		var f = this;
		if (d == "stock" || d == "Feedback" || d == "Help" || d == "Unsubscribe" || d == "Autodelivery" || d == "salesclub" || d == "bioprod" || d == "Writereview"  || d == "Writereview2") {
			if (d == "bioprod") {
				var g = document.getElementById("offer_product_id").value;
				var h = document.getElementById("table_id").value
			}
			var i = "#jquery-overlay";
			var j = "#jquery-lightbox";
			var k = ".lightbox-secNav-btnClose";
			var l = ".lightbox-secNav-btnCloseNew";
			var m = "#Enter-button"
		} else {
			var i = "#jquery-overlay_ad";
			var j = "#jquery-lightbox-ad";
			var k = "#lightbox-secNav-btnClose-ad";
			var l = "#lightbox-secNav-btnCloseNew-ad";
			var m = "#Enter-button-ad";
			var xx = "#Enter-button-adx";
			var yy = "#Enter-button-ady";
			var zz = "#Enter-button-adz"
		}
		return this.unbind("click").click(n)
	}
})(jQuery)
function UpdateAge() {
	var xmlhttp;
	if (window.XMLHttpRequest) {
		// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp = new XMLHttpRequest();
	}
	else {
		// code for IE6, IE5
		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	}
	xmlhttp.onreadystatechange = function () {
		if (xmlhttp.readyState == 4) {
			//document.myForm.time.value=xmlhttp.responseText;
		}
	}
	xmlhttp.open("GET", "http://assets.chemistdirect.co.uk/include/update_adult_session.php", true);
	xmlhttp.send(null);
}

function getObjectForXML() {
	try {
		// Opera 8.0+, Firefox, Safari
		xmlhttp = new XMLHttpRequest();
		//alert(xmlhttp);
		return xmlhttp;
	}
	catch (e) {
		// Internet Explorer Browsers 
		try {
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
			return xmlhttp;
		}
		catch (e) {
			try {
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
				return xmlhttp;
			}
			catch (e) {
				// Something went wrong 
				alert("Your browser broke!");
				return false;
			}
		}
	}
}

function setDefaultInnerHTMLSurvey(defActId) {
	document.getElementById('Enter-button-adz2222').innerHTML = '<p class="feedtopsurvey"></p><p><span class="survey_txt">We value your feedback, and would appreciate if you took a few moments to respond to some questions.</span></p><p class="allow_links"><a href="#"  id="Enter-button-adx">Never</a><a href="#" id="Enter-button-ady">Later</a><a href="#" id="Enter-button-adz">Now</a></p>';
}

function mSurvey(selParam) {
	switch (selParam) {
	case 1:
		var url = tmp_rootpath + "jcarousel/lightbox/survey_data_v2.php?case=1";
		var param = "survey_url=1";
		break;
	case 2:
		var url = tmp_rootpath + "jcarousel/lightbox/survey_data_v2.php?case=2";
		var param = "survey_url=1";
		break;
	case 3:
		var url = tmp_rootpath + "jcarousel/lightbox/survey_data_v2.php?case=3";
		var param = "survey_url=1";
		break;
	}
	xmlhttp = getObjectForXML();
	if (!xmlhttp) {
		return false;
	}

	xmlhttp.open('GET', url, true);
	xmlhttp.onreadystatechange = function () {
		if (selParam == 3) {
			document.getElementById('Enter-button-adz2222').innerHTML = "<div class='padt125 padb125' align='center'><img src='" + tmp_rootpath + "images/Loader.gif'></div>";
		}
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
			var objDetails = xmlhttp.responseText;
			if (objDetails != null) {
				if (selParam == 3) {
					document.getElementById('Enter-button-adz2222').innerHTML = objDetails;
				}
			}
		}
	}
	xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	xmlhttp.send(param);
}

function validatefeedbackcaptcha(b) {
    if (b == 3) {
        if (isWhitespace(document.getElementById('sugg_text').value) || document.getElementById('sugg_text').value.substr(18, 8) == 'feedback') {
            alert("Please enter your feedback.");
            document.getElementById('sugg_text').focus();
            return false
        }
        var c = document.getElementById('sugg_text').value;
        var d = document.getElementById('user_email').value;
        var f = getValueRadioButtonFeedback("frmFeedbackLightBox", "p_range_rate");
        var g = getValueRadioButtonFeedback("frmFeedbackLightBox", "prices_rate");
        var h = getValueRadioButtonFeedback("frmFeedbackLightBox", "search_rate");
        var i = getValueRadioButtonFeedback("frmFeedbackLightBox", "use_rate");
        var j = getValueRadioButtonFeedback("frmFeedbackLightBox", "overall_rate");
        var m = getValueRadioButtonFeedback("frmFeedbackLightBox", "reco_friend_rate");
        if (j == 0) {
            alert("Please select overall rating.");
            return false
        }
		//start new code for captcha
		var sc = document.getElementById('security_code').value;//get security code
		if (trimAll(sc)=='') {
            alert("Please enter security code.");
            return false
        }
		//end new code for captcha
    }
    if (b != 2) {
        var d = trimAll(document.getElementById('user_email').value);
        if (isWhitespace(d) || d == 'Enter Email Address') {
            alert("Please enter your email address.");
            document.getElementById('user_email').focus();
            return false
        } else if (!isEmail(d)) {
            alert("Please enter your email address in the correct format.");
            document.getElementById('user_email').focus();
            return false
        } else if (!isCharsInBag(d, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@._-")) {
            alert("Your email address contains invalid characters.");
            document.getElementById('user_email').focus();
            return false
        }
    }
    try {
        xmlhttp = new XMLHttpRequest()
    } catch (e) {
        try {
            xmlhttp = new ActiveXObject("Msxml2.XMLHTTP")
        } catch (e) {
            try {
                xmlhttp = new ActiveXObject("Microsoft.XMLHTTP")
            } catch (e) {
                alert("Your browser broke!");
                return false
            }
        }
    }
    if (b == 2 || b == 1) {
        var k = tmp_rootpath + "jcarousel/lightbox/addstockuser_data.php?email=" + d + '&productId=' + productId + '&productName=' + productName + '&type=' + b;
        var l = "email=" + d + '&productId=' + productId + '&productName=' + productName + '&type=' + b
    } else if (b == 3) {
        var k = "jcarousel/lightbox/addstockuser_data.php?security_code=" + sc + "&email=" + d + '&feedback=' + c + '&p_range_rate=' + f + '&prices_rate=' + g + '&search_rate=' + h + '&use_rate=' + i + '&overall_rate=' + j + '&reco_friend_rate=' + m + '&type=' + b;
        var l = 'email=' + d + '&feedback=' + c + '&p_range_rate=' + f + '&prices_rate=' + g + '&search_rate=' + h + '&use_rate=' + i + '&overall_rate=' + j + '&reco_friend_rate=' + m + '&type=' + b
    }
    xmlhttp.open('GET', k, true);
    xmlhttp.onreadystatechange = function () {
		if(document.getElementById('submitBtn')){ document.getElementById('submitBtn').style.display = 'none'; }
		if(document.getElementById('loaderImg')){ document.getElementById('loaderImg').style.display = 'block';	}
        if (b == 2 || b == 3) {
            //document.getElementById('lightbox-container-image-fd-New').innerHTML = "<div class='feedbackHolder'><div class='padt125' align='center'><img src='" + tmp_rootpath + "images/Loader.gif'></div></div>"
        }
        if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
			if(document.getElementById('submitBtn')){ document.getElementById('submitBtn').style.display = 'block'; }
			if(document.getElementById('loaderImg')){ document.getElementById('loaderImg').style.display = 'none';	}
			
            var a = xmlhttp.responseText;
            if (a != null) {
                if (b == 2 || b == 3) {
					if(trimAll(a)=='NOSECURITYCODE'){ 
						alert('Please enter security code.'); 
					}else if(trimAll(a)=='INVALIDSECURITYCODE'){ 
						alert('Please enter valid security code.'); 
					}
					if(document.getElementById('security_code_img')){
						document.getElementById('security_code_img').src='doctor_console/include/captcha.php?width=100&height=40&characters=5&rand='+Math.floor((Math.random()*100)+1);
					}
					
					if(trimAll(a)!='NOSECURITYCODE' && trimAll(a)!='INVALIDSECURITYCODE') {
                    	document.getElementById('lightbox-container-image-fd-New').innerHTML = a
					}
                } else if (b == 1) {
                    document.getElementById('dispemail').style.display = 'none';
                    document.getElementById('hidthank').style.display = 'none';
                    document.getElementById('dispthank').style.display = '';
                    document.getElementById('getContent_light').innerHTML = a
                }
            }
        }
    };
    xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    xmlhttp.send(l)
}
