// JScript source code

// ----------------THE FOLLOWING WILL DISPLAY FIRST THREE "OFF THE LIP" ARTICLES-------------------------------------------------


function parseXML()
{
try //Internet Explorer
  {
  xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
  }
catch(e)
  {
  try //Firefox, Mozilla, Opera, etc.
    {
    xmlDoc=document.implementation.createDocument("","",null);
    }
  catch(e)
    {
    alert(e.message);
    return;
    }
  }
  
xmlDoc.async=false;
xmlDoc.load("xml/off_the_lip.xml");

document.getElementById("firsttitle").innerHTML=xmlDoc.getElementsByTagName("title")[0].childNodes[0].nodeValue;
document.getElementById("firstpubDate").innerHTML=xmlDoc.getElementsByTagName("pubDate")[0].childNodes[0].nodeValue;

document.getElementById("secondtitle").innerHTML=xmlDoc.getElementsByTagName("title")[1].childNodes[0].nodeValue;
document.getElementById("secondpubDate").innerHTML=xmlDoc.getElementsByTagName("pubDate")[1].childNodes[0].nodeValue;

document.getElementById("thirdtitle").innerHTML=xmlDoc.getElementsByTagName("title")[2].childNodes[0].nodeValue;
document.getElementById("thirdpubDate").innerHTML=xmlDoc.getElementsByTagName("pubDate")[2].childNodes[0].nodeValue;

}

//-----------------END OF DISPLAY OFF THE LIP ARTICLES ------------------------------------------------------

// ----------------THE FOLLOWING GETS FIRST THREE OFF THE LIP BLOG URLS--------------------------------------
function getBlogURL(linkName)

{
try //Internet Explorer
  {
  xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
  }
catch(e)
  {
  try //Firefox, Mozilla, Opera, etc.
    {
    xmlDoc=document.implementation.createDocument("","",null);
    }
  catch(e)
    {
    alert(e.message);
    return;
    }
  }
xmlDoc.async=false;
xmlDoc.load("xml/off_the_lip.xml");

var firstURL = xmlDoc.getElementsByTagName("blogURL")[0].childNodes[0].nodeValue;
var secondURL = xmlDoc.getElementsByTagName("blogURL")[1].childNodes[0].nodeValue;
var thirdURL = xmlDoc.getElementsByTagName("blogURL")[2].childNodes[0].nodeValue;



	if (linkName=="Article 1")
	{
	    window.location.href = firstURL;
	} 
	else if (linkName=="Article 2")
	{
	    window.location.href = secondURL; 
	}
	else
	{
	    window.location.href = thirdURL;
	}

}

