﻿var doAlerts=true;
function changeSheets(whichSheet)
{
  whichSheet=whichSheet-1;
  if(document.styleSheets)
  {
    var c = document.styleSheets.length;
    //if (doAlerts) alert('Change to Style '+(whichSheet+1));
    for(var i=0;i<c;i++)
    {
      if(i!=whichSheet)
      {
        document.styleSheets[i].disabled=true;
      }
      else
      {
        document.styleSheets[i].disabled=false;
      }
    }
  }
}

function wopen(url, name, w, h)
{
	// Fudge factors for window decoration space.
	// In my tests these work well on all platforms & browsers.
	w += 32;
	h += 96;
	var win = window.open(url,name,
		'width=' + w + ', height=' + h + ', ' +
		'location=no, menubar=no, ' +
		'status=yes, toolbar=no, scrollbars=yes, resizable=no');
	win.resizeTo(w, h);
	win.focus();
}

