
	
function popUp(evt,objectID){
	if (isDHTML) { // Makes sure this is a DHTML browser
		var livePageWidth = findLivePageWidth();
		//alert(livePageWidth);
		domStyle = findDOM(objectID,1);
		dom = findDOM(objectID,0);
		state = domStyle.visibility;
		if (dom.offsetWidth) elemWidth = dom.offsetWidth;
		else { if (dom.clip.width)	elemWidth = dom.clip.width; }
		if (state == "visible" || state == "show")  { domStyle.visibility = "hidden"; }
		else {
			if (evt.pageY) { //Calculates the position for Navigator 4 
				topVal = evt.pageY + 4;
				leftVal = evt.pageX - (elemWidth / 2); 
			}
			else { 
				if (evt.y) { // Calculates the position for IE4
					topVal = evt.y + 4 + document.body.scrollTop;
					leftVal = evt.x - (elemWidth / 2) + document.body.scrollLeft;
				}
			}
		/*If the element goes off the page to the left, this moves it back */
			if(leftVal < 2) { leftVal = 2; }
			else { 
				if ((leftVal + elemWidth) > livePageWidth) { leftVal = leftVal - (elemWidth / 2); }
			}
			domStyle.top = topVal; // Positions the element from the top
			domStyle.left = leftVal; // Positions the element from the left
			domStyle.visibility = "visible"; // Makes the element visable 
		}
	}
}
	


if (document.images){
   arw = new Array();
     arw[0] = "images/arrow_right.gif";
     arw[1] = "images/arrow_down.gif";
      
     ar = new Array();
     for (var i=0; i < arw.length; i++)
     {
       ar[i] = new Image();
       ar[i].src = arw[i];
     }
     }

var qv = 0
function toggleImage(imgName){
	if (document.images && imgName){
		  if (qv == 0){		    
		  imgName.src = ar[1].src;
		  qv++;
		  }
		  else{
		  imgName.src = ar[0].src;
		  qv--;
		  }
}

	return;
}


function toggleClamShellMenu(objectID) {

	if (isAll || isID) {
		domStyle = findDOM(objectID,1);
		if (domStyle.display =='block')  domStyle.display='none';
		else domStyle.display='block';
	}
	else {
		destination = objectID + '.html';
		self.location = destination;
	}
	return;
}

var headData = new Array();

headData[0] = {title:"The Company", page: "thecompany.htm", label: "The Company", state: "menuHead", link: "thecompany.asp?page=thecompany.htm",head: 0};
headData[1] = {title: "Locations", page: "locations.htm", label: "Locations", state: "menuOption", link: "thecompany.asp?page=locations.htm", head: headData[0].title};
headData[2] = {title: "Directions", page: "directions.htm", label: "Directions", state: "menuOption", link: "thecompany.asp?page=directions.htm", head: headData[0].title};
headData[3] = {title: "Sales and Service", page: "salesoffices.htm", label: "Sales and Service", state: "menuOption", link: "thecompany.asp?page=salesoffices.htm", head: headData[0].title};
headData[4] = {title: "Hotels", page: "hotels.htm", label: "Hotels", state: "menuOption", link: "thecompany.asp?page=hotels.htm", head: headData[0].title};
headData[5] = {title: "The Report", page: "thereport.htm", label: "The Report", state: "menuOption", link: "thecompany.asp?page=thereport.htm", head: headData[0].title};
headData[6] = {title: "History", page: "history.htm", label: "History", state: "menuOption", link: "thecompany.asp?page=history.htm", head: headData[0].title};
headData[7] = {title: "Direcciones", page: "direcciones.htm", label: "Direcciones", state: "menuOption", link: "thecompany.asp?page=direcciones.htm", head: 1};

headData[8] = {title: "Capabilities", page: "capabilities.htm", label: "Capabilities", state: "menuHead", link: "capabilities.asp?page=capabilities.htm", head: 0};
headData[9] = {title: "Design and Prep", page: "prep.htm",label: "Design and Prepress", state: "menuOption", link: "capabilities.asp?page=prep.htm", head: "Capabilities"};
headData[10] = {title: "Label Printing", page: "labelpac.htm",label: "Label Printing and Converting", state: "menuOption", link: "capabilities.asp?page=labelpac.htm", head: "Capabilities"};
headData[11] = {title: "Insert/Outsert Printing", page: "inoutpac.htm",label: "Insert-Outsert Printing and Converting", state: "menuOption", link: "capabilities.asp?page=inoutpac.htm", head: "Capabilities"};
headData[12] = {title: "Commercial Printing", page: "commercialprinting.htm",label: "Commercial Printing", state: "menuOption", link: "capabilities.asp?page=commercialprinting.htm", head: "Capabilities"};
headData[13] = {title: "Quality Testing", page: "qualitytesting.htm",label: "Quality Testing", state: "menuOption", link: "capabilities.asp?page=qualitytesting.htm", head: "Capabilities"};

headData[14] = {title: "Technology", page: "technology.htm", label: "Technology", state: "menuHead", link: "technology.asp?page=technology.htm", head: 0};               
headData[15] = {title: "Product Development", page: "proddev.htm", label: "Product Development", state: "menuOption", link: "technology.asp?page=proddev.htm", head: "Technology"}; 
headData[16] = {title: "Technical Service", page: "techservice.htm", label: "Technical Service", state: "menuOption", link: "technology.asp?page=techservice.htm", head: "Technology"}; 
headData[17] = {title: "Cost Savings", page: "costsavings.htm", label: "Cost Savings", state: "menuOption", link: "technology.asp?page=costsavings.htm", head: "Technology"}; 
headData[18] = {title: "Innovation", page: "innovation.htm", label: "Innovation", state: "menuOption", link: "technology.asp?page=innovation.htm", head: "Technology"}; 
headData[19] = {title: "Field Service", page: "fieldservice.htm", label: "Field Service", state: "menuOption", link: "technology.asp?page=fieldservice.htm", head: "Technology"}; 
headData[20] = {title: "Technical Manual", page: "technicalmanual.htm", label: "Technical Manual", state: "menuOption", link: "technology.asp?page=technicalmanual.htm", head: "Technology"}; 

headData[21] = {title: "Products & Services", page: "productsandservices.htm", label: "Products and Services", state: "menuHead", link: "productsandservices.asp?page=productsandservices.htm", head: 0};
headData[22] = {title: "Pressure Sensitive", page: "psl.htm", label: "Pressure Sensitive Labels", state: "menuOption", link: "productsandservices.asp?page=psl.htm", head: "Products & Services"};
headData[23] = {title: "Heat Activated", page: "heatactivated.htm", label: "Heat Activated Labels", state: "menuOption", link: "productsandservices.asp?page=heatactivated.htm", head: "Products & Services"};
headData[24] = {title: "Coupons", page: "coupons.htm", label: "Coupons", state: "menuOption", link: "productsandservices.asp?page=coupons.htm", head: "Products & Services"};
headData[25] = {title: "Multi-Panel", page: "multipanel.htm", label: "Multi-Panel Labels", state: "menuOption", link: "productsandservices.asp?page=multipanel.htm", head: "Products & Services"};
headData[26] = {title: "Labeling Equipment", page: "labelingequipment.htm", label: "Labeling Equipment", state: "menuOption", link: "productsandservices.asp?page=labelingequipment.htm", head: "Products & Services"};
headData[27] = {title: "Specialty Products", page: "specialtyproducts.htm", label: "Specialty Products", state: "menuOption", link: "productsandservices.asp?page=specialtyproducts.htm", head: "Products & Services"};
headData[28] = {title: "PVC Shrink Sleeves", page: "pvc.htm", label: "PVC Shrink Sleeves", state: "menuOption", link: "productsandservices.asp?page=pvc.htm", head: "Products & Services"};
headData[29] = {title: "Security Products", page: "securityproducts.htm", label: "Security Products", state: "menuOption", link: "productsandservices.asp?page=securityproducts.htm", head: "Products & Services"};

headData[30] = {title: "Markets", page: "markets.htm", label: "Markets", state: "menuHead", link: "markets.asp?page=markets.htm", head: 0};
headData[31] = {title: "Health Care", page: "healthcare.htm", label: "Health Care", state: "menuOption", link: "markets.asp?page=healthcare.htm", head: "Markets"};
headData[32] = {title: "Personal Care", page: "personalcare.htm", label: "Personal Care", state: "menuOption", link: "markets.asp?page=personalcare.htm", head: "Markets"};
headData[33] = {title: "Beverage", page: "beverage.htm", label: "Beverage Market", state: "menuOption", link: "markets.asp?page=beverage.htm", head: "Markets"}
headData[34] = {title: "Security Printing", page: "security.htm", label: "Security Printing", state: "menuOption", link: "markets.asp?page=security.htm", head: "Markets"}
headData[35] = {title: "Specialty Markets", page: "specialty.htm", label: "Specialty Markets", state: "menuOption", link: "markets.asp?page=specialty.htm", head: "Markets"}

headData[36] = {title: "News", page: "news.htm", label: "News", state: "menuHead", link: "news.asp?page=news.htm", head: 0};
headData[37] = {title: "Press Releases", page: "pressreleases.htm", label: "Press Releases", state: "menuOption", link: "news.asp?page=pressreleases.htm", head: "News"};
headData[38] = {title: "Awards", page: "awards.htm", label: "Awards", state: "menuOption", link: "news.asp?page=awards.htm", head: "News"};

headData[39] = {title: "Contact Us", page: "contactus.htm", label: "Contact Us", state: "menuHead", link: "contactus.asp?page=contactus.htm", head: 0}; 
headData[40] = {title: "Technical Service", page: "tsrform.htm", label: "Technical Service", state: "menuOption", link: "contactus.asp?page=tsrform.htm", head: "Contact Us"};
headData[41] = {title: "Product Request", page: "productrequest.htm", label: "Product Request", state: "menuOption", link: "contactus.asp?page=productrequest.htm", head: "Contact Us"};
headData[42] = {title: "Apply Online", page: "employmentopportunities.htm", label: "Employment Opportunities", state: "menuOption", link: "contactus.asp?page=employmentopportunities.htm", head: "Contact Us"};

headData[43] = {title: "Roll Estimation Formulas", page: "rollquantity.htm", label: "Roll Estimation Formulas", state: "menuOption", link: "contactus.asp?page=rollquantity.htm", head: 1};

 
function drawTable(tbody){

var tr, td, y;
var x = 1;
var currentTitle = pageIdentifier;

tbody = document.getElementById(tbody);

for (var i=0; i < headData.length ; i++){

var hd = headData[i].head;

if (headData[i].head == 0){
  
  var innerString1;
  tr = tbody.insertRow (tbody.rows.length);
 
  td = tr.insertCell(tr.cells.length);
  td.width="100%";
  
  var a = i+1;
  var listLength = 0;
  var subList = new Array();
  
  for (var counter=0; counter < headData.length; counter++){
    if (headData[counter].head == headData[i].title){
      subList[listLength] = counter;
      listLength++;
    }
  }
  
  y = 0;
  
  
  if (currentTitle == headData[i].page){
  
    if (subList.length > 0){
  
      innerString1 = "<a href=\"javascript:toggleClamShellMenu(\'menu" + x + 
      "\')\" onclick=\"toggleImage(a" + x + ")\"><img border='0' src='images/arrow_right.gif' width='8' height='8' name =\"a" + x +"\"></a>" +
      "<span class=\"selectedHead\">" + headData[i].title + "</span>";
    
      innerString1 = innerString1 + "<span id = \"menu" + x + "\">";
    
        while (y < subList.length){
        innerString1 = innerString1 + " <a class=\"" + headData[(subList[y])].state + "\" href=\"" + headData[(subList[y])].link + "\">" + headData[(subList[y])].title + "</a><br>";
        y++;
        }
      
      innerString1 = innerString1 + "</span>";
      td.innerHTML = innerString1; 
    }
    
    else { 
    
      innerString1 = "<img border='0' src='images/arrow_right.gif' width='8' height='8'>" +
      "<span class=\"selectedHead\">" + headData[i].title + "</span>"; 
      td.innerHTML = innerString1;
    }
  }
  else {
  
    if (subList.length > 0){

      innerString1 = "<a href=\"javascript:toggleClamShellMenu(\'menu" + x + 
      "\')\"onclick=\"toggleImage(a" + x + ")\"><img border='0' src='images/arrow_right.gif' width='8' height='8' name =\"a" + x +"\"></a>" +
      "<a onmouseout=\"popUp(event, 'ht')\" onmouseover=\"popUp(event, 'ht')\" class='menuHead' href='" + headData[i].link + "'>" +
      headData[i].title + "</a>";
  
      innerString1 = innerString1 + "<span id = \"menu" + x + "\">";
  
        while (y < subList.length){
          if (headData[(subList[y])].page==currentTitle){
   	    innerString1 = innerString1 + "<span class=\"selectedOption\">" + headData[(subList[y])].title + "</span></br>";
   	    var menu = "menu" + x;
   	    var image = x;
   	    y++;
   	    }
          else{
      	    innerString1 = innerString1 + " <a class=\"" + headData[(subList[y])].state + "\" href=\"" + headData[(subList[y])].link + "\">" + headData[(subList[y])].title + "</a><br>";
      	    y++;
    	  }	   
    	}
    
      innerString1 = innerString1 + "</span>";
      td.innerHTML = innerString1;
    }
    else{ 
      innerString1 = "<img border='0' src='images/arrow_right.gif' width='8' height='8'>" +
      "<a class=\"" + headData[i].state + "\" href='" + headData[i].link + "'>" +
      headData[i].title + "</a>" 
      td.innerHTML = innerString1;
    }
  }
 x++;           
 }
}

if (menu) {
toggleClamShellMenu(menu);
toggleImage("a1");
}
}

