/*************************************************
* atsproduct.js                                  *
*                                                *
* Javascript routines for the product pages      *
*************************************************/

var cur_lyr;


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.display = "block";
}


function hideLayer(id) {
	var lyr = getElemRefs(id);
  	if (lyr && lyr.css) lyr.css.display = "none";
}


function getElemRefs(id) {
	var el = (document.getElementById)? document.getElementById(id): (document.all)? document.all[id]: (document.layers)? document.layers[id]: null;
	if (el) el.css = (el.style)? el.style: el;
	return el;
}


function setSrc(tab)
{	
	document.getElementById("current").id = '';
	tab.parentNode.id='current';
}


function openWin(url,width,height){ 
 window.open(url,'','width=' + width + ',height=' + height + ',scrollbars=yes,resizable=yes,toolbar=no,alwaysRaised=yes');
}
