/* OnlineOpinion v4.1.7 */
/* This product and other products of OpinionLab, Inc. are protected by U.S. Patent No. 6606581, 6421724, 6785717 B1 and other patents pending. */
var OnlineOpinion = new Object();
OnlineOpinion.util = {
	SafeAddOnLoadEvent : function(func) {
	
		if (!document.getElementById | !document.getElementsByTagName)
			return;
		var oldonload = window.onload;
		if (document.addEventListener) {
			document.addEventListener("DOMContentLoaded", func, false);
		}
		if (typeof window.onload != 'function') {
			window.onload = func
		} else {
			
			window.onload = function() {
				oldonload();
				func()
			}
		}
	},
	SafeAddOnUnLoadEvent : function(func) {
		if (!document.getElementById | !document.getElementsByTagName)
			return;
		var oldonunload = window.onunload;
		if (typeof window.onunload != 'function') {
			window.onunload = func
		} else {
			window.onunload = function() {
				func();
				oldonunload()
			}
		}
	},
	popup : function(url, wname, wfeatures) {
		var wpopup = window.open(url, wname, wfeatures);
		if (typeof wpopup == 'undefined') {
			if (document.all) {
				document.getElementById("test").href = url;
				document.getElementById("test").click()
			} else {
				var newWindow = window.open(url, '_g');
				newWindow.focus()
			}
		}
		;
		return false
	},
	walkAnchors : function(node, depth, internal_links_re, ooObj) {
		var MAX_NODES = 1000;
		var count = 0;
		while (node && depth > 0) {
			count++;
			if (count >= MAX_NODES) {
				var handler = function() {
					OnlineOpinion.util.walkAnchors(node, depth,
							internal_links_re, ooObj)
				};
				setTimeout(handler, 50);
				return
			}
			if (node.tagName == "A" || node.tagName == "AREA") {
				if (internal_links_re.test(node.href)) {
					node.onmousedown = function() {
						ooObj.Preferences.Plugins.Events.poX = 0
					}
				}
			}
			if (node.tagName == "INPUT") {
				if (node.type == "submit" || node.type == "image") {
					node.onmousedown = function() {
						ooObj.Preferences.Plugins.Events.poX = 0
					}
				}
			}
			if (node.tagName == "FORM") {
				if (typeof node.onsubmit != 'function') {
					node.onsubmit = function() {
						ooObj.Preferences.Plugins.Events.poX = 0
					}
				} else {
					var oldonsubmit = node.onsubmit;
					node.onsubmit = function() {
						ooObj.Preferences.Plugins.Events.poX = 0;
						oldonsubmit()
					}
				}
			}
			if (node.nodeType == 1) {
				var skipre = /^(script|style|textarea)/i;
				if (!skipre.test(node.tagName) && node.childNodes.length > 0) {
					node = node.childNodes[0];
					depth++;
					continue
				}
			}
			if (node.nextSibling) {
				node = node.nextSibling
			} else {
				while (depth > 0) {
					node = node.parentNode;
					depth--;
					if (node == null)
						break;
					if (node.nextSibling) {
						node = node.nextSibling;
						break
					}
				}
			}
		}
	},
	change_parent_url : function(url) {
		document.location = url
	}
};
OnlineOpinion.cookie = function() {
	this.cookie_name = 'oo_r';
	this.expiration = 24 * 60 * 60 * 1000;
	this.rhex = function(num) {
		var hex_chr = '0123456789abcdef', _3 = '';
		for ( var j = 0; j <= 3; j++)
			_3 += hex_chr.charAt((num >> (j * 8 + 4)) & 0x0F)
					+ hex_chr.charAt((num >> (j * 8)) & 0x0F);
		return _3
	};
	this.str2blks_MD5 = function(_3) {
		var nblk = ((_3.length + 8) >> 6) + 1, blks = new Array(nblk * 16);
		var i = 0;
		for (; i < nblk * 16; i++)
			blks[i] = 0;
		for (i = 0; i < _3.length; i++)
			blks[i >> 2] |= _3.charCodeAt(i) << ((i % 4) * 8);
		blks[i >> 2] |= 0x80 << ((i % 4) * 8);
		blks[nblk * 16 - 2] = _3.length * 8;
		return blks
	};
	this._4 = function(x, y) {
		var lsw = (x & 0xFFFF) + (y & 0xFFFF), msw = (x >> 16) + (y >> 16)
				+ (lsw >> 16);
		return (msw << 16) | (lsw & 0xFFFF)
	};
	this.rol = function(num, cnt) {
		return (num << cnt) | (num >>> (32 - cnt))
	};
	this.cmn = function(q, a, b, x, s, t) {
		return this._4(this.rol(this._4(this._4(a, q), this._4(x, t)), s), b)
	};
	this._0 = function(a, b, c, d, x, s) {
		return this.cmn((b & c) | ((~b) & d), a, 0, x, s, 0)
	};
	this._1 = function(a, b, c, d, x, s) {
		return this.cmn((b & c) | (b & d) | (c & d), a, 0, x, s, 1518500249)
	};
	this._2 = function(a, b, c, d, x, s) {
		return this.cmn(b ^ c ^ d, a, 0, x, s, 1859775393)
	};
	this._6 = function(_3) {
		var x = this.str2blks_MD5(_3), a = 1732584193, b = -271733879, c = -1732584194, d = 271733878;
		for ( var i = 0; i < x.length; i += 16) {
			var olda = a, oldb = b, oldc = c, oldd = d;
			a = this._0(a, b, c, d, x[i + 0], 3);
			d = this._0(d, a, b, c, x[i + 1], 7);
			c = this._0(c, d, a, b, x[i + 2], 11);
			b = this._0(b, c, d, a, x[i + 3], 19);
			a = this._0(a, b, c, d, x[i + 4], 3);
			d = this._0(d, a, b, c, x[i + 5], 7);
			c = this._0(c, d, a, b, x[i + 6], 11);
			b = this._0(b, c, d, a, x[i + 7], 19);
			a = this._0(a, b, c, d, x[i + 8], 3);
			d = this._0(d, a, b, c, x[i + 9], 7);
			c = this._0(c, d, a, b, x[i + 10], 11);
			b = this._0(b, c, d, a, x[i + 11], 19);
			a = this._0(a, b, c, d, x[i + 12], 3);
			d = this._0(d, a, b, c, x[i + 13], 7);
			c = this._0(c, d, a, b, x[i + 14], 11);
			b = this._0(b, c, d, a, x[i + 15], 19);
			a = this._1(a, b, c, d, x[i + 0], 3);
			d = this._1(d, a, b, c, x[i + 4], 5);
			c = this._1(c, d, a, b, x[i + 8], 9);
			b = this._1(b, c, d, a, x[i + 12], 13);
			a = this._1(a, b, c, d, x[i + 1], 3);
			d = this._1(d, a, b, c, x[i + 5], 5);
			c = this._1(c, d, a, b, x[i + 9], 9);
			b = this._1(b, c, d, a, x[i + 13], 13);
			a = this._1(a, b, c, d, x[i + 2], 3);
			d = this._1(d, a, b, c, x[i + 6], 5);
			c = this._1(c, d, a, b, x[i + 10], 9);
			b = this._1(b, c, d, a, x[i + 14], 13);
			a = this._1(a, b, c, d, x[i + 3], 3);
			d = this._1(d, a, b, c, x[i + 7], 5);
			c = this._1(c, d, a, b, x[i + 11], 9);
			b = this._1(b, c, d, a, x[i + 15], 13);
			a = this._2(a, b, c, d, x[i + 0], 3);
			d = this._2(d, a, b, c, x[i + 8], 9);
			c = this._2(c, d, a, b, x[i + 4], 11);
			b = this._2(b, c, d, a, x[i + 12], 15);
			a = this._2(a, b, c, d, x[i + 2], 3);
			d = this._2(d, a, b, c, x[i + 10], 9);
			c = this._2(c, d, a, b, x[i + 6], 11);
			b = this._2(b, c, d, a, x[i + 14], 15);
			a = this._2(a, b, c, d, x[i + 1], 3);
			d = this._2(d, a, b, c, x[i + 9], 9);
			c = this._2(c, d, a, b, x[i + 5], 11);
			b = this._2(b, c, d, a, x[i + 13], 15);
			a = this._2(a, b, c, d, x[i + 3], 3);
			d = this._2(d, a, b, c, x[i + 11], 9);
			c = this._2(c, d, a, b, x[i + 7], 11);
			b = this._2(b, c, d, a, x[i + 15], 15);
			a = this._4(a, olda);
			b = this._4(b, oldb);
			c = this._4(c, oldc);
			d = this._4(d, oldd)
		}
		return this.rhex(a) + this.rhex(b) + this.rhex(c) + this.rhex(d)
	};
	this.read = function(n) {
		var neq = n + "=";
		var ca = document.cookie.split(';');
		for ( var i = 0; i < ca.length; i++) {
			var c = ca[i];
			while (c.charAt(0) == ' ')
				c = c.substring(1, c.length);
			if (c.indexOf(neq) == 0)
				return unescape(c.substring(neq.length, c.length))
		}
		return null
	};
	this.write = function(n, v) {
		document.cookie = n
				+ '='
				+ v
				+ ';path=/;expires='
				+ (new Date((new Date()).getTime() + this.expiration))
						.toGMTString()
	};
	this.matchurl = function(u, type) {
		var i = 0, c = this.read(this.cookie_name);
		if (type == 'domain')
			u = window.location.hostname;
		n = this._6(u);
		if (c == null)
			return false;
		while (i < c.length) {
			j = i + n.length;
			if (c.substring(i, j) == n) {
				return (unescape(c.substring(j + 1, j + 2)) == 1)
			}
			i++
		}
		return false
	};
	this.tagurl = function(u, type) {
		if (type == 'domain')
			u = window.location.hostname;
		var prev_val = "";
		if (this.read(this.cookie_name) != null) {
			prev_val = this.read(this.cookie_name).replace(
					eval('/' + escape(this._6(u)) + '~1:/g'), '')
		}
		this.write(this.cookie_name, prev_val + (prev_val != '' ? ':' : '')
				+ escape(this._6(u)) + '~1')
	}
};
function unescapeHTML(str) {
	var div = document.createElement('div'), acc = '';
	div.innerHTML = str.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>])+)?>|<\/\w+>/gi,
			'');
	for ( var i = 0; i < div.childNodes.length; i++) {
		acc = acc + div.childNodes[i].nodeValue
	}
	return acc
};
OnlineOpinion.tleaf = {
	get_session : function(c_name) {
		if (document.cookie.length > 0) {
			c_start = document.cookie.indexOf(c_name + "=");
			if (c_start != -1) {
				c_start = c_start + c_name.length + 1;
				c_end = document.cookie.indexOf(";", c_start);
				if (c_end == -1)
					c_end = document.cookie.length;
				return unescape(document.cookie.substring(c_start, c_end))
			}
		}
		return ""
	}
};
OnlineOpinion.onPageCCSubmitted = false;
OnlineOpinion.instanceCount = 0;
OnlineOpinion.renderOnPageCC = function(iframe_id, div_id, json_id) {
	var oIframe = document.getElementById(iframe_id), oDoc = oIframe.contentDocument
			|| oIframe.contentWindow.document;
	oDoc.open();
	oDoc.write(unescapeHTML(cc_html).replace("resize(_c('_d'));", ''));
	var intervalID = window
			.setInterval(
					function() {
						if (oDoc.body) {
							if (!window.opera)
								oDoc.close();
							window.clearInterval(intervalID);
							var innerBody = oDoc.body, innerDoc = oDoc
									|| frames[iframe_id].document, onPageCCDiv = document
									.getElementById(div_id), innerHeight = window.innerHeight
									|| document.documentElement.clientHeight, scrollBars = (innerBody.scrollHeight + 1) > innerHeight, frameHeight = scrollBars ? innerHeight - 40
									: innerBody.scrollHeight + 1;
							oIframe.style.height = frameHeight + 'px';
							if (scrollBars)
								oIframe.style.width = '555px';
							innerBody.style.border = "none";
							onPageCCDiv.style.display = 'block';
							onPageCCDiv.style.visibility = 'visible';
							innerDoc.getElementById('CommentCard').onsubmit = function() {
								var form_elements = this.elements, form_data = [], jsonp = document
										.createElement('script');
								for ( var i = form_elements.length - 1; i >= 0; i--) {
									switch (form_elements[i].type) {
									case 'checkbox':
									case 'radio':
										if (form_elements[i].checked)
											form_data
													.push(form_elements[i].name
															+ '='
															+ encodeURIComponent(form_elements[i].value));
										break;
									case 'submit':
										break;
									default:
										form_data
												.push(form_elements[i].name
														+ '='
														+ encodeURIComponent(form_elements[i].value))
									}
								}
								;
								if (innerDoc.getElementsByName('thank_you')[0].value != '1') {
									document
											.getElementById('onlineopinion_cc_overlay').style.display = 'none'
								}
								document.body.appendChild(jsonp);
								jsonp.src = 'https://secure.opinionlab.com/rate36_json.asp?' + form_data
										.join('&') + '&jsonp=OnlineOpinion.renderThankYou';
								onPageCCDiv.style.display = 'none';
								OnlineOpinion.onPageCCSubmitted = true;
								document.body.removeChild(document
										.getElementById(json_id));
								oIframe.id = '';
								onPageCCDiv.id = '';
								return false
							}
						}
					}, 1000)
};
OnlineOpinion.renderThankYou = function(markup) {
	if (markup == 'Thank you')
		return;
	var temp_markup = markup.replace(/&lt;/g, '<').replace(/&gt;/g, '>')
			.replace(/&quot;/g, "'").replace(/&amp;/g, '&').replace(
					"resize(_c('_d'))", '');
	var iframe = document.createElement('iframe'), cc_div = document
			.createElement('div'), close_link = document.createElement('a');
	iframe.className = 'onlineopinion_cc_frame';
	cc_div.className = 'onlineopinion_cc_div';
	cc_div.appendChild(iframe);
	document.body.appendChild(cc_div);
	cc_div.style.display = 'block';
	cc_div.style.visibility = 'hidden';
	var oDoc = iframe.contentDocument || iframe.contentWindow.document;
	oDoc.open();
	oDoc.write(temp_markup);
	var intervalID = window
			.setInterval(
					function() {
						if (oDoc.body) {
							if (!window.opera)
								oDoc.close();
							window.clearInterval(intervalID);
							var innerBody = oDoc.body, innerDoc = oDoc
									|| iframe.document;
							innerBody.style.border = "none";
							var wWidth = window.innerWidth
									|| document.body.clientWidth;
							if (!window.XMLHttpRequest)
								cc_div.style.position = 'absolute';
							cc_div.style.left = ((wWidth - 535) / 2) + 'px';
							iframe.style.height = (oDoc.body.scrollHeight + 1) + 'px';
							oDoc.getElementById('closeLink')
									.getElementsByTagName('a')[0].onclick = function() {
								cc_div.style.display = 'none';
								document
										.getElementById('onlineopinion_cc_overlay').style.display = 'none'
							};
							close_link.onclick = function() {
								cc_div.style.display = 'none';
								document
										.getElementById('onlineopinion_cc_overlay').style.display = 'none'
							};
							close_link.href = "javascript:void(0)";
							close_link.className = "onlineopinion_cc_closelink";
							cc_div.insertBefore(close_link, iframe);
							if (navigator.userAgent
									.match(/(msie\s*([7-9]|\d{2}))|opera/i)) {
								var onPageCCShadow = document
										.createElement("div"), onPageCCShadowTop = document
										.createElement("div"), onPageCCShadowBottom = document
										.createElement("div"), tempFrag = document
										.createDocumentFragment();
								onPageCCShadow.className = 'onlineopinion_cc_shadow';
								onPageCCShadowTop.className = 'onlineopinion_cc_shadow_top';
								onPageCCShadowBottom.className = 'onlineopinion_cc_shadow_bottom';
								tempFrag.appendChild(onPageCCShadow);
								tempFrag.appendChild(onPageCCShadowTop);
								tempFrag.appendChild(onPageCCShadowBottom);
								cc_div.appendChild(tempFrag)
							}
							cc_div.style.visibility = 'visible'
						}
					}, 1000)
};
OnlineOpinion.ocode = function(name) {
	this.name = name;
	OnlineOpinion.instanceCount++;
	this.instanceNum = OnlineOpinion.instanceCount;
	function rematch(val, restr) {
		var re = new RegExp(restr);
		var m = re.exec(val);
		if (m == null || m == '') {
			return ''
		} else {
			var s = "";
			for (i = 0; i < m.length; i++) {
				s = s + m[i]
			}
			return s
		}
	}
	;
	this._h = function(_7) {
		_e = this._i + ',\\/,\\.,-,_,' + this._j + ',%2F,%2E,%2D,%5F';
		_8 = _e.split(',');
		for (i = 0; i < 5; i++) {
			eval('_7=_7.replace(/' + _8[i] + '/g,_8[i+5])')
		}
		return _7
	};
	this._9 = function() {
		this.engine = null;
		this.version = null;
		var useragent = navigator.userAgent.toLowerCase();
		if (window.ActiveXObject) {
			this.engine = 'ie';
			this.version = rematch(useragent, "msie\\s[0-9]\.[0-9]+").replace(
					'msie ', '')
		} else {
			if (window.opera) {
				this.engine = 'opera';
				this.version = rematch(useragent, "opera.[0-9]\.[0-9]+")
						.replace('opera', '').replace('/', '')
			} else {
				if (document.childNodes && !document.all
						&& !navigator.taintEnabled) {
					if (rematch(useragent, "applewebkit\/[0-9]+") != null) {
						this.engine = 'webkit';
						this.version = rematch(useragent, "applewebkit\/[0-9]+")
								.replace('applewebkit/', '')
					} else {
						this.engine = 'khtml';
						this.version = rematch(useragent,
								"khtml\/[0-9]\.[0-9]\.[0-9]+").replace(
								'khtml/', '')
					}
				} else if (document.getBoxObjectFor != null) {
					this.engine = 'gecko';
					this.version = rematch(useragent, "gecko/[0-9]+").replace(
							'gecko/', '')
				} else if (useragent.match('firefox')) {
					this.engine = 'firefox';
					this.version = useragent.match(/firefox\/([0-9]\.[0-9])/)[1]
				}
			}
		}
	};
	this.serialize = function(obj, option) {
		var str_out = '', inc = 0;
		for ( var i in obj) {
			if (typeof obj[i] != 'function' && typeof obj[i] != 'undefined'
					&& obj[i] != null && obj[i] != '') {
				if (option == 0) {
					str_out += (inc == 0 ? '' : '&') + i + '=' + escape(obj[i])
				} else {
					if (option == 1) {
						str_out += (inc == 0 ? '' : '|') + escape(obj[i])
					}
				}
				inc++
			}
		}
		return str_out
	};
	this._a = false;
	this.Preferences = new Object();
	this.Preferences.Persistence = {
		enabled : true,
		cookie_type : 'page',
		cookie_name : 'oo_r',
		expiration : 24 * 60 * 60 * 1000
	};
	this.Preferences.Render = {
		type : 'floating',
		main_div_id : 'oo_feedback_float',
		img_path : 'onlineopinion/oo_black.gif',
		feedback_html : 'FEEDBACK',
		click_html : 'Click here to<br>rate this page',
		ty_html : '',
		float_style : 'fixed'
	};
	this.Metrics = new Object();
	this.Metrics.core = {
		'width' : screen.width,
		'height' : screen.height,
		'referer' : window.location.href,
		'prev' : document.referrer,
		'time1' : (new Date()).getTime(),
		'time2' : null
	};
	this.Metrics.custom = new Object();
	this.Preferences.Plugins = new Object();
	this.Preferences.Plugins.Events = {
		poE : 0.0,
		onEntryDelay : 0,
		poX : 0.0,
		poC : {
			id : '',
			value : 0.0
		},
		clickDelay : 0,
		poWC : 0.0
	};
	this.onEntry = function() {
		this._5();
		if (Math.random() >= 1.0 - this.Preferences.Plugins.Events.poE) {
			if (this.Preferences.Plugins.Events.onEntryDelay) {
				thisObj = this;
				setTimeout( function() {
					thisObj.show()
				}, this.Preferences.Plugins.Events.onEntryDelay * 1000)
			} else {
				this.show()
			}
			this.Preferences.Plugins.Events.poX = 0.0
		}
	};
	this.onExit = function() {
		this._5();
		if (Math.random() >= 1.0 - this.Preferences.Plugins.Events.poX)
			this.show()
	};
	this.OnClick = function() {
		this._5();
		if (this.Preferences.Render.type == 'inline') {
			this.show()
		} else if (Math.random() >= 1.0 - this.Preferences.Plugins.Events.poC) {
			if (this.Preferences.Plugins.Events.clickDelay) {
				thisObj = this;
				setTimeout( function() {
					thisObj.show()
				}, this.Preferences.Plugins.Events.clickDelay * 1000)
			} else {
				this.show()
			}
			this.Preferences.Plugins.Events.poX = 0.0;
			this.Preferences.Plugins.Events.poC = 0.0
		}
	};
	this.Preferences.Plugins.URLRewrite = {
		active : false,
		full_url_rewrite : null,
		regex_search_pattern : '',
		regex_replace_pattern : ''
	};
	this.Preferences.Plugins.CardOnPage = {
		enabled : false
	};
	this._5 = function() {
		if (this._a)
			return true;
		this._a = true;
		this.resetReferer();
		if (typeof OnlineOpinion.cookie != 'undefined'
				&& this.Preferences.Persistence.cookie_type != null) {
			this.Cookie = new OnlineOpinion.cookie();
			if (typeof this.Preferences.Persistence.cookie_name != 'undefined')
				this.Cookie.cookie_name = this.Preferences.Persistence.cookie_name;
			this.Cookie.expiration = 1000 * this.Preferences.Persistence.expiration;
			if (this.Cookie.matchurl(this.Metrics.core.referer,
					this.Preferences.Persistence.cookie_type) == 1
					&& this.Preferences.Plugins.Events) {
				this.Preferences.Plugins.Events.poX = 0;
				this.Preferences.Plugins.Events.poE = 0;
				return false
			}
		} else {
			this.Cookie = null
		}
		return true
	};
	this.render = function(onclick_func) {
		this._5();
		this.Preferences.Render.main_div_id = this.Preferences.Render.main_div_id
				|| 'oo_feedback_' + this.instanceNum;
		var b = new this._9(), d = document, de = d.documentElement, db = d.body, w = window, divID = this.Preferences.Render.main_div_id, bVersion = parseFloat(b.version), compliant = d.compatMode == 'CSS1Compat', sObj = compliant ? de
				: db, tempContainer = document.createDocumentFragment();
		if (b.engine == "webkit") {
			sObj = db
		}
		if (b.engine == null || b.version == null
				|| isNaN(parseInt(b.version, 10))
				|| (b.engine == 'ie' && parseFloat(b.version) < 6)
				|| (b.engine == 'opera' && parseInt(b.version, 10) < 8)
				|| (b.engine == 'gecko' && parseInt(b.version, 10) < 20041107))
			return false;
		var mainDivObj = d.getElementById(divID);
		if (mainDivObj == null) {
			if (this.Preferences.Render.type == 'floating') {
				mainDivObj = d.createElement("div");
				mainDivObj.id = divID;
				mainDivObj.className = 'oo_feedback_float'
			}
		}
		if (mainDivObj.childNodes.length == 0) {
			if (this.Preferences.Render.type == 'floating') {
				if (this.Preferences.Persistence.enabled
						&& this.Preferences.Persistence.cookie_type != null) {
					if (this.Cookie.matchurl(this.Metrics.core.referer,
							this.Preferences.Persistence.cookie_type) == 1)
						return false
				}
				db.appendChild(mainDivObj);
				var olUpObj = tempContainer.appendChild(d.createElement("div"));
				olUpObj.className = 'olUp';
				olUpObj.tabIndex = 0;
				olUpObj.onkeyup = function(e) {
					e = e || window.event;
					if (e.keyCode != 13)
						return;
					onclick_func()
				};
				var olOverObj = tempContainer.appendChild(d
						.createElement("div"));
				olOverObj.className = 'olOver';
				if ((b.engine == 'ie' && b.version < 7 || !compliant)
						&& this.Preferences.Render.click_html
						&& !this.Preferences.Render.disable_rollover) {
					olUpObj.onmouseover = ( function(olUpObj, olOverObj) {
						return function() {
							olOverObj.style.display = 'block';
							olUpObj.style.display = 'none'
						}
					})(olUpObj, olOverObj);
					olOverObj.onmouseout = ( function(olUpObj, olOverObj) {
						return function() {
							olUpObj.style.display = 'block';
							olOverObj.style.display = 'none'
						}
					})(olUpObj, olOverObj)
				}
				if (this.Preferences.Render.img_path) {
					var ooImg = olUpObj.appendChild(d.createElement("img"));
					ooImg.src = this.Preferences.Render.img_path
				}
				var fbText = olUpObj.appendChild(d.createElement("span"));
				fbText.className = 'fbText';
				fbText.innerHTML = this.Preferences.Render.feedback_html;
				if (this.Preferences.Render.transparent_background) {
					var op_bg = olUpObj.appendChild(d.createElement("div"));
					op_bg.className = 'oo_transparent'
				}
				var feedback_text = null;
				if (this.Preferences.Render.div_alt_text) {
					feedback_text = this.Preferences.Render.div_alt_text
				} else {
					if (document.all) {
						feedback_text = fbText.innerText
					} else {
						feedback_text = fbText.textContent
					}
				}
				mainDivObj.alt = feedback_text;
				mainDivObj.title = feedback_text;
				olOverObj.innerHTML = this.Preferences.Render.click_html
			}
			if (this.Preferences.Render.type == 'static') {
				mainDivObj.innerHTML = this.Preferences.Render.main_html
			}
		}
		mainDivObj.appendChild(tempContainer);
		if (this.Preferences.Render.type == 'floating') {
			if (!this.Preferences.Render.float_style)
				this.Preferences.Render.float_style = 'fixed';
			var mdoStyle = mainDivObj.style, _b = this, floatStyle = this.Preferences.Render.float_style;
			if (floatStyle.match(/Content/)) {
				var contentDiv = d
						.getElementById(_b.Preferences.Render.main_content_id
								|| "content");
				if (contentDiv == null) {
					floatStyle = this.Preferences.Render.float_style = 'fixed'
				}
				function getRightOfContent() {
					return contentDiv.offsetWidth + contentDiv.offsetLeft + 1
				}
				function fixBackground() {
					if (_b.Preferences.Render.fix_background) {
						db.style.backgroundAttachment = "scroll";
						var margin = null;
						if (document.defaultView
								&& document.defaultView.getComputedStyle) {
							margin = parseInt(document.defaultView
									.getComputedStyle(contentDiv, null)
									.getPropertyValue("margin-left"), 10)
						} else {
							margin = parseInt(
									contentDiv.currentStyle.marginLeft, 10)
						}
						if (isNaN(margin) || margin == 0) {
							margin = contentDiv.offsetLeft || 0
						}
						db.style.backgroundPosition = (Math
								.floor(contentDiv.scrollWidth * -0.5) - 2 + margin) + 'px 0'
					}
				}
			}
			var handleIEQuirks = function(e) {
				if (floatStyle.match(/^fixed/)) {
					var newLeft = sObj.scrollLeft + sObj.clientWidth
							- mainDivObj.clientWidth;
					if (floatStyle == "fixedPreserveContent"
							&& newLeft < getRightOfContent()) {
						newLeft = getRightOfContent() + 'px'
					} else if (floatStyle == "fixedContentMax"
							&& (contentDiv.offsetWidth + mainDivObj.clientWidth) < sObj.clientWidth) {
						newLeft = getRightOfContent() + 'px'
					}
					mdoStyle.left = newLeft
				} else if (floatStyle == "rightOfContent") {
					mdoStyle.left = getRightOfContent() + 'px'
				}
				mdoStyle.top = sObj.scrollTop + sObj.clientHeight
						- mainDivObj.clientHeight;
				var nullOrLoad = e == null || e.type == 'load';
				if (nullOrLoad)
					mdoStyle.visibility = 'visible';
				if (nullOrLoad || e.type == 'resize')
					fixBackground()
			};
			if (b.engine == 'ie' && (bVersion < 7 || !compliant)) {
				mdoStyle.position = 'absolute';
				function mapEvents(target, events) {
					for ( var idx = 0; idx < events.length; idx++) {
						var curevent = events[idx];
						target.attachEvent("on" + curevent, handleIEQuirks)
					}
				}
				;
				mapEvents(mainDivObj, [ "mouseover", "mouseout" ]);
				mapEvents(w, [ "resize", "scroll" ]);
				handleIEQuirks()
			} else {
				mdoStyle.position = 'fixed';
				var resizeMove = null;
				if (floatStyle.match(/^fixed/)) {
					mdoStyle.right = '0px';
					mdoStyle.bottom = '0px';
					if (floatStyle == "fixedContentMax") {
						var maxContentWidth = contentDiv.offsetWidth
								+ mainDivObj.offsetWidth;
						resizeMove = function(e) {
							if (sObj.clientWidth > maxContentWidth) {
								mdoStyle.left = getRightOfContent()
										- sObj.scrollLeft + 'px';
								mdoStyle.right = null
							} else {
								mdoStyle.left = null;
								mdoStyle.right = '0px'
							}
						}
					}
				} else if (floatStyle == "rightOfContent") {
					var rightOfContent = getRightOfContent() - sObj.scrollLeft
							+ 'px';
					mdoStyle.bottom = '0px';
					mdoStyle.left = rightOfContent
				}
				if (floatStyle.match(/Content$/)) {
					var preserve = floatStyle == "fixedPreserveContent";
					var gutter = d.createElement("div");
					db.replaceChild(gutter, mainDivObj);
					gutter.appendChild(mainDivObj);
					gutter.style.position = "absolute";
					gutter.style.width = mainDivObj.offsetWidth + 'px';
					gutter.style.right = '0px';
					gutter.style.top = '0px';
					gutter.style.height = sObj.scrollHeight + 'px';
					resizeMove = function(e) {
						var right = getRightOfContent();
						var runFix = false;
						if (preserve) {
							var left = sObj.offsetWidth
									- mainDivObj.offsetWidth;
							if (left <= right)
								runFix = true
						} else {
							runFix = true
						}
						if (runFix) {
							mdoStyle.left = right - sObj.scrollLeft + 'px';
							if (e == null || e.type == 'resize') {
								gutter.style.left = right + 'px';
								fixBackground()
							}
						} else {
							gutter.style.right = '0px';
							gutter.style.left = null;
							mdoStyle.right = "0px";
							mdoStyle.left = null
						}
					}
				}
				if (resizeMove) {
					if (b.engine == 'ie') {
						w.attachEvent("onresize", resizeMove);
						w.attachEvent("onscroll", resizeMove)
					} else {
						w.addEventListener("resize", resizeMove, false);
						w.addEventListener("scroll", resizeMove, false)
					}
					resizeMove()
				}
				mainDivObj.style.visibility = 'visible'
			}
		}
		mainDivObj.onclick = onclick_func;
		return true
	};
	this.launchCC = function() {
		if (this.Cookie.matchurl(this.Metrics.core.referer,
				this.Preferences.Persistence.cookie_type) != 1) {
			if (this.Preferences.Plugins.CardOnPage.enabled == true) {
				if (this.Preferences.Plugins.CardOnPage.shown
						&& !OnlineOpinion.onPageCCSubmitted) {
					var temp1 = document
							.getElementById('onlineopinion_cc_div_' + this.instanceNum).style.display = 'block';
					var temp2 = document
							.getElementById('onlineopinion_cc_overlay').style.display = 'block';
					temp2.onclick = this.hideCC(temp1, temp2)

				} else {
					var b = new this._9(), bVersion = parseFloat(b.version), d = document, db = document.body, de = d.documentElement, w = window, onPageCCdiv = db
							.appendChild(d.createElement("div")), onPageCCiframe = onPageCCdiv
							.appendChild(d.createElement("iframe")), onPageCCdivOverlay = d
							.getElementById("onlineopinion_cc_overlay")
							|| db.appendChild(d.createElement("div")), close_link = d
							.createElement("a"), JSONP2 = document
							.createElement("script");
					OnlineOpinion.CCcount++;
					onPageCCdivOverlay.id = "onlineopinion_cc_overlay";
					onPageCCdiv.id = 'onlineopinion_cc_div_' + this.instanceNum;
					onPageCCdiv.className = 'onlineopinion_cc_div';
					onPageCCiframe.id = 'onlineopinion_iframe_' + this.instanceNum;
					onPageCCiframe.className = 'onlineopinion_cc_frame';
					onPageCCiframe.setAttribute("frameborder", "0");
					if ((b.engine == 'ie' && bVersion >= 7)
							|| b.engine == 'opera') {
						var onPageCCShadow = d.createElement("div"), onPageCCShadowTop = d
								.createElement("div"), onPageCCShadowBottom = d
								.createElement("div"), tempFrag = d
								.createDocumentFragment();
						onPageCCShadow.className = 'onlineopinion_cc_shadow';
						onPageCCShadowTop.className = 'onlineopinion_cc_shadow_top';
						onPageCCShadowBottom.className = 'onlineopinion_cc_shadow_bottom';
						tempFrag.appendChild(onPageCCShadow);
						tempFrag.appendChild(onPageCCShadowTop);
						tempFrag.appendChild(onPageCCShadowBottom);
						onPageCCdiv.appendChild(tempFrag)
					}
					close_link.id = 'onlineopinion_cc_close_link_' + this.instanceNum;
					close_link.onclick = this.hideCC(onPageCCdiv,
							onPageCCdivOverlay);
					if (this.Preferences.Plugins.CardOnPage.overlay_close)
						onPageCCdivOverlay.onclick = this.hideCC(onPageCCdiv,
								onPageCCdivOverlay);
					close_link.href = "javascript:void(0)";
					close_link.className = "onlineopinion_cc_closelink";
					close_link.title = this.Preferences.Plugins.CardOnPage.close_link;
					onPageCCdiv.insertBefore(close_link, onPageCCiframe);
					var W = (b.engine == 'webkit') ? w.innerWidth
							: (b.engine == 'opera' ? db.clientWidth
									: de.clientWidth), H = (b.engine == 'webkit') ? w.innerHeight
							: (b.engine == 'opera' ? db.clientHeight
									: de.clientHeight), wx = 535;
					onPageCCdiv.style.left = parseInt((W - wx) / 2, 10) + 'px';
					if (this.Preferences.Plugins.CardOnPage.loader_path)
						onPageCCdivOverlay.style.backgroundImage = 'url(' + this.Preferences.Plugins.CardOnPage.loader_path + ')';
					JSONP2.id = 'onlineopinion_cc_jsonp_' + this.instanceNum;
					document.body.appendChild(JSONP2);
					if (!window.XMLHttpRequest) {
						var blah = this;
						var interval = window
								.setInterval(
										function() {
											if (typeof (cc_html) != 'undefined')
												window.clearInterval(interval);
											JSONP2.src = 'https://secure.opinionlab.com/ccc01/comment_card_json.asp?'
													+ (blah.Preferences.Render.type == 'asm' ? 'asm=1&'
															: '')
													+ blah.serialize(
															blah.Metrics.core,
															0)
													+ '&custom_var='
													+ blah
															.serialize(
																	blah.Metrics.custom,
																	1)
													+ '&jsonp='
													+ escape('OnlineOpinion.renderOnPageCC("'
															+ onPageCCiframe.id
															+ '","'
															+ onPageCCdiv.id
															+ '","'
															+ JSONP2.id
															+ '")')
										}, 1000)
					}
					JSONP2.src = 'https://secure.opinionlab.com/ccc01/comment_card_json.asp?'
							+ (this.Preferences.Render.type == 'asm' ? 'asm=1&'
									: '')
							+ this.serialize(this.Metrics.core, 0)
							+ '&custom_var='
							+ this.serialize(this.Metrics.custom, 1)
							+ '&jsonp='
							+ escape('OnlineOpinion.renderOnPageCC("'
									+ onPageCCiframe.id + '","'
									+ onPageCCdiv.id + '","' + JSONP2.id + '")');
					if (b.engine == 'ie' && bVersion < 7) {
						onPageCCdiv.style.position = 'absolute';
						onPageCCdivOverlay.style.position = 'absolute';
						onPageCCdivOverlay.style.height = document.documentElement.clientHeight + 'px';
						onPageCCdivOverlay.style.width = document.documentElement.clientWidth + 'px'
					}
					onPageCCdiv.style.visibility = 'hidden';
					onPageCCdiv.style.display = 'block';
					onPageCCdivOverlay.style.display = 'block';
					this.Preferences.Plugins.CardOnPage.shown = true;
					OnlineOpinion.onPageCCSubmitted = false
				}
			} else {
				var omtr_obj = typeof omtr_survey == 'object' ? this.serialize(
						omtr_survey, 0) : '';
				OnlineOpinion.util
						.popup(
								'https://secure.opinionlab.com/ccc01/comment_card.asp?'
										+ (this.Preferences.Render.type == 'asm' ? 'asm=1&'
												: '')
										+ this.serialize(this.Metrics.core, 0)
										+ '&custom_var='
										+ this
												.serialize(this.Metrics.custom,
														1) + omtr_obj,
								'OnlineOpinion',
								'resizable=yes,copyhistory=yes,scrollbars='
										+ (this.Preferences.Render.type == 'asm' ? 'yes'
												: 'no')
										+ ',location=no,status=no,fullscreen=no,width=545,height=200,top='
										+ parseInt(
												(this.Metrics.core.height - 200) / 2,
												10)
										+ ',left='
										+ parseInt(
												(this.Metrics.core.width - 545) / 2,
												10))
			}
		}
	};
	this.hideCC = function(onPageCCdiv, onPageCCOverlay) {
		return function() {
			var divs = typeof (document.getElementsByClassName) != 'undefined' ? document
					.getElementsByClassName('onlineopinion_cc_div')
					: getElementsByClass('onlineopinion_cc_div', null, null);
			for ( var i = divs.length - 1; i >= 0; i--) {
				divs[i].style.display = 'none'
			}
			;
			onPageCCOverlay.style.display = 'none'
		};
		function getElementsByClass(searchClass, node, tag) {
			var classElements = new Array();
			if (node == null)
				node = document;
			if (tag == null)
				tag = '*';
			var els = node.getElementsByTagName(tag);
			var elsLen = els.length;
			var pattern = new RegExp("(^|\\s)" + searchClass + "(\\s|$)");
			for (i = 0, j = 0; i < elsLen; i++) {
				if (pattern.test(els[i].className)) {
					classElements[j] = els[i];
					j++
				}
			}
			return classElements
		}
	};
	this.show = function() {
		this._5();
		this.Metrics.core.time2 = (new Date()).getTime();
		this.launchCC();
		if (this.Preferences.Persistence.enabled) {
			var mdivid = document
					.getElementById(this.Preferences.Render.main_div_id);
			if (mdivid)
				mdivid.style.display = 'none'
		}
		if (this.Cookie != null
				&& this.Preferences.Persistence.cookie_type != null) {
			this.Cookie.tagurl(this.Metrics.core.referer,
					this.Preferences.Persistence.cookie_type)
		}
		this.resetReferer()
	};
	this.resetReferer = function(alt_referer) {
		var location = window.location.href;
		if (alt_referer)
			location = alt_referer;
		var rewriter = this.Preferences.Plugins.URLRewrite;
		if (rewriter && rewriter.active == true) {
			this.Metrics.core.referer = this.Preferences.Plugins.URLRewrite.full_url_rewrite
					|| location.replace(rewriter.regex_search_pattern,
							rewriter.regex_replace_pattern)
		} else {
			this.Metrics.core.referer = location
		}
	};
	this.post = function() {
		this.Metrics.core.time2 = (new Date()).getTime();
		var mainDivObj = document
				.getElementById(this.Preferences.Render.main_div_id);
		var JSONP = mainDivObj.appendChild(document.createElement("script"));
		var odata = this.serialize(this.Metrics.core, 0) + '&custom_var='
				+ this.serialize(this.Metrics.custom, 1);
		var elements = document.forms[this.Preferences.Render.main_div_id + '_f'].elements;
		var formdata = [];
		for (idx = 0; idx < elements.length; idx++) {
			var curElement = elements[idx];
			try {
				var name = curElement.name;
				if (name != undefined && curElement.value != undefined) {
					switch (curElement.type) {
					case "radio":
						if (curElement.checked)
							formdata.push(curElement.name + '='
									+ encodeURIComponent(curElement.value));
						break;
					case "checkbox":
						if (curElement.checked)
							formdata.push(curElement.name + '='
									+ encodeURIComponent(curElement.value));
						break;
					default:
						formdata.push(curElement.name + '='
								+ encodeURIComponent(curElement.value))
					}
				}
			} catch (e) {
			}
		}
		var cdata = formdata.join('&');
		var osignature = this.Cookie != null ? this.Cookie._6(odata) : "";
		JSONP.src = "https://secure.opinionlab.com/rate36s.asp?" + odata + "&"
				+ cdata + "&signature=" + osignature;
		if (this.Preferences.Persistence.enabled) {
			var mainFormDiv = document
					.getElementById(this.Preferences.Render.main_div_id + "_f");
			mainFormDiv.style.display = 'none'
		}
		if (this.Preferences.Render.ty_html != '') {
			var TYDivObj = document
					.getElementById(this.Preferences.Render.ty_div_id);
			TYDivObj.innerHTML = this.Preferences.Render.ty_html;
			TYDivObj.style.display = 'block'
		}
		if (this.Cookie != null
				&& this.Preferences.Persistence.cookie_type != null) {
			this.Cookie.tagurl(this.Metrics.core.referer,
					this.Preferences.Persistence.cookie_type)
		}
		this.resetReferer()
	}
};
