var url = "pgs/blk_newsseg.php?nsid="; // The server-side script
var onetime=0;
var delim='||';
//var lastid='x';
// setStyleById: given an element id, style property and 
// value, apply the style.
// args:
//  i - element id
//  p - property
//  v - value
//
function setStyleById(i, p, v) {
	var n = document.getElementById(i);
	n.style[p] = v;
}
function handleHttpResponse() {
  if (http.readyState == 4) {
    // Split the comma delimited response into an array
    results = http.responseText.split(delim);
    document.getElementById('story').innerHTML = results[0];
  }
}
function xupdateStory(id) {
  var pValue = id;
  var targ="p"+id;
  //if (lastid!='x'){
	//hideSelector(lastid);
  //}
  showSelector(targ);
  lastid=targ;
  http.open("GET", url + escape(pValue), true);
  http.onreadystatechange = handleHttpResponse;
  http.send(null);
}
function getHTTPObject() { var xmlhttp;
 /*@cc_on @if (@_jscript_version >= 5) try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
 } catch (E) { xmlhttp = false;
 } } @else xmlhttp = false;
 @end @*/
  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { 
	try { xmlhttp = new XMLHttpRequest();
 	} catch (e) { xmlhttp = false;
 		}
     } return xmlhttp;
 }
 var http = getHTTPObject();
