// JavaScript Document
/////FOR POPUPS/////
var popupLinkConfig = new Array;
// Delete/copy/modify the following lines to configure your popup windows.
popupLinkConfig["NoClass"] = new Array ( "", "width=600,height=600,scrollbars=yes,menubar=yes,resizable=yes");

function initPopupLinks()
{
  if (!document.getElementsByTagName) return true;
  var pageLinks = document.getElementsByTagName("a");
  for (var i = 0; i < pageLinks.length; i++) 
  {
    if (((pageLinks[i].className != null) && 
         (pageLinks[i].className != "")) ||
        ((pageLinks[i].parentNode.className != null) && 
         (pageLinks[i].parentNode.className != "")))
    {
      var linkClass = " " + pageLinks[i].className + " ";
      if ((linkClass == "  ") && (pageLinks[i].parentNode.className != ""))
      {
        linkClass = " " + pageLinks[i].parentNode.className + " ";
      }
      for (var theKey in popupLinkConfig) 
      {
        if (linkClass.indexOf(" " + theKey + " ") > -1)
        {
          if ((pageLinks[i].target == "") || (pageLinks[i].target == null))
          {
            pageLinks[i].target = (popupLinkConfig[theKey][0] != "") ? popupLinkConfig[theKey][0] : theKey;
          }
          pageLinks[i].settings = popupLinkConfig[theKey][1];
          pageLinks[i].onclick = popUp;
        }
      }
    }
  }
  return true;
}

function popUp()
{
  newWin = window.open(this.href, this.target, this.settings);
  newWin.focus();
  return false;
}

//modal boxes
function showBox(lnk,title,elm) {
	w = new UI.Window({
		shadow: true, 
		theme: "alphacube",
		width:400, 
		height:300
	});
	w.setAjaxContent(lnk, {method: "GET", onComplete: initPopupLinks, onCreate: function() { this.setContent('<div class="message">Please wait...</div><div class="spinner"></div>'); }})
	w.center();
	w.show().focus(); 
	w.header.update(title)
}
function clsSubs(){
	var subsx = $$('.accordion_toggle');
	subsx.each(function(s) {
		$(s.next(0)).setStyle({
		  display: 'none'
		});
	});
}
Event.observe(window, 'load', function(){clsSubs(); Effect.SlideDown("prodslid");}, false);
