var speed, currentpos=curpos1=0,alt=1,curpos2=-1
function initialize(){
if (window.parent.scrollspeed!=0){
speed=window.parent.scrollspeed
scrollwindow()
}
}
function scrollwindow(){
temp=(document.all)? document.body.scrollTop : window.pageYOffset
alt=(alt==0)? 1 : 0
if (alt==0)
curpos1=temp
else
curpos2=temp
window.scrollBy(0,speed)
}
setInterval("initialize()",10)

function jumpMenu(){
location=(document.link.list.options
[document.link.list.selectedIndex].value);
}

function jumpMenu1(){
location=(document.link1.list1.options
[document.link1.list1.selectedIndex].value);
}

function jumpMenu2(){
location=(document.link2.list2.options
[document.link2.list2.selectedIndex].value);
}

function jumpMenu3(){
location=(document.link3.list3.options
[document.link3.list3.selectedIndex].value);
}

function jumpMenu4(){
location=(document.link4.list4.options
[document.link4.list4.selectedIndex].value);
}

function jumpMenu5(){
location=(document.link5.list5.options
[document.link5.list5.selectedIndex].value);
}

//........................................................
// YahWoe! MarkSheetMaker ver.2.92
//                 Dr.STRANGELOVE <drstrangelove@dr.com>
//                                http://www.yahwoe.com/
// written in JavaScript1.0.
//  (for Netscape Navigator 2 or later, 
//       Internet Explorer 3 or later.)
//........................................................
function YahWoe(){
  var strName = '', strNames = 0;
  var i, j, blank;
  var sumValue = 0, minValue = 0, maxValue = 0;
  with(document.yahwoecheck){
    for(i = 0; i < elements.length; i++)
      if(elements[i].name != '' && elements[i].name != strName){
        strNames++;
        strName = elements[i].name;
      }
    var arrayName = new YWArray(strNames);
    strName = '';
    strNames = 0;
    for(i = 0; i < elements.length; i++)
      if(elements[i].name != '' && elements[i].name != strName)
        arrayName[strNames++] = strName = elements[i].name;
    for(i = 0; i < arrayName.length; i++){
      var minPart, maxPart;
      blank = i;
      for(j = 0; j < eval(arrayName[i] + '.length'); j++)
        with(eval(arrayName[i] + '[' + j + ']')){
          if(j == 0)minPart = maxPart = value;
          minPart = Math.min(minPart,value);
          maxPart = Math.max(maxPart,value);
          if(checked){blank = -1; sumValue += eval(value);}
        }
      minValue += minPart; maxValue += maxPart;
      if(blank >= 0)break;
    }
  }    
  if(blank < 0) YahWoeShowResult(minValue, maxValue, sumValue)
  else alert((eval(blank) + 1) + "番目をチェックして下さい。");
}
function YWArray(n){
  this.length = n;
  for(var i = 0; i <= n; i++) this[i] = 0;
  return this;
}
function YahWoeShowResult(minValue, maxValue, sumValue){
  var i;
  var rate = Math.floor((sumValue - minValue) * 100 / (maxValue - minValue));
  // BEGIN
  var question = 4;
  var diagnosis = new YWArray(question);
  for(var j = 0; j < question; j++) diagnosis[j] = new YWArray(3);
  diagnosis[0][0] = 5;
  diagnosis[0][1] = "普通の状態<br>";
  diagnosis[0][2] = "<br>(ストレスは今のところ大丈夫です。)";
  diagnosis[1][0] = 10;
  diagnosis[1][1] = "軽度のストレス状態<br>";
  diagnosis[1][2] = "<br>（自分で注意すれば回復できる程度です。）";
  diagnosis[2][0] = 20;
  diagnosis[2][1] = "中程度のストレス状態<br>";
  diagnosis[2][2] = "<br>（本格的ストレス状態のはじまりです。）";
  diagnosis[3][0] = 30;
  diagnosis[3][1] = "重度のストレス状態<br>";
  diagnosis[3][2] = "<br>（早めに専門医にかかられることをお勧めします）";
  // END
  for(i in diagnosis)
    if(sumValue <= diagnosis[i][0])break;
  with(document){
    open();
    write("<", "HTML><", "HEAD>");
    write("<TITLE>診断結果<", "/TITLE><", "/HEAD>");
    write("<", "BODY TEXT=#666666 BGCOLOR=#FFFFF0>");
    write("<FORM ACTION=POST><DIV ALIGN=CENTER>");
    write("<TABLE BORDER=0 HEIGHT='100%' CELLPADDING=10 CELLSPACING=0 BGCOLOR=#fffff0><TR><TD WIDTH=350>");
    write("<DIV ALIGN=CENTER>");
    write("<img src=img/result.gif><BR>");
    write(diagnosis[i][1].big().big().bold().fontcolor("#ff6633"));
    write(diagnosis[i][2].small());
    write("<BR><BR><BR>");
    write("<INPUT TYPE='BUTTON' STYLE='cursor:hand' VALUE='戻る' onClick='history.back();' onKeyPress='history.back();'>");
    write("<", "/TD><", "/TR><", "/TABLE></", "DIV><", "/FORM>");
    write("<", "/BODY><", "/HTML>");
    close();
  }
}

if (!document.layers&&!document.all&&!document.getElementById)
event="test"
function popon(current,e,text){
if (document.all||document.getElementById){
thetitle=text.split('<br>')
if (thetitle.length>1){
thetitles=''
for (i=0;i<thetitle.length;i++)
thetitles+=thetitle[i]
current.title=thetitles
}
else
current.title=text
}
else if (document.layers){
document.pppp.document.write('<layer bgColor="#ffcc00" style="border:0px solid black;font-size:12px;">'+text+'</layer>')
document.pppp.document.close()
document.pppp.left=e.pageX+5
document.pppp.top=e.pageY+5
document.pppp.visibility="show"
}
}
function popoff(){
if (document.layers)
document.pppp.visibility="hidden"
}
<!--スクロールページトップ-->
var strApp=navigator.appName;
var strVer=navigator.appVersion;

var Mac=strVer.indexOf('Mac',0)!=-1;
var Win=strVer.indexOf('Win',0)!=-1;
var IE=strApp.indexOf("Microsoft")!=-1;
var NN=strApp.indexOf("Netscape")!=-1;
var Vmajor=parseInt(strVer);
var Vminor=parseFloat(strVer);
var MacIE5=((Mac && strVer.indexOf('MSIE 5')!=-1)||(Mac && IE && Vmajor>4));
var MacIE4=(Mac && strVer.indexOf('MSIE 4.')!=-1);
var MacIE3=(Mac && strVer.indexOf('MSIE 3.')!=-1);

function getScrlLeft(){
	if(IE) return document.body.scrollLeft;
	else if(window.pageXOffset) return window.pageXOffset;
	else return 0;
}

function getScrlTop(){
	if(IE) return document.body.scrollTop;
	else if(window.pageYOffset) return window.pageYOffset;
	else return 0;
}

var tID;
function pageScrl(toX,toY,frms,cuX,cuY){
	if(tID) clearTimeout(tID);
	if(!toX || toX<0) toX=0;
	if(!toY || toY<0) toY=0;
	if(!cuX) cuX=0+getScrlLeft();
	if(!cuY) cuY=0+getScrlTop();

	cuX+=(toX-getScrlLeft())/frms;
	if(cuX<0) cuX=0;
	cuY+=(toY-getScrlTop())/frms;
	if(cuY<0) cuY=0;
	var posX=Math.floor(cuX);
	var posY=Math.floor(cuY);
	window.scrollTo(posX,posY);
	if(posX!=toX || posY!=toY) tID=setTimeout("pageScrl("+toX+","+toY+","+frms+","+cuX+","+cuY+")",16);
}

function topscrl(){
	if(!MacIE3 && !MacIE4 && !NN && window.scrollTo || NN && (Vminor>=4.75) && window.scrollTo){
		pageScrl(0,0,4);
	}else{
 		location.hash="top";
	}
}

adTime=6;  // seconds ad reminder is shown
chanceAd=1; // ad will be shown 1 in X times (put 1 for everytime)

var ns=(document.layers);
var ie=(document.all);
var w3=(document.getElementById && !ie);
adCount=0;
function initAd(){
	if(!ns && !ie && !w3) return;
	if(ie)		adDiv=eval('document.all.fukidashi.style');
	else if(ns)	adDiv=eval('document.layers["fukidashi"]');
	else if(w3)	adDiv=eval('document.getElementById("fukidashi").style');
	randAd=Math.ceil(Math.random()*chanceAd);
        if (ie||w3)
        adDiv.visibility="visible";
        else
        adDiv.visibility ="show";
	if(randAd==1) showAd();
}
function showAd(){
if(adCount<adTime*10){adCount+=1;
	if (ie){documentWidth  =document.body.offsetWidth/2+document.body.scrollLeft+550;
	documentHeight =document.body.offsetHeight/2+document.body.scrollTop-20;}	
	else if (ns){documentWidth=window.innerWidth/2+window.pageXOffset-20;
	documentHeight=window.innerHeight/2+window.pageYOffset-20;} 
	else if (w3){documentWidth=self.innerWidth/2+window.pageXOffset-20;
	documentHeight=self.innerHeight/2+window.pageYOffset-20;} 
	adDiv.left=documentWidth-200;adDiv.top =documentHeight-200;
	setTimeout("showAd()",100);}else closeAd();
}
function closeAd(){
if (ie||w3)
adDiv.display="none";
else
adDiv.visibility ="hide";
}
onload=initAd;
//End-->
