function changecss(theClass, element, value1, value2) {
//documentation for this script at http://www.shawnolson.net/a/503/
  var cssRules;
  if (document.all) {
  cssRules = 'rules';
  }
  else if (document.getElementById) {
  cssRules = 'cssRules';
  }
  for (var S = 0; S < document.styleSheets.length; S++){
  for (var R = 0; R < document.styleSheets[S][cssRules].length; R++) {
    if (document.styleSheets[S][cssRules][R].selectorText == theClass) {
      if (document.styleSheets[S][cssRules][R].style[element] == value1) {
        document.styleSheets[S][cssRules][R].style[element] = value2;
      } else {
        document.styleSheets[S][cssRules][R].style[element] = value1;
      }    
    }
  }
  }	
}

function popitup(url)
{
    newwindow=window.open(url,'name','height=400,width=500');
    if (window.focus) {newwindow.focus()}
    return false;
}

function setActiveStyleSheet(title) {
   var i, a, main;
   for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
     if(a.getAttribute("rel").indexOf("style") != -1
        && a.getAttribute("title")) {
       a.disabled = true;
       if(a.getAttribute("title") == title) a.disabled = false;
     }
   }
}

