
//resize window to fit detail image for products
function getGProperties(imageName) { 
   var  Gproperties = "<html><head><title>Press</title></head><body bgColor='#ffffff' leftmargin='0' topmargin='0' marginheight='0' marginwidth='0' ><center><img src='../img/spacer.gif' height='10' width='1' border='0'><br><img src='../img/prs/big/"+imageName+"'  border='0' name='myImage'></center><div align='right'><a href='javascript:window.close();' style='font:10pt arial; color:#555;'>close this page</a>&nbsp;&nbsp;</div><br><br></body></html>";
   return Gproperties;    }

function bigPic(imageName) {
var newWindow = window.open("","mySwin","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=840,height=700");
newWindow.document.write(getGProperties(imageName));
newWindow.document.close();
newWindow.focus();}

function openPDFArticle(pdfName)
{
	var pdfFile = '../img/prs/big/' + pdfName;
	var newPDFWindow = window.open(pdfFile,"myPDFWin","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=840,height=700");
	newPDFWindow.focus();
}

/*************************************************************************
  This code is from Dynamic Web Coding at http://www.dyn-web.com/
  Copyright 2001-3 by Sharon Paine 
  See Terms of Use at http://www.dyn-web.com/bus/terms.html
  regarding conditions under which you may use this code.
  This notice must be retained in the code as is!
*************************************************************************/
//******************product layers start
// resize fix for ns4
var origWidth, origHeight;
if (document.layers) {
	origWidth = window.innerWidth; origHeight = window.innerHeight;
	window.onresize = function() { if (window.innerWidth != origWidth || window.innerHeight != origHeight) history.go(0); }
}

var cur_lyr;	// holds id of currently visible layer
function swapLayers(id) {
  if (cur_lyr) hideLayer(cur_lyr);
  showLayer(id);
  cur_lyr = id;
}

function showLayer(id) {
  var lyr = getElemRefs(id);
  if (lyr && lyr.css) lyr.css.visibility = "visible";
}

function hideLayer(id) {
  var lyr = getElemRefs(id);
  if (lyr && lyr.css) lyr.css.visibility = "hidden";
}

function getElemRefs(id) {
	var el = (document.getElementById)? document.getElementById(id): (document.all)? document.all[id]: (document.layers)? getLyrRef(id,document): null;
	if (el) el.css = (el.style)? el.style: el;
	return el;
}

// get reference to nested layer for ns4
// from old dhtmllib.js by Mike Hall of www.brainjar.com
function getLyrRef(lyr,doc) {
	if (document.layers) {
		var theLyr;
		for (var i=0; i<doc.layers.length; i++) {
	  	theLyr = doc.layers[i];
			if (theLyr.name == lyr) return theLyr;
			else if (theLyr.document.layers.length > 0) 
	    	if ((theLyr = getLyrRef(lyr,theLyr.document)) != null)
					return theLyr;
	  }
		return null;
  }
}
//******************product layers end


