var current_news_item = 0;
var news_open = false;
var getNews = { 
					loadData: function(nid,ind) {

								if(ind == current_news_item && news_open == true)
								{
									if($('#news'+ind))
									{
										$('#news'+ind).html("");
										news_open = false;
									}
								}else{
									if($('#news'+current_news_item))
									{
								   		$('#news'+current_news_item).html("");
									}
									
								   var url = 'static_pages/news_item.asp?id='+nid;
                                   $('#news'+ind).html("Loading");

                                    document.body.style.cursor='wait';

                                    var xhConn = new XHConn();

                                    xhConn.connect(url, "GET", "",

                                                function(xh) {

                                                            document.body.style.cursor='auto';

                                                            if(xh.responseText.length == 0) return;

                                                            $('#news'+ind).html(xh.responseText)  
															
															current_news_item = ind;
															news_open = true;

                                                }

                                    );
									
									
					}

             }

}

var getComments = { 
					loadData: function(bid,ind,af,r) {

									
								   var url = 'static_pages/comments.asp?bid='+bid;
                                   $('#commentsHolder'+ind).innerHTML = 'Loading';

                                    document.body.style.cursor='wait';

                                    var xhConn = new XHConn();

                                    xhConn.connect(url, "GET", "",

                                                function(xh) {

                                                            document.body.style.cursor='auto';

                                                            if(xh.responseText.length == 0) return;

                                                            $('#commentsHolder'+ind).html(xh.responseText);
															
															faction = document.blogcomment.action

															document.blogcomment.action = faction + '?af='+af+'&r='+r;

                                                }

                                    );
									
									
					}

             }

