
function setActiveStyleSheet(title) {
	//alert("set");
	//ChangeBtn(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;
    }
  }
}

// 他のウインドウの文字サイズを変更する xxx.htm 用(フレーム内表示がhtmlの場合)
function setActiveStyleSheet2(dName,title) {
  var i, a, main;
  for(i=0; (a = dName.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;
    }
  }
}

// 他のウインドウの文字サイズを変更する xxx.txt 用(フレーム内表示がテキストの場合)
function setActiveStyleSheet3(dName,title) {
  if( title == '3' )  dName.document.body.style.fontSize = "12pt";
  if( title == '2' )  dName.document.body.style.fontSize = "11pt";
  if( title == '1' )  dName.document.body.style.fontSize = "10pt";
}

function getActiveStyleSheet() {
	//alert("get");
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
  }
  return null;
}

function getPreferredStyleSheet() {
	//alert("pre");
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
			//alert(i);
    if(a.getAttribute("rel").indexOf("style") != -1
       && a.getAttribute("rel").indexOf("alt") == -1
       && a.getAttribute("title")
       ) return a.getAttribute("title");
  }
  return null;
}


