<!-- Begin Hiding

  // RogerArrick.com JavaScript Functions.
  // Roger Arrick
  // 5/11/2010


  // Show an Image in a seperate popup window.
  // parameters:  image name, width of image, height of image
  function ShowImage(theimage,w,h) {
    w=w+50; // Make room for scroll bar.
    h=h+60; // Make room for scrool bar and status line.
    var x="width="+w+",height="+h+",scrollbars=1,resizable=1,status=1,screenx=100,screeny=20";
    ImageWindow=window.open("", "ImageWindow", x);
    ImageWindow.document.write("<html><head><title>RogerArrick.com Image</title></head><body bgcolor='#FFFFFF' onBlur='window.close()'>");
    ImageWindow.document.write("<a href='#' onclick='window.close()'><img src='",theimage,"' border='0' alt='Click to close this Image'></a>");
    ImageWindow.document.write('<br><center><font color="Red"><b>Click picture to go back</b></font></center>');
    ImageWindow.document.write("</body></html>");
    ImageWindow.document.close();
  }

  // Show an webpage in a seperate popup window.
  // parameters:  page name, width of image, height of image
  function ShowPage(thepage,w,h) {
    w=w+40; // Make room for scroll bar.
    h=h+40; // Make room for scrool bar and status line.
    var x="width="+w+",height="+h+",scrollbars=1,resizable=1,status=1,screenx=100,screeny=20";
    PageWindow=window.open(thepage, "PageWindow", x);
  }

// Show a module popup on menu.
// Called like this: <a href="q104.html" onmouseout="hidemodule()" onmouseover="showmodule(event,'q104',1)">Q104 MIDI Interface</a><br>
function showmodule(e, module, spaces)
{
  // Start building popup html.
  var ih = '<table border="0" cellpadding="0" cellspacing="0"><tr><td valign="top">';
  ih += '<img src="/' + module + 't.jpg" align="left" height="80" border="0" >';
  ih += '</td><td valign="top">';

  // Set width of popup based on module width.
  if (spaces == 1) { moduleinfo.style.width=250;}
  if (spaces == 2) { moduleinfo.style.width=250;}
  if (spaces > 2)  { moduleinfo.style.width=300;}
  if (spaces > 4)  { moduleinfo.style.width=350;}

  // Put module info and image into popup.
  if (module == 'q101')  { ih += '<b>Power Components</b><p>Modules, supplies, harnesses, cables and adapters.  Plus example setups.'; }
  if (module == 'q104')  { ih += '<b>Q104 MIDI Interface</b><p>Creates control voltages from MIDI signals. Pitch, Gate, Velocity, Trigger outputs.'; }

  // Finish off html inside popup.
  moduleinfo.innerHTML = ih + '</td></tr></table>';

  // This fancy code is to extract mouse position cross-browser. posx, posy.
  var posx = 0;
  var posy = 0;
  if (!e) var e = window.event;
  if (e.pageX || e.pageY) 	{
    posx = e.pageX;
    posy = e.pageY;
	}
	else if (e.clientX || e.clientY) 	{
     posx = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;
     posy = e.clientY + document.body.scrollTop + document.documentElement.scrollTop;
  }

  // Set popup position and make visible.
  moduleinfo.style.left = posx + 50 + 'px';
  moduleinfo.style.top = posy - 30 + 'px';
  moduleinfo.style.visibility = 'visible';
}

// Hide module popup.
function hidemodule()
{
  moduleinfo.style.visibility='hidden';
}

// End Hiding -->



