function story(ID, gme) {
mp = ge('news_area');
story_http(ID, gme)
}


function story_http(ID, gme) {
mp = ge('news_area');

ajax_call()

var url = 'http://www.gamerzlink.com/templates/ajax/get_news.php?pg='+gme+'&Date='+escape(new Date());
http_request.onreadystatechange = alertContents;
http_request.open('GET', url, true);
http_request.send(null);

function alertContents() {

        if (http_request.readyState == 4) {
            if (http_request.status == 200) {
//grab returning XML data
news_l = http_request.responseXML.getElementsByTagName('story');

delete_stuff(mp)

//data area for whole story
var i=ID

 id = news_l[i].getAttribute('id')

 gn_id = news_l[i].getElementsByTagName('gn_id')[0].firstChild.nodeValue;
 gn_date = news_l[i].getElementsByTagName('gn_date')[0].firstChild.nodeValue;
 gn_title = news_l[i].getElementsByTagName('gn_title')[0].firstChild.nodeValue;
 gn_source = news_l[i].getElementsByTagName('gn_source')[0].firstChild.nodeValue;
 gn_report = news_l[i].getElementsByTagName('gn_report')[0].firstChild.nodeValue;
 gn_surl = news_l[i].getElementsByTagName('gn_surl')[0].firstChild.nodeValue;
 gn_story = news_l[i].getElementsByTagName('gn_story')[0].firstChild.nodeValue;
 tme = news_l[i].getElementsByTagName('tme')[0].firstChild.nodeValue;


var p1 = dce('p');
p1.id="wstory";
mp.appendChild(p1);

var spant = dce('span');
spant.className="news_title2";
spant.appendChild(document.createTextNode(gn_title));
p1.appendChild(spant);

var spand = dce('span');
spand.appendChild(document.createTextNode("("+gn_date+")"));
p1.appendChild(spand);

var br = dce('br');
p1.appendChild(br);

var spanp = dce('span');
spanp.innerHTML = gn_story;
spanp.style.color="#ffffff";
p1.appendChild(spanp);

var h2_1 = dce('h2');
h2_1.className="more_hd";
h2_1.appendChild(document.createTextNode("More related news..."));
mp.appendChild(h2_1);

//data area for the bottom links
for(i=0; i<news_l.length; i++){
 id = news_l[i].getAttribute('id')

 gn_id = news_l[i].getElementsByTagName('gn_id')[0].firstChild.nodeValue;
 gn_date = news_l[i].getElementsByTagName('gn_date')[0].firstChild.nodeValue;
 gn_title = news_l[i].getElementsByTagName('gn_title')[0].firstChild.nodeValue;
 
 id2 = id - 1;
 
//new main div
var span1 = dce('span');
mp.appendChild(span1);

	//line for name and posted
	b1 = dce('b');
	b1.appendChild(document.createTextNode(id+". "));
	span1.appendChild(b1);

var span2 = dce('span');
mp.appendChild(span2);

	spA = dce('a');
	spA.href = "javascript:story('" + id2 + "', '" + gme + "')";
	spA.className = "white";
	spA.appendChild(document.createTextNode(gn_title));
	span2.appendChild(spA);

var span3 = dce('span');
span3.appendChild(document.createTextNode("("+gn_date+")"));
mp.appendChild(span3);

var br = dce('br');
mp.appendChild(br);

 }//end for
mp.innerHTML += "<br /><a href=\"javascript:jumptop()\" class=\"itop\" style=\"font-size: 1em; margin-left:52em;\">Top</a>"; 

//end bottom links
            } else {
                alert('There was a problem with the request.');
            }
        }
    }
}//end story_http

