
function findLivePageWidth() {
	if (window.innerWidth != null)
		return window.innerWidth;
	if (document.body.clientWidth != null)
		return document.body.clientWidth;
	
	return (null);}


var rolloverData = new Array();

rolloverData[0] = "Our intention here at NLC is to provide a variety of information about our organization.<br><br>Hover over the links below to find out more.";
rolloverData[1] = "National Label is the premiere printing and converting company in North America.<br><br>Click here to learn more about who we are.";
rolloverData[2] = "More printing and converting capabilities are found at NLC than anywhere in the country.<br><br>Click here to learn about what we can do.";
rolloverData[3] = "National Label Company is known for its innovative solutions to complex demands.<br><br>Click here to see the cutting edge of technology.";
rolloverData[4] = "National Label offers a full service program that sees your product from start to finish.<br><br>Click here to find what best fits you best.";
rolloverData[5] = "In the long history of NLC, we have been involved with many different markets.<br><br>Click here to learn more about your market of interest.";
rolloverData[6] = "National Label is active throughout both the business world and the community.<br><br>Click here to see what we have recently done and won.";
rolloverData[7] = "All questions and concerns are welcomed, along with anything else NLC can help you with. <br><br>Click here to find out what more we can offer.";



if (document.images){
var rolloverImage = new Array();

rolloverImage[0] = "images/imageRollover_01.gif";
rolloverImage[1] = "images/imageRollover_02.gif";
rolloverImage[2] = "images/imageRollover_03.gif";
rolloverImage[3] = "images/imageRollover_04.gif";
rolloverImage[4] = "images/imageRollover_05.gif";
rolloverImage[5] = "images/imageRollover_06.gif";
rolloverImage[6] = "images/imageRollover_07.gif";
rolloverImage[7] = "images/imageRollover_08.gif";

}

var rolloverIm,rolloverText;

function swapText (rolloverText, rolloverIm)
	{
	document.getElementById("text0").innerHTML = rolloverData[rolloverText];
	

	  rolloverIm.src = rolloverImage[rolloverText];

	return;
	}
		
pageIdentifier = '<%=Request.QueryString("page")%>';

function getImage()
{
 var stringSearch = new Array;
      stringSearch = pageIdentifier.split(".");
      var imgName = stringSearch[0] + '.jpg';
document.write('<img border="0" src="images/' + imgName + '" height="175" width="175">');
}

var theHead;

function getLinksA()
{
for (var qu=0; qu<headData.length; qu++)
{
  if (headData[qu].head== "Technology"){
    document.write('<div class="newline"><a href="' + headData[qu].link+'" class="hover" target="_parent">' + headData[qu].label + '</a></div>');
  }
}
}

function getLinksB()
{
for (var qu=0; qu<headData.length; qu++)
{
  if (headData[qu].head== "Capabilities"){
    document.write('<div class="newline"><a href="' + headData[qu].link+'" class="hover" target="_parent">' + headData[qu].label + '</a></div>');
  }
}
}

function getLinksC()
{
for (var qu=0; qu<headData.length; qu++)
{
  if (headData[qu].head== "News"){
    document.write('<div class="newline"><a href="' + headData[qu].link+'" class="hover" target="_parent">' + headData[qu].label + '</a></div>');
  }
}
}

function getPage ()
{
  for (var t=0; t < headData.length; t++){
      if (headData[t].page == pageIdentifier){
        var docTitle = headData[t].label.toLowerCase();
        var spaceRemoved = docTitle.replace(/ /g, '');
        document.write('.' + spaceRemoved);}
  }
}

function getYear()
{
  document.write('2008');
}


function getTitle ()
{ 

  for (var s=0; s < headData.length; s++){
    if (headData[s].page == pageIdentifier){
      document.write (headData[s].label);
    }
  }
 
}

function getTest()
{
document.write('<%=Request.QueryString("page")%>');
}


// The remainder of this file is not used in the finished site. 

var xmlDoc;
var doc;
function loadXML()
{
//load xml file
// code for IE
if (window.ActiveXObject)
{
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async=false;
xmlDoc.load("content.xml");
getContent();

}
// code for Mozilla, etc.
else if (document.implementation && document.implementation.createDocument)
{
xmlDoc= document.implementation.createDocument("","",null);
xmlDoc.load("content.xml");
xmlDoc.onload=getContent;

}
else
{
alert('Your browser cannot handle this script');
}
}


function getContent()
{
  for( j=0; j<xmlDoc.getElementsByTagName("text").length; j++){
    if (parent.document.title == xmlDoc.getElementsByTagName("text")[j].attributes[0].nodeValue){

    doc = xmlDoc.getElementsByTagName("text")[j].firstChild.nodeValue;
    document.getElementById("text").innerHTML= doc;

    parent.document.getElementById("image").innerHTML= '<img border="0" src="images/' + xmlDoc.getElementsByTagName("text")[j].attributes[1].nodeValue + '" height="175" width="175">';


    }
  }
  for( j=0; j<xmlDoc.getElementsByTagName("text").length; j++){
      if (window.opener.parent.document.title == xmlDoc.getElementsByTagName("text")[j].attributes[0].nodeValue){
        document.getElementById("tester").innerHTML=
        xmlDoc.getElementsByTagName("text")[j].firstChild.nodeValue;
      }
  }
}

