document.write('<DIV>&copy Family Gamer 2009 . <a href="contact.htm">Contact</a> . <a href="membership.htm">Membership</a> . <a href="about.htm">About</a> . <a href="ratecard.htm">Rate Card</a></DIV></DIV></DIV></DIV></DIV><DIV style="height:120px;background-image:url(footer_vertical.jpg)">	<IMG src="footer_right.jpg" style="float:right"/></DIV><DIV style="background-color:#A08A65;color:#dddddd;font-size:8pt"><TABLE style="width:100%;">	<TR style="text-align:center; border:solid 4px">		<TD style="vertical-align:top;width:30%;text-align:left; padding-left:5%"><H1 style="font-size:22pt;color:#dddddd;position:relative;text-align:left;top:-15px; margin-bottom:20px">Games Coverage that Grows With You</H1><a style="border:none" href="about.htm"><img border="0" src="treephases.gif"/></a></TD>			<TD style="vertical-align:top;width:30%;text-align:left; padding-right:5%">			<H1 style="font-size:22pt;color:#dddddd;position:relative;text-align:center;top:-15px; margin-bottom:20px">Recent Games</H1><p class="news">Here are the games we have just been playing and writing about, freshly picked for you.</p><DIV onLoad="" id="output1"></DIV></TD></TR></TABLE></DIV>')

function imagelisting(z)
{
// global flag
var isIE = false;
var o = ""
// global request and XML document objects
var req;

function loadXMLDoc(url) {
    // branch for native XMLHttpRequest object

    if (window.XMLHttpRequest) {
        req = new XMLHttpRequest();
        req.onreadystatechange = processReqChange;
        req.open("GET", url, true);
        req.send(null);
    // branch for IE/Windows ActiveX version
    } else if (window.ActiveXObject) {
        isIE = true;
        req = new ActiveXObject("Microsoft.XMLHTTP");
        if (req) {
            req.onreadystatechange = processReqChange;
            req.open("GET", url, true);
            req.send();
        }
    }
}

function processReqChange() {
    // only if req shows "loaded"

    if (req.readyState == 4) {
        // only if "OK"
        if (req.status == 200) {


        var x = req.responseXML.getElementsByTagName("item");
		count = 0

		for (var i=0;i< x.length;i++)
			{
			if (count < 25)
			{

					s = x[i].getElementsByTagName("title")[0].childNodes[0].nodeValue
					t = s.substring(s.indexOf(" >")+3)
					t = t.substring(t.indexOf(" >")+3)


					console = t.substring(t.indexOf(" >")+3)
					console = console.substring(0, console.indexOf(" >"))

					writer = x[i].getElementsByTagName("title")[0].childNodes[0].nodeValue
					writer = writer.substring(writer.indexOf(" >")+3)
					writer = writer.substring(0, writer.indexOf(" >"))

					stream = s.substring(s.indexOf(" >")+3)
					stream = stream.substring(0, stream.indexOf(" >"))

					if (stream == "Family Gamer") {streamlink = "paulgovan.htm"; stream = "Dad Gamer"}
					if (stream == "Race Gamer") {streamlink = "jonstrakey.htm"; stream = "Dad Gamer"}					
					if (stream == "Sports Gamer") {streamlink = "davidkenson.htm"; stream = "Twenties Gamer"}										
					if (stream == "Fit Gamer") {streamlink = "lukepyper.htm"; stream = "Twenties Gamer"}					
					if (stream == "Eclectic Gamer") {streamlink = "clareswindlehurst.htm"; stream = "Gamer Wife"}						
					if (stream == "Perpetual Gamer") {streamlink = "domroberts.htm"; stream = "Dad Gamer"}						
					if (stream == "Returning Gamer") {streamlink = "hedleycook.htm"; stream = "Twenties Gamer"}											
					if (stream == "Teen Gamer") streamlink = "rowanbrown.htm"	
					if (stream == "Haiku Gamer") streamlink = "lottierose.htm"
					if (stream == "Audio Gamer") streamlink = "rebeccamayes.htm"	
					if (stream == "Tech Gamer") streamlink = "simonbarker.htm"	
					if (stream == "Domestic Gamer") {streamlink = "josiecampbell.htm"; stream = "Mum Gamer"}
						
					link = x[i].getElementsByTagName("link")[0].childNodes[0].nodeValue
					link = 'http://www.familygamer.co.uk/' + 	link.substr(link.indexOf(".co.uk/")+7)
					

					image = link.substring(link.indexOf("_")+1,link.lastIndexOf(".")) + "_pack.jpg"

					date = x[i].getElementsByTagName("pubDate")[0].childNodes[0].nodeValue
					date = date.substring(0, date.indexOf("+")-10)

					try
					{
					c = x[i].getElementsByTagName("content")[0].childNodes[0].childNodes[0].nodeValue
					}
					catch(err)
					{
					c = ""
					}


					try
					{
					gl = x[i].getElementsByTagName("genre")[0].childNodes[0].nodeValue
					g = gl.substring(0,1).toUpperCase() + gl.substring(1,gl.length)
					}
					catch(err)
					{
					g = ""
					}

					o = o + '<img height="90px" OnClick="window.open(\'' + link + '\',\'_self\')" style="cursor:pointer;margin:2px;border:solid #dddddd 3px" src="'+ image +'"/> '


					count = count + 1
			}

			}
		document.getElementById("output1").innerHTML = o;

         } else {
            alert("There was a problem retrieving the XML data:\n" +
                req.statusText);
         }
    }
}

       loadXMLDoc(z);
 
}


if (navigator.appVersion.indexOf("MSIE 6.0") != -1)
{
	foot01.style.left = "-30px"

}

window.onload = imagelisting("latest.xml")

document.write('<script>var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");')
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
document.write('try {var pageTracker = _gat._getTracker("UA-7599620-1");pageTracker._trackPageview();} catch(err) {}</script>')

