






function DsqComment(id) {
	this.id = id;
	this.container = document.getElementById('dsq-comment-' + id);

	this.rate_btns = Dsq.Utils.gebiFromElement(this.container, 'ul', 'dsq-rate-' + id);
	this.rate_up = Dsq.Utils.gebiFromElement(this.container, 'a', 'dsq-rate-up-a-' + id);
	this.rate_down = Dsq.Utils.gebiFromElement(this.container, 'a', 'dsq-rate-down-a-' + id);
	this.header = Dsq.Utils.gebiFromElement(this.container, 'div', 'dsq-comment-header-' + id);
	this.header_avatar = Dsq.Utils.gebiFromElement(this.container, 'div', 'dsq-header-avatar-' + id);
	this.avatar = Dsq.Utils.gebiFromElement(this.container, 'a', 'dsq-avatar-' + id);
	this.menu = Dsq.Utils.gebiFromElement(this.container, 'ul', 'dsq-menu-' + id);
	this.admin_tog = Dsq.Utils.gebiFromElement(this.container, 'a', 'dsq-admin-toggle-' + id);
	this.admin_pan = Dsq.Utils.gebiFromElement(this.container, 'li', 'dsq-admin-panel-' + id);
	this.admin_email = Dsq.Utils.gebiFromElement(this.container, 'li', 'dsq-admin-email-' + id);
	this.admin_ip = Dsq.Utils.gebiFromElement(this.container, 'li', 'dsq-admin-ip-' + id);
	this.report_spam = Dsq.Utils.gebiFromElement(this.container, 'a', 'dsq-report-spam-' + id);
	this.remove = Dsq.Utils.gebiFromElement(this.container, 'a', 'dsq-remove-' + id);
	this.block_user = Dsq.Utils.gebiFromElement(this.container, 'a', 'dsq-block-username-' + id);
	this.block_email = Dsq.Utils.gebiFromElement(this.container, 'a', 'dsq-block-email-' + id);
	this.block_ip = Dsq.Utils.gebiFromElement(this.container, 'a', 'dsq-block-ip-' + id);
	this.cite_cont = Dsq.Utils.gebiFromElement(this.container, 'cite', 'dsq-cite-' + id);
	this.datetime = Dsq.Utils.gebiFromElement(this.container, 'a', 'dsq-time-' + id);
	this.points = Dsq.Utils.gebiFromElement(this.container, 'span', 'dsq-points-' + id);
	this.login_link = Dsq.Utils.gebiFromElement(this.container, 'a', 'dsq-login-link' + id);
	this.footer = Dsq.Utils.gebiFromElement(this.container, 'div', 'dsq-comment-footer-' + id);
	this.reply_link = Dsq.Utils.gebiFromElement(this.container, 'a', 'dsq-reply-link-' + id);
	this.edit_span = Dsq.Utils.gebiFromElement(this.container, 'span', 'dsq-edit-wrap-' + id);
	this.edit_link = Dsq.Utils.gebiFromElement(this.container, 'a', 'dsq-edit-' + id);
	this.video_link = Dsq.Utils.gebiFromElement(this.container, 'a', 'dsq-post-video-' + id);
	this.flag_span = Dsq.Utils.gebiFromElement(this.container, 'span', 'dsq-post-report-' + id);
	this.flag_link = Dsq.Utils.gebiFromElement(this.container, 'a', 'dsq-post-report-a-' + id);
	this.reblog_span = Dsq.Utils.gebiFromElement(this.container, 'span', 'dsq-reblog-wrap-' + id);
	this.reply_bar = Dsq.Utils.gebiFromElement(this.container, 'div', 'dsq-reply-bar-' + id);
	// HACK: Resetting cache because we're done with.
	Dsq.Utils.gebiFromElementCollectionCache = {};
} // DsqComment

var Dsq = [];
var disqus_popup_reference = null;

Dsq.Utils = new function() {
	this.gebiFromElementCollectionCache = {};

	this.gebiFromElement = function(el, tag, id) {
		// This only method only helps IE.
		if(!this.ie) {
			return document.getElementById(id);
		} else {
			var cacheKey = el.id + '-' + tag;
			if(typeof this.gebiFromElementCollectionCache[cacheKey] != 'undefined') {
				collection = this.gebiFromElementCollectionCache[cacheKey];
			} else {
				collection = el.getElementsByTagName(tag);
				this.gebiFromElementCollectionCache[cacheKey] = collection;
			}

			for(var i = 0; i < collection.length; i++) {
				if(collection[i].id == id) {
					return collection[i];
				}
			}
			return null;
		}
	};

	this.ie7 = (document.all && !window.opera && window.XMLHttpRequest) ? true : false;
	this.ie = /msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent);

	this.isIE = function() {
		return /msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent);
	};

	this.deleteNode = function(node) {
		if(node) {
			this.deleteChildren(node);
			if(typeof node.outerHTML != 'undefined') { node.outerHTML = ''; }
			else if(node.parentNode) { node.parentNode.removeChild(node); }
			delete node;
		}
	};

	this.deleteChildren = function(node) {
		if(node) {
			for(var x = node.childNodes.length-1; x >= 0; x--) {
				var childNode = node.childNodes[x];
				if(childNode.hasChildNodes()) this.deleteChildren(childNode);
				if(typeof childNode.outerHTML != 'undefined') childNode.outerHTML = '';
				else node.removeChild(childNode);
				delete childNode;
			}
		}
	};

	this.findPos = function(obj) {
		var curleft = 0;
		var curtop = 0;
		if (obj.offsetParent) {
			do {
				curleft += obj.offsetLeft;
				curtop += obj.offsetTop;
			} while (obj = obj.offsetParent);
		}
		return [curleft,curtop];
	};

	this.addEventListener = function(instance, eventName, listener) {
		var listenerFn = listener;
		if (instance.addEventListener) {
			instance.addEventListener(eventName, listenerFn, false);
		} else if (instance.attachEvent) {
			listenerFn = function() {
				listener(window.event);
			}
			instance.attachEvent("on" + eventName, listenerFn);
		} else {
			throw new Error("Event registration not supported");
		}
		return {
			instance: instance,
			name: eventName,
			listener: listenerFn
		};
	};

	this.removeEventListener = function(event) {
		var instance = event.instance;
		if (instance.removeEventListener) {
			instance.removeEventListener(event.name, event.listener, false);
		} else if (instance.detachEvent) {
			instance.detachEvent("on" + event.name, event.listener);
		}
	};

	this.addLoadEvent = function(func) {
		var oldonload = window.onload;
		if(typeof window.onload != 'function') {
			window.onload = func;
		} else {
			window.onload = function() {
				if (oldonload) {
					oldonload();
				}
				func();
			}
		}
	};

	this.fixIframesIE = function(id) {
		var disqusThread = document.getElementById(disqus_container_id);
		var iframes = disqusThread.getElementsByTagName('iframe');

		if(id) {
			var container = 'dsq-reply-' + id;
		} else {
			var container = 'dsq-content';
		}

		for(i=0 ; i <iframes.length; i++) {
			iframes[i].style.width = document.getElementById(container).offsetWidth;
		}
	};

	this.getElementsByClassName = function(oElm, strTagName, strClassName){
	/* Credit: Jonathan Snook [http://www.snook.ca/jonathan], Robert Nyman [http://www.robertnyman.com] */
		var arrElements = (strTagName == "*" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName);
		var arrReturnElements = new Array();
		strClassName = strClassName.replace(/\-/g, "\\-");
		var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)");
		var oElement;
		for(var i=0; i<arrElements.length; i++){
			oElement = arrElements[i];
			if(oRegExp.test(oElement.className)){
				arrReturnElements.push(oElement);
			}
		}
		return (arrReturnElements)
	};

	this.postToUrl = function(url, post_data) {
		var post_iframe = document.createElement('iframe');
		var form = document.createElement('form');

		post_iframe.style.display = 'none';
		post_iframe.style.width = '0px';
		form.method = 'POST';
		form.action = url;

		for(var key in post_data) {
			var input = document.createElement('input');
			input.name = key;
			input.type = 'hidden';
			input.value = post_data[key];

			form.appendChild(input);
		}

		document.body.appendChild(post_iframe);
		post_iframe.contentWindow.document.body.appendChild(form);
		form.submit();
	};

	// Strips integer id from id of element in the form ('some-id-###')
	this.extractId = function(e) {
		var chunks = e.id.split('-');
		if(chunks.length <= 1) {
			return 0;
		} else {
			return parseInt(chunks[chunks.length-1]);
		}
	};

}; // Dsq.Utils

Dsq.Popup = new function() {
	this.profileIsOn = false;
	this.profileCache = {};
	this.statusCache = {};

	this.popProfile = function(id) {
		var requestUser = 'AnonymousUser';
		var citeName = document.getElementById('dsq-author-user-' + id).innerHTML;
		var userUrl = document.getElementById('dsq-hidden-userurl-' + id).innerHTML;
		var username = userUrl.slice(8, -1);
		var avatar = document.getElementById('dsq-hidden-avatar-' + id).innerHTML;

		var serviceBlog = document.getElementById('dsq-hidden-blog-' + id).innerHTML;
		var serviceFacebook = document.getElementById('dsq-hidden-facebook-' + id).innerHTML;
		var serviceLinkedIn = document.getElementById('dsq-hidden-linkedin-' + id).innerHTML;
		var serviceTwitter = document.getElementById('dsq-hidden-twitter-' + id).innerHTML;
		var serviceDelicious = document.getElementById('dsq-hidden-delicious-' + id).innerHTML;
		var serviceFlickr = document.getElementById('dsq-hidden-flickr-' + id).innerHTML;
		var serviceTumblr = document.getElementById('dsq-hidden-tumblr-' + id).innerHTML;
		var hasServices = false;
		var popupListener;

		var disqus_popups = Dsq.Utils.getElementsByClassName(document, 'div', 'dsq-popupdiv');
		var profileDiv = disqus_popups[0];

		if(profileDiv) {
			if(profileDiv.id != 'dsq-template-profile') {
				var old_id = profileDiv.id.split('-')[3]; // Record id of previously opened pop-profile
			}

			Dsq.Popup.hidePopup(profileDiv.id); // Hide previously opened popup
			profileDiv.id = 'dsq-template-profile'; 		// and use it as the template for next popup
		}

		if(document.getElementById('dsq-hidden-clout-' + id)) {
			var clout = document.getElementById('dsq-hidden-clout-' + id).innerHTML;
		}
		if(document.getElementById('dsq-hidden-follow-' + id)) {
			var followUrl = document.getElementById('dsq-hidden-follow-' + id).innerHTML;
		}

		document.getElementById('dsq-profile-status').style.display = 'none';

		// Recent comments
		document.getElementById('dsq-profile-commentlist').innerHTML = '<div style="text-align: center"><img src="http://media.disqus.com/images/loading-small.gif"></div>';
		if(!clout) {
			var anon = 1;
		} else {
			var anon = 0;
		}

		if(!this.profileCache[username]) {
			var script = document.createElement('script');
			var d = new Date();
			script.type = 'text/javascript';
			script.src = 'http://disqus.com/embed/profile.js'
				+ '?username='		+ username
				+ '&anon='			+ anon
				+ '&'				+ d.getTime();
			script.charset = 'UTF-8';

			threadEl.appendChild(script);
		} else {
			document.getElementById('dsq-profile-commentlist').innerHTML = this.profileCache[username];
		}

		if(serviceTwitter) {
			if(this.statusCache[username]) {
				document.getElementById('dsq-profile-status').style.display = 'block';
				document.getElementById('dsq-profile-status').innerHTML = this.statusCache[username];
			}
		}

		// Set user data to profile
		document.getElementById('dsq-profile-cite').innerHTML = citeName;
		document.getElementById('dsq-profile-avatar').innerHTML = avatar;
		document.getElementById('dsq-profile-userurl').href = "http://disqus.com" + userUrl;
		document.getElementById('dsq-profile-userurl').innerHTML = username;
		document.getElementById('dsq-profile-clout').href = "http://disqus.com" + userUrl;
		document.getElementById('dsq-profile-showmore').href= "http://disqus.com" + userUrl;

		if(clout) { // then user is registered
			document.getElementById('dsq-profile-clout').className = "dsq-profile-badge";
			document.getElementById('dsq-profile-clout').innerHTML = "verified (" + clout + " pts)";
			document.getElementById('dsq-profile-follow').parentNode.style.display = "inline";
			if(requestUser == username) { document.getElementById('dsq-profile-follow').parentNode.style.display = "none"; }
			document.getElementById('dsq-profile-follow').href = "http://disqus.com" + followUrl;
		} else { // anonymous user
			username = username.slice(0, 16);
			document.getElementById('dsq-profile-userurl').innerHTML = username + '...';
			document.getElementById('dsq-profile-clout').className = "dsq-profile-badge anon";
			document.getElementById('dsq-profile-clout').innerHTML = "unclaimed profile";

			document.getElementById('dsq-profile-follow').parentNode.style.display = "none";
		}

		

		document.getElementById('dsq-service-blog').parentNode.style.display = 'none';
		document.getElementById('dsq-service-facebook').parentNode.style.display = 'none';
		document.getElementById('dsq-service-linkedin').parentNode.style.display = 'none';
		document.getElementById('dsq-service-twitter').parentNode.style.display = 'none';
		document.getElementById('dsq-service-delicious').parentNode.style.display = 'none';
		document.getElementById('dsq-service-flickr').parentNode.style.display = 'none';
		document.getElementById('dsq-service-tumblr').parentNode.style.display = 'none';

		// Add services.
		if(serviceBlog) {
			var serviceBlogEl = document.getElementById('dsq-service-blog');
			serviceBlogEl.parentNode.style.display = 'inline';
			serviceBlogEl.href = serviceBlog;
			hasServices = true;
		}
		if(serviceFacebook) {
			var serviceFacebookEl = document.getElementById('dsq-service-facebook');
			serviceFacebookEl.parentNode.style.display = 'inline';
			serviceFacebookEl.href = 'http://www.facebook.com/profile.php?id=' + serviceFacebook;
			hasServices = true;
		}
		if(serviceLinkedIn) {
			var serviceLinkedInEl = document.getElementById('dsq-service-linkedin');
			serviceLinkedInEl.parentNode.style.display = 'inline';
			serviceLinkedInEl.href = 'http://www.linkedin.com/' + serviceLinkedIn;
			hasServices = true;
		}
		if(serviceTwitter) {
			var serviceTwitterEl = document.getElementById('dsq-service-twitter');
			serviceTwitterEl.parentNode.style.display = 'inline';
			serviceTwitterEl.href = 'http://twitter.com/' + serviceTwitter;
			hasServices = true;
		}
		if(serviceDelicious) {
			var serviceDeliciousEl = document.getElementById('dsq-service-delicious');
			serviceDeliciousEl.parentNode.style.display = 'inline';
			serviceDeliciousEl.href = 'http://del.icio.us/' + serviceDelicious;
			hasServices = true;
		}
		if(serviceFlickr) {
			var serviceFlickrEl = document.getElementById('dsq-service-flickr');
			serviceFlickrEl.parentNode.style.display = 'inline';
			serviceFlickrEl.href = 'http://www.flickr.com/people/' + serviceFlickr;
			hasServices = true;
		}
		if(serviceTumblr) {
			var serviceTumblrEl = document.getElementById('dsq-service-tumblr');
			serviceTumblrEl.parentNode.style.display = 'inline';
			serviceTumblrEl.href = 'http://' + serviceTumblr + '.tumblr.com/';
			hasServices = true;
		}

		// if(!hasServices) {
		// 	document.getElementById('dsq-profile-services').style.display = 'none';
		// } else {
		// 	document.getElementById('dsq-profile-services').style.display = 'block';
		// }

		// clone template popup and append to document body
		var templateProfile = document.getElementById('dsq-template-profile');
		var popupProfile = templateProfile.cloneNode(true);
		popupProfile.id = 'dsq-popup-profile-' + id;

		var bodyTag = document.getElementsByTagName('body')[0];
		bodyTag.appendChild(popupProfile);

		Dsq.Utils.deleteNode(templateProfile); // delete template

		// initiate the popup
		var popupAnchor = 'dsq-comment-header-' + id;

		

		this.initPopup('dsq-popup-profile-' + id, popupAnchor);

		// observe mouseup events to close popup
		if(typeof document.addEventListener != 'function') {
			Dsq.Popup.popupListener = Dsq.Utils.addEventListener(document, 'mouseup', Dsq.Popup.closeProfile);
		} else {
			document.addEventListener('mouseup', Dsq.Popup.closeProfile, false);
		}

		if(old_id == id) {
			this.profileIsOn = true;
		}
	};

	this.closeProfile = function(e) {
		var disqus_popups = Dsq.Utils.getElementsByClassName(document, 'div', 'dsq-popupdiv');
		var profileDiv = disqus_popups[0];

		if(!Dsq.Popup.isClicked(e, profileDiv.id) || e == 'toggleAdmin') {
			Dsq.Popup.hidePopup();

			if(typeof document.addEventListener != 'function') {
				Dsq.Utils.removeEventListener(Dsq.Popup.popupListener);
			} else {
				document.removeEventListener('mouseup', Dsq.Popup.closeProfile, false);
			}
		}
	};

	this.initPopup = function(divId, anchorEl) {
		var popupDiv = document.getElementById(divId);
		var anchor = document.getElementById(anchorEl);
		var anchorPos = Dsq.Utils.findPos(anchor);
		var anchorPos_X = anchorPos[0];
		var anchorPos_Y = anchorPos[1];
		
			var offsetWidth = 85;
		
		var offsetHeight = 15;

		popupDiv.style.display = "block";
		popupDiv.style.top = anchorPos_Y + offsetHeight + 'px';
		popupDiv.style.left = anchorPos_X + offsetWidth + 'px';
	};

	this.hidePopup = function(divId) {
		var disqus_popups = Dsq.Utils.getElementsByClassName(document, 'div', 'dsq-popupdiv');
		var profileDiv = disqus_popups[0];

		if(!divId) {
			divId = profileDiv.id;
			this.profileIsOn = false;
		}
		document.getElementById(divId).style.display = "none";
	};

	this.isClicked = function(e, divName) {
		var t = this.element(e);
		while (t && t.parentNode) {
			if (t.id==divName)
				return true;
			t = t.parentNode;
		}
		return false;
	};

	this.element = function(event) {
		return event.target || event.srcElement;
	};
}; // Dsq.Popup


Dsq.Thread = new function() {
	this.timeHide = new Array();
	this.timeShow = new Array();

	
	this.adminIsOn = false;

	
	
	this.justRated = false;

	
	
	
	this.stateRecordLink = new Array();

	this.timeHl = new Array();
	this.timeRemove = new Array();

	this.comment = null;
	this.commentClass = null;

	this.showLabel = function(show) {
		if(show) {
			document.getElementById('dsq-clout-label').style.visibility='visible';
		} else {
			document.getElementById('dsq-clout-label').style.visibility='hidden';
		}
	};

  this.getActiveCommentId = function() {
    if(document.URL.indexOf('#') != -1) {
	    if(document.URL.indexOf('#comment-') == -1) {
				return null;
			}
		}

    var anchor = document.URL.slice(document.URL.indexOf('#') + 1);
    return anchor.replace('comment-', '');
  };

	this.highlightAnchor = function() {
    var i = this.getActiveCommentId();
    if (i == null) return false;
    var comment = 'dsq-comment-' + i;

		this.comment = document.getElementById(comment);
		if (!this.comment) { // Adding this conditional guard pending #289
			return false;
		}
		this.commentClass = this.comment.className;
		this.comment.className += ' dsq-hl-anchor';

		setTimeout("Dsq.Thread.clearAnchor(\"" + comment + "\")", 2500);
	};

  this.showRetweeted = function() {
    var i, commentBody, queryString, retweeted, msg;

    i = this.getActiveCommentId();
    if (i == null) return false;

    commentBody = document.getElementById('dsq-comment-message-' + i);
    if (!commentBody) return false;

    queryString = window.location.search.replace('?', '');
    queryString = queryString.split('&');
    for (var j = 0, pairString; pairString = queryString[j]; j++) {
      var pair = pairString.split('=');
      if (pair[0] == 'retweeted') {
        retweeted = pair[1];
      }
    }

    if (retweeted == 'ok') {
      msg = 'Comment retweeted successfully!';
    } else if (retweeted == 'error') {
      msg = 'Comment could not be retweeted due to an error. Make sure your password is correct.';
    }

    if (msg) commentBody.innerHTML = '<p class="dsq-comment-alert" id="dsq-comment-retweeted-' + i + '"><em>' + msg + '</em>.</p>' + commentBody.innerHTML;
  };

	this.clearAnchor = function(comment) {
		if (!this.comment) {
			return;
		}
		this.comment.className = this.commentClass;
	};


	this.showMenu = function(id) {
		document.getElementById('dsq-menu-' + id).style.display = "block";
		if(!Dsq.Popup.profileIsOn && !Dsq.Thread.adminIsOn) {
			Dsq.Popup.popProfile(id);
		}

		document.getElementById('dsq-header-avatar-' + id).className = "dsq-header-avatar dsq-menu-on";
	};

	this.hideMenu = function(id) {
		document.getElementById('dsq-menu-' + id).style.display = "none";

		document.getElementById('dsq-header-avatar-' + id).className = "dsq-header-avatar";

		// Undo admin panel stuff
		this.adminIsOn = false;
		if(document.getElementById('dsq-admin-panel-' + id)) {
			document.getElementById('dsq-admin-panel-' + id).style.display = " none";
			document.getElementById('dsq-admin-toggle-' + id).innerHTML = 'Admin<img src="http://media.disqus.com/images/embed/pointer-right.png">';
		}
	};

	this.showTimer = function(id, profileOnly) {
		// clear the hide timer
		clearTimeout(this.timeHide[id]);

		// start the timer
		if(profileOnly) {
			// show only the profile
			if(!Dsq.Popup.profileIsOn && !Dsq.Thread.adminIsOn)
			this.timeShow[id] = setTimeout("Dsq.Popup.popProfile(\"" + id + "\")", 400);
		} else {
			// show both profile and menu
			this.timeShow[id] = setTimeout("Dsq.Thread.showMenu(\"" + id + "\")", 500);
		}
	};

	this.hideTimer = function(id) {
		// clear the show timer
		clearTimeout(this.timeShow[id]);

		// if the menu is shown, start the timer to hide it
		if(document.getElementById('dsq-menu-' + id).style.display == "block") {
			this.timeHide[id] = setTimeout("Dsq.Thread.hideMenu(\"" + id + "\")", 400);
		}
	};

	this.login = function(toggle) {
		if(toggle.id.indexOf('dsq-reply-login') != -1) {
			var postId = toggle.id.slice(16);
			var container = document.getElementById('dsq-reply-' + postId);
		} else {
			var container = document.getElementById('dsq-post-add');
		}

		
			var ifrs = (typeof(disqus_iframe_css) != 'undefined') ? disqus_iframe_css : '';
		

		if(toggle) {
			if(toggle.className == 'dsq-login-active') {
				container.innerHTML = '<iframe name="dsq-reply-frame" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" allowtransparency="true" width="100%" src="http://disqus.com/forums/simo/nokia_celebrates_memorial_day_with_new_n95_nam_firmware_24/reply.html?' + (new Date()).getTime() + '&f=simo&t=nokia_celebrates_memorial_day_with_new_n95_nam_firmware_24&to_redirect=' + encodeURIComponent(window.location) + '&ifrs=' + ifrs + '"></iframe>';
				toggle.className = '';
			} else {
				container.innerHTML = '<iframe marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" style="overflow: hidden" allowtransparency="true" width="100%" src="http://disqus.com/embed/login.html?' + (new Date()).getTime() + '&f=simo&t=nokia_celebrates_memorial_day_with_new_n95_nam_firmware_24"></iframe>';
				toggle.className = 'dsq-login-active';
			}
		} else {
			container.innerHTML = '<iframe marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" style="overflow: hidden" allowtransparency="true" width="100%" src="http://disqus.com/embed/login.html?' + (new Date()).getTime() + '&f=simo&t=nokia_celebrates_memorial_day_with_new_n95_nam_firmware_24"></iframe>';
		}

		if(Dsq.Utils.isIE()) { Dsq.Utils.fixIframesIE(); }
	};

	this.toggleReply = function(linkEl, parentPostId) {
		
			var ifrs = (typeof(disqus_iframe_css) != 'undefined') ? disqus_iframe_css : '';
		

		
			var def_email = (typeof(disqus_def_email) != 'undefined') ? disqus_def_email : '';
		

		
			var def_name = (typeof(disqus_def_name) != 'undefined') ? disqus_def_name : '';
		

		var replyNode = document.getElementById('dsq-reply-' + parentPostId);
		var toolbar = document.getElementById('dsq-reply-bar-' + parentPostId);

		if(linkEl.innerHTML == 'reply') {
			if(toolbar) toolbar.style.display = 'block';
			var alreadyFilled = false;
			for (var i=0; i<replyNode.childNodes.length; i++) {
				if (replyNode.childNodes[i].nodeName == 'IFRAME') {
					alreadyFilled = true;
				}
			}
			if (alreadyFilled) {
				replyNode.style.display = 'block';
			} else {
				replyNode.innerHTML = '<iframe name="dsq-reply_' + parentPostId + '-frame" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" allowtransparency="true" width="100%" class="dsq-post-reply" src="http://disqus.com/forums/simo/nokia_celebrates_memorial_day_with_new_n95_nam_firmware_24/reply.html?' + (new Date()).getTime() + '&f=simo&t=nokia_celebrates_memorial_day_with_new_n95_nam_firmware_24&parent_post=' + parentPostId + '&to_redirect=' + encodeURIComponent(window.location) + '&ifrs=' + ifrs + '&def_email=' + def_email + '&def_name=' + def_name + '"></iframe>';
				if (window.DisqusFbcParentController) {
					DisqusFbcParentController.onCreateReplyIframe(parentPostId, replyNode.childNodes[0]);
				}
			}

			
				document.getElementById('dsq-post-video-' + parentPostId).style.display = 'inline';
			

			if(document.getElementById('dsq-edit-' + parentPostId)) {
				document.getElementById('dsq-edit-' + parentPostId).style.display = 'none';
			}

			linkEl.innerHTML = 'cancel';
		} else if(linkEl.innerHTML == 'cancel') {
			if(toolbar) toolbar.style.display = 'none';
			replyNode.style.display = 'none';

			if(document.getElementById('dsq-edit-' + parentPostId)) {
				document.getElementById('dsq-edit-' + parentPostId).style.display = 'inline';
			}

			linkEl.innerHTML = 'reply';

			
				document.getElementById('dsq-post-video-' + parentPostId).style.display = 'none';
				document.getElementById('dsq-post-video-' + parentPostId).innerHTML = '<img src="http://media.disqus.com/images/seesmic/record.png" class="dsq-record-img"> record video';
			
		}

		if(Dsq.Utils.isIE()) { Dsq.Utils.fixIframesIE(parentPostId); }
	};


	this.videoReply = function(linkEl, parentPostId) {
		var postId = Dsq.Utils.extractId(linkEl);
		if(typeof(Dsq.Thread.stateRecordLink[postId]) == 'undefined') {
			// Set default value.
			Dsq.Thread.stateRecordLink[postId] = true;
		}

		
			var ifrs = (typeof(disqus_iframe_css) != 'undefined') ? disqus_iframe_css : '';
		

		
			var def_email = (typeof(disqus_def_email) != 'undefined') ? disqus_def_email : '';
		

		
			var def_name = (typeof(disqus_def_name) != 'undefined') ? disqus_def_name : '';
		

		if(parentPostId) {
			var toggleVideo = '<img src="http://media.disqus.com/images/seesmic/record.png" class="dsq-record-img"> record video';
			var toggleText = 'text comment';
			var container = document.getElementById('dsq-reply-' + parentPostId);
			var parentPostQueryStr = 'parent_post=' + parentPostId + '&';
		} else {
			var toggleVideo = '<img src="http://media.disqus.com/images/seesmic/record.png" class="dsq-record-img"> Record video';
			var toggleText = 'Text comment';
			var container = document.getElementById('dsq-post-add');
			var parentPostQueryStr = '';
		}

		if(Dsq.Thread.stateRecordLink[postId]) {
			linkEl.innerHTML = toggleText;
			container.innerHTML = '<iframe name="dsq-video_' + parentPostId + '-frame" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" allowtransparency="true" width="100%" class="dsq-post-video" src="http://disqus.com/embed/video.html?' + (new Date()).getTime() + '&f=simo&t=nokia_celebrates_memorial_day_with_new_n95_nam_firmware_24&' + parentPostQueryStr + 'to_redirect=' + encodeURIComponent(window.location) + '"></iframe>';
		} else {
			linkEl.innerHTML = toggleVideo;
			container.innerHTML = '<iframe name="dsq-reply_' + parentPostId + '-frame" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" allowtransparency="true" width="100%" class="dsq-post-reply" src="http://disqus.com/forums/simo/nokia_celebrates_memorial_day_with_new_n95_nam_firmware_24/reply.html?' + (new Date()).getTime() + '&f=simo&t=nokia_celebrates_memorial_day_with_new_n95_nam_firmware_24&' + parentPostQueryStr + 'to_redirect=' + encodeURIComponent(window.location) + '&ifrs=' + ifrs + '&def_email=' + def_email + '&def_name=' + def_name + '"></iframe>';
		}
		Dsq.Thread.stateRecordLink[postId] = !Dsq.Thread.stateRecordLink[postId];

		if(Dsq.Utils.isIE()) { Dsq.Utils.fixIframesIE(); }
	};


	this.editPost = function(linkEl, postId) {
		
			var ifrs = (typeof(disqus_iframe_css) != 'undefined') ? disqus_iframe_css : '';
		

		document.getElementById('dsq-comment-message-' + postId).innerHTML = '<iframe name="dsq-edit_' + postId + '-frame" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" allowtransparency="true" width="100%" class="dsq-post-reply" src="http://disqus.com/embed/edit.html?' + (new Date()).getTime() + '&f=simo&t=nokia_celebrates_memorial_day_with_new_n95_nam_firmware_24&p=' + postId + '&to_redirect=' + encodeURIComponent(window.location) + '&ifrs=' + ifrs + '" style="border: 0px"></iframe>';
		linkEl.innerHTML = '';
	};

	this.toggleAdmin = function(id) {
		var adminPanel = document.getElementById('dsq-admin-panel-' + id);
		var adminToggle = document.getElementById('dsq-admin-toggle-' + id);

		// Close popup profile
		Dsq.Popup.closeProfile('toggleAdmin');
		Dsq.Thread.adminIsOn = true;

		if(adminPanel.style.display != "none" ) {
			adminPanel.style.display = "none";
			adminToggle.innerHTML = 'Admin<img src="http://media.disqus.com/images/embed/pointer-right.png">';
		} else {
			adminPanel.style.display = "block";
			adminToggle.innerHTML = 'Admin<img src="http://media.disqus.com/images/embed/pointer-down.png">';
		}
	};

	this.rate = function(post, vote) {
		
			document.getElementById('dsq-login-' + post).style.display = 'inline';
		
	};

	this.report = function(post) {
		if(confirm('Are you sure you want to report this post?')) {
			Dsq.Utils.postToUrl('http://disqus.com/forums/simo/nokia_celebrates_memorial_day_with_new_n95_nam_firmware_24/post_report/', {'post_id': post});

			document.getElementById('dsq-post-report-' + post).innerHTML = 'Post flagged.';
		}
	};

	this.removeHl = function(id) {
		clearTimeout(Dsq.Thread.timeHl[id]);
		document.getElementById('dsq-points-' + id).className = "dsq-header-points";
		this.justRated = false;
		this.showPoints(false, id);
	};

	this.HlTimer = function(id) {
		this.justRated = true;
		this.timeHl[id] = setTimeout("Dsq.Thread.removeHl(\"" + id + "\")", 2000);
	};



	this.hideRemove = function(id) {
		clearTimeout(dsqTimeRemove[id]);
		document.getElementById('dsq-comment-' + id).style.display = "none";
	};

	this.removeTimer = function(id) {
		dsqTimeRemove[id] = setTimeout("this.hideRemove(\"" + id + "\")", 2000);
	};

	this.showPoints = function(showPts, id) {
		if(showPts) {
			document.getElementById('dsq-time-' + id).style.display = "none";
			document.getElementById('dsq-points-' + id).style.display = "inline";
		} else if(!this.justRated) {
			document.getElementById('dsq-time-' + id).style.display = "inline";
			document.getElementById('dsq-points-' + id).style.display = "none";
		}
	};

	this.appendPage = function(page) {
		var script = document.createElement('script');
		var d = new Date();
		script.type = 'text/javascript';
		script.src = 'http://disqus.com/forums/simo/thread.js'
			+ '?slug='	+ 'nokia_celebrates_memorial_day_with_new_n95_nam_firmware_24'
			+ '&p='		+ page
			+ '&v=1.0&'	+ d.getTime();
		script.charset = 'utf-8';

		document.getElementById('dsq-pagination').innerHTML += '<img src="http://media.disqus.com/images/loading-small.gif">';
		threadEl.appendChild(script);
	};

	this.toggleOptions = function() {
		var toggle = document.getElementById('dsq-options-toggle');
		var options = document.getElementById('dsq-options');

		if(toggle.className == 'dsq-options-on') {
			toggle.className = '';

			
				toggle.innerHTML = '<img src="http://media.disqus.com/images/embed/dsq-options-plus.png">';
			
			options.style.display = 'none';
		} else {
			toggle.className = 'dsq-options-on';
			
				toggle.innerHTML = '<img src="http://media.disqus.com/images/embed/dsq-options-minus.png">'
			
			options.style.display = 'block';
		}
	};

	this.sortBy = function(sort) {
		var disqus_script = document.createElement('script');
		var disqus_date = new Date();

		if(typeof(disqus_url) == 'undefined') {
			disqus_url = disqus_href;
		}
		disqus_script.type = 'text/javascript';
		disqus_script.src = 'http://disqus.com/forums/simo/thread.js'
			+ '?url='	+ encodeURIComponent(disqus_url)
			+ '&sort='	+ sort
			+ '&title='
			+ '&'		+ disqus_date.getTime();
		threadEl.appendChild(disqus_script);
	};

  this.toggleReaction = function(li) {
    var style = 'block';
    if (li.className == 'dsq-opened') {
      style = 'none';
      li.className = '';
    } else {
      li.className = 'dsq-opened';
    }

    for (var i = 0, el; el = li.childNodes[i]; i++) {
      if (el.tagName && el.tagName == 'P')
        el.style.display = style;
    }
  };

  this.showAllReactions = function() {
    var reactionsList = document.getElementById('dsq-reactions');
    var showAllLink = document.getElementById('dsq-showallreactions');

    for (var i = 0, el; el = reactionsList.childNodes[i]; i++) {
      if (el.tagName && el.tagName == 'LI')
        el.style.display = 'list-item';
    }

    showAllLink.style.display = 'none';

    return false;
  };

  this.showAllMReactions = function() {
    var reactionsList = document.getElementById('dsq-references');
    var showAllLink = document.getElementById('dsq-m-showallreactions');

    for (var i = 0, el; el = reactionsList.childNodes[i]; i++) {
      if (el.tagName && el.tagName == 'LI')
        el.style.display = 'list-item';
    }

    showAllLink.style.display = 'none';

    return false;
  };

	function dsqInit() {
		Dsq.Thread.highlightAnchor();
    Dsq.Thread.showRetweeted();
		if (window.DisqusFbcParentController && Dsq.Thread.getActiveCommentId()) {
			DisqusFbcParentController.ensureInit(DisqusFbcParentController.checkForNewsfeed);
		}
		if(Dsq.Utils.isIE()) { Dsq.Utils.fixIframesIE(); }
	};

	Dsq.Utils.addLoadEvent(dsqInit);

}; // Dsq.Thread



	if(typeof seesmic == 'undefined') { var seesmic = {}; }
	seesmic.widget = new function () {
		this.callback = function (data) {
			playerVersion = data.disqusplayer;
		}
	};

	
	var scriptEl = document.createElement('script');
	scriptEl.setAttribute('type', 'text/javascript');
	scriptEl.setAttribute('src', 'http://seesmic.com/version.js?callback=seesmic.widget.callback');
	document.getElementsByTagName('head')[0].appendChild(scriptEl);

	
	var scriptEl = document.createElement('script');
	scriptEl.setAttribute('type', 'text/javascript');
	scriptEl.setAttribute('src', 'http://media.disqus.com/javascript/library/swfobject.js');
	document.getElementsByTagName('head')[0].appendChild(scriptEl);

	function see_play_video(_videoUri, _add) {
		var swf = !!playerVersion ? playerVersion : "http://seesmic.com/embeds/StandalonePlayer.swf";

		flashcontentDiv = document.getElementById(_videoUri+"_content");
		previewDiv = document.getElementById(_videoUri+"_preview");
		hideDiv = document.getElementById(_videoUri+"_hide");
		showDiv = document.getElementById(_videoUri+"_show");
		if(_add) {
			// push flash widget
			var so = new SWFObject(swf, "sotester", "300", "270", "9", "#000000");
			so.addVariable("video", _videoUri);
			so.addParam("allowFullScreen", "true");
			so.addParam("allowScriptAccess","always");
			so.useExpressInstall('swfobject/expressinstall.swf');
			so.write(_videoUri+"_content");

			previewDiv.style.display="none";
			hideDiv.style.display="block";
			showDiv.style.display="none";
		}
		else {
			flashcontentDiv.innerHTML="";
			previewDiv.style.display="block";

			//previewDiv.style.display="none";
			hideDiv.style.display="none";
			showDiv.style.display="block";
		}
	};



	(function() {
		if(typeof(disqus_container_id) == 'undefined') {
			disqus_container_id = 'disqus_thread';
		}
	})();

	







// request user
var requestUser = 'AnonymousUser';





	







	var disqus_post_container = document.getElementById('dsq-post-top');


if(disqus_post_container) {
	disqus_post_container.innerHTML = ' \
	<div id="dsq-auth">\
	 <div class="dsq-auth-header">\
	 <div id="dsq-login">\
	 <a id="dsq-login-toggle" href="http://disqus.com/profile/login/?next=article:830795" onclick="Dsq.Thread.login(this); return false"><img class="dsq-login-icon" src="http://media.disqus.com/images/dsq-login-btn.png" title="Log into DISQUS" alt="Log into DISQUS"/></a>\
	 &nbsp;\
	 </div>\
	 <h3 id="dsq-add-new-comment">Add New Comment</h3>\
	 </div>\
	 <div id="dsq-authenticated" class="dsq-authenticated" >\
	 <div class="dsq-authenticated-pic">\
	 <a href="http://disqus.com/AnonymousUser/" title="AnonymousUser"><img class="dsq-post-avatar" src="http://media.disqus.com/images/noavatar92.png" alt="" /></a>\
	 </div>\
	 <div class="dsq-authenticated-info">\
	 <ul>\
	 <li>\
	 Logged in as <a href="http://disqus.com/AnonymousUser/" title="AnonymousUser">AnonymousUser</a>\
	 </li>\
	 <li class="logout"><img class="dsq-login-icon" src="http://media.disqus.com/images/dsqicon12.png" alt="Logged in as AnonymousUser"/></a>&nbsp;<a href="http://disqus.com/logout/?ctkn=4f0bfca82e06c976a1efdd7c783a5fd0" title="Logout from Disqus">Logout from <span class="logo-disqus">Disqus</span></a></li>\
	 </ul>\
	 </div>\
	 </div>\
	 </div>\
	';

	disqus_post_container.style.display = "block";
}




	var p = {};





	var commentClass = 'dsq-comment';


// Add events
function dsq_addEvents(post) {
	if(post.rate_btns) post.rate_btns.onmouseover = function() { Dsq.Thread.showPoints(true, post.id); };
	if(post.rate_btns) post.rate_btns.onmouseout = function() { Dsq.Thread.showPoints(false, post.id); };
	if(post.rate_up) post.rate_up.onclick = function() { Dsq.Thread.rate(post.id, 1); return false; };
	if(post.rate_down) post.rate_down.onclick = function() { Dsq.Thread.rate(post.id, -1); return false; };

	if(post.header_avatar) post.header_avatar.onmouseover = function() { Dsq.Thread.showTimer(post.id); };
	if(post.header_avatar) post.header_avatar.onmouseout = function() { Dsq.Thread.hideTimer(post.id); };
	if(post.avatar) post.avatar.onclick = function() { Dsq.Popup.popProfile(post.id); return false; };

	if(post.admin_tog) post.admin_tog.onclick = function() { Dsq.Thread.toggleAdmin(post.id); return false; };
	if(post.remove) post.remove.onclick = function() { Dsq.Thread.removePost(post.id, 1); return false; };
	if(post.report_spam) post.report_spam.onclick = function() { Dsq.Thread.reportSpam(post.id); return false; };
	if(post.block_user) post.block_user.onclick = function() { Dsq.Thread.blockUser(post.id, 5); return false; };
	if(post.block_email) post.block_email.onclick = function() { Dsq.Thread.blockUser(post.id, 1); return false; };
	if(post.block_ip) post.block_ip.onclick = function() { Dsq.Thread.blockUser(post.id, 2); return false; };

	if(post.cite_cont) post.cite_cont.onmouseover = function() { Dsq.Thread.showTimer(post.id, true); };
	if(post.cite_cont) post.cite_cont.onmouseout = function() { Dsq.Thread.hideTimer(post.id); };

	if(post.login_link) post.login_link.onclick = function() { Dsq.Thread.login(); return false; };
	if(post.reply_link) post.reply_link.onclick = function() { Dsq.Thread.toggleReply(this, post.id); return false; };
	if(post.edit_link) post.edit_link.onclick = function() { Dsq.Thread.editPost(this, post.id); return false; };
	if(post.video_link) post.video_link.onclick = function() { Dsq.Thread.videoReply(this, post.id); return false; };
	if(post.flag_link) post.flag_link.onclick = function() { Dsq.Thread.report(post.id); return false; };
}

var comments = Dsq.Utils.getElementsByClassName(document.getElementById(disqus_container_id), 'li', commentClass);
for(var i = 0; i < comments.length; i++) {
	var id = comments[i].id.split('-')[2];
	var post_meta = p[id]
	

	var post = new DsqComment(id);

	// Display reblog
	


	// Display flag link if enabled
	


	// Reply toolbar
	if(post.reply_bar) {
		post.reply_bar.innerHTML += ' \
			<div id="dsq-reply-bar-items-' + id + '" class="dsq-reply-bar-items"> \
			</div> \
			<div id="dsq-reply-bar-auth-' + id + '" class="dsq-reply-bar-auth"> \
				 \
					<img class="dsq-login-icon" src="http://media.disqus.com/images/dsq-favicon-16x16.png" alt="" /> \
					<a id="dsq-reply-login-' + id + '" href="http://disqus.com/profile/login/?next=article:830795" onclick="Dsq.Thread.login(this); return false">Login</a> \
					 \
					(optional) \
				 \
			</div> \
		';

	}


	
		

		// username of author
		var userUrl = document.getElementById('dsq-hidden-userurl-' + id).innerHTML;
		var author_username = userUrl.slice(8, -1);

		// Display edit link for API plugin
		if(requestUser == author_username) {
			if(post.edit_span) post.edit_span.style.display = "inline";
			if(post.edit_link) post.edit_link.style.display = "inline";
		}

		// Display admin toggle
		
	

	dsq_addEvents(post);//", 0);
}


	
	if(document.location.hash != '') {
		document.location.hash = document.location.hash.substring(1);
	}

	
	if(document.location.search != '') {
		var query = window.location.search.substring(1);
		var vars = query.split("&");
		var reply_id = null;

		var disqus_alerts = document.getElementById('dsq-alerts');
		var disqus_alerts_approve = document.getElementById('dsq-alerts-approve');
		var disqus_alerts_claim = document.getElementById('dsq-alerts-claim');
		var disqus_showAlerts = false; // Alerts at the top of the thread


		// #disqus-alerts means show both "approve" and "claim" messages
		if(document.location.hash == '#disqus-alerts') {
			disqus_alerts_approve.style.display = "block";
			disqus_alerts_claim.style.display = "block";
			disqus_showAlerts = true;
		} else {
			if(document.location.hash == '#disqus-approve') {
				disqus_alerts_approve.style.display = "block";
				disqus_showAlerts = true;
			}
			if(document.location.hash == '#disqus-claim') {
				disqus_alerts_claim.style.display = "block";
				document.getElementById('dsq-comment-alert-' + reply_id).style.display = "block";
				disqus_showAlerts = false;
			}
		}

		if(disqus_showAlerts) { // Jump to top of thread
			disqus_alerts.style.display = "block";
			document.location.hash = '#dsq-alerts';
		} else if(reply_id) { // Jump to comment
			document.location.hash = 'comment-' + reply_id;
		}
	}

	
	if((typeof OB_Script != 'undefined') && (typeof OB_versionNum != 'undefined')) {
		if(navigator.userAgent.indexOf("Firefox") != -1) {
			if(window.frames['dsq-reply-frame']) {
				window.frames['dsq-reply-frame'].location = 'http://disqus.com/forums/simo/nokia_celebrates_memorial_day_with_new_n95_nam_firmware_24/reply.html?' + (new Date()).getTime() + '&f=simo&t=nokia_celebrates_memorial_day_with_new_n95_nam_firmware_24&to_redirect=' + encodeURIComponent(window.location) + '&ifrs=';
			}
		}
	}


if(typeof(disqus_callback) == 'function') {
	disqus_callback();
}


