﻿var sb_whichStyle = "";
var sb_navStyle = "";

if (is.win) {
	sb_whichStyle = (is.ns4 ) ? "global_ns4" : "global";
	sb_navStyle = (is.ns4 ) ? "nav_ns4" : "nav";
}
else if (is.mac) {
	sb_whichStyle = (is.ie) ? "global_macie" : "global_macie";
	sb_navStyle = (is.ie) ? "nav_macie" : "nav_macie";
}
document.write('<link rel="stylesheet" href="/styles/' + sb_whichStyle + '.css" type="text/css">');
document.write('<link rel="stylesheet" href="/styles/' + sb_navStyle + '.css" type="text/css">');
document.close();

function MM_preloadImages() { //v3.0
	var d=document; 
	if (d.images) {
		if (!d.MM_p) {
			d.MM_p=new Array();
		}
	}
	var i, j = d.MM_p.length, a = MM_preloadImages.arguments;
	for(i = 0; i < a.length; i++) {
		if (a[i].indexOf("#") != 0) {
			d.MM_p[j] = new Image;
			d.MM_p[j++].src = a[i];
		}
	}
}

function MM_swapImgRestore() { //v3.0
	var i, x, a=document.MM_sr;
	for (i = 0; a && i < a.length && (x = a[i]) && x.oSrc; i++) {
		x.src = x.oSrc;
	}
}

function MM_swapImage() { //v3.0
	var i, j=0, x, a=MM_swapImage.arguments;
	document.MM_sr = new Array;
	for (i = 0; i < (a.length-2); i+=3) {
		if ((x = MM_findObj(a[i])) != null) {
			document.MM_sr[j++]=x;
			if (!x.oSrc) {
				x.oSrc = x.src;
			}
			x.src=a[i+2];
		}
	}
}

function MM_findObj(n, d) { //v4.01
	var p, i, x;
	if (!d) {
		d = document; 
	}
	if ((p = n.indexOf("?")) > 0 && parent.frames.length) {
		d = parent.frames[n.substring(p+1)].document;
		n = n.substring(0,p);
	}
	if (!(x = d[n]) && d.all) {
		x = d.all[n];
	}
	for (i = 0; !x && i < d.forms.length; i++) {
		x=d.forms[i][n];
	}
	for (i = 0; !x && d.layers && i < d.layers.length; i++) {
		x = MM_findObj(n,d.layers[i].document);
	}
	if (!x && d.getElementById) {
		x = d.getElementById(n);
	}
	return x;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
	window.open(theURL, winName, features);
}

// window pop up function
function sb_popWindow(url) {
	var optionListing = "HEIGHT=480,WIDTH=462,innerHeight=480,innerWidth=462,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0,screenX=10,screenY=20"
	var remote = window.open(url, "Popup", optionListing);
	if (remote != null) {
		remote.focus();
	}
}

function sb_popWindowLarge(url) {
	var optionListing = "HEIGHT=500,WIDTH=660,innerHeight=500,innerWidth=660,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0,screenX=10,screenY=20"
	var remote = window.open(url, "Popup", optionListing);
	if (remote != null)  {
		remote.focus();
	}
}

function sb_init(){
	sb_setNavState();
}

function checkemail(str) {
	return (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(str));
}

var pressedSubmit = false;

function sb_validateForm() { //v4.0
  	var i,p,q,nm,test,num,min,max,errors='',args=sb_validateForm.arguments;
	var evt = args[0];
	for (i = 1; i < (args.length-2); i+=3) { 
	
		test=args[i+2]; 
		val=MM_findObj(args[i]);
		
		if (val) {
			var temp_nm=val.name;
			temp_nm=args[i];
			nm = eval(temp_nm+'_label'); 
			
			// GET VALUES FOR RADIO BUTTONS AND CHECKBOXES
			if (val.length > 0 && (val.type!="select-one")){
				if ((val[0].type == "radio") || (val[0].type == "checkbox")) {
					theValue = "";
					for (j=0; j<val.length; j++) {
						if (val[j].checked) {theValue = val[j].value;}
					}
					val = theValue;
				}
			// GET VALUES FOR EVERYTHING ELSE
			} else {
				val = val.value;
			}
			
			if (val != "") {
    	  		if (test.indexOf('isEmail')!=-1) { 
					p=val.indexOf('@');
					q=val.lastIndexOf('.');
					if (p<1 || q>=(val.length-2) || ((p+1) >= q)) {
						errors+='- '+nm+' '+emailError+'\n';
     				}
				
				} else if (test.indexOf('isNotSpecial')!=-1) { 
					sPattern = /[^A-Za-z0-9_ .,'"&`-]/;
					if (val.search(sPattern) != -1) {
						errors+='- '+nm+' '+specialCharError+'\n';
     				}
				} else if (test.indexOf('isNoSpaceNotSpecial')!=-1) { 
					sPattern = /[^A-Za-z0-9_]/;
					if (val.search(sPattern) != -1) {
						errors+='- '+nm+' '+spaceSpecialCharError+'\n';
     				}
				} else if (test.indexOf('isPhone')!=-1) { 
					sPattern = /[^\d()\. -]/;
					if (val.search(sPattern) != -1) {
						errors+='- '+nm+' '+numericError+'\n';
     				}
				} else if ((test!='R') && (test.indexOf('Rif')==-1)) { 
					num = parseFloat(val);
       				if (isNaN(val)) {
       					errors+='- '+nm+' '+numericError+'\n';
	   				}
					
					// date - day
					if (test.indexOf('isDay') != -1) { 
        	  			min=1; 
          				max=31;
         				if (num<min || max<num) {
         					errors+='- '+nm+' '+dayError+'\n';
    					}
					// date - month
					} else if (test.indexOf('isMonth') != -1) { 
        	  			min=1; 
          				max=12;
         				if (num<min || max<num) {
         					errors+='- '+nm+' '+monthError+'\n';
    					}
					// date - year
					} else if (test.indexOf('isBirthYear') != -1) { 
        	  			min=1900; 
          				max=2000;
         				if (num<min || max<num) {
         					errors+='- '+nm+' '+birthYearError+'\n';
    					}	
					// in Range	
					} else if (test.indexOf('inRange') != -1) { 
						p=test.indexOf(':');
        	  			min=test.substring(8,p); 
          				max=test.substring(p+1);
         				if (num<min || max<num) {
         					errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    					}
					} // end if in range
    			} // end if 
			// conditional validation.  only validate if specified field has specified value
			} else if(test.indexOf('Rif')==0) { 
			
				p=test.indexOf(':');
				conditionItem=test.substring(3,p); 
				conditionValue=test.substring(p+1); // value of conditional form field that enables validation
				conditionElse = "";
				p=conditionValue.indexOf(':');
				
				if (p != -1) {
					conditionElse = conditionValue.substring(p+1);
					conditionValue = conditionValue.substring(0,p); 
				}
				
				conditionItem=MM_findObj(conditionItem);
				// GET VALUES FOR RADIO BUTTONS AND CHECKBOXES
				if (conditionItem.length > 0 && (conditionItem.type!="select-one")){
					if ((conditionItem[0].type == "radio") || (conditionItem[0].type == "checkbox")) {
						theValue = "";
						for (j=0; j<conditionItem.length; j++) {
							if (conditionItem[j].checked) {theValue = conditionItem[j].value;}
						}
						conditionItem = theValue;
					}
				} else { // GET VALUES FOR EVERYTHING ELSE
					conditionItem = conditionItem.value;
				}
				
				// get value of "Else" field if one is specified.  if this field is not empty, the current field can be empty
				if (conditionElse != "") {
					conditionElse=MM_findObj(conditionElse);
					
					// GET VALUES FOR RADIO BUTTONS AND CHECKBOXES
					if (conditionElse.length > 0 && (conditionElse.type!="select-one")){
						if ((conditionElse[0].type == "radio") || (conditionElse[0].type == "checkbox")) {
							theValue = "";
							for (j=0; j<conditionElse.length; j++) {
								if (conditionElse[j].checked) {theValue = conditionElse[j].value;}
							}
							conditionElse = theValue;
						}
					} else { // GET VALUES FOR EVERYTHING ELSE
						conditionElse = conditionElse.value;
					}
				}
						
				if ((conditionItem == conditionValue) && (conditionElse == "")) {
					errors += '- '+nm+' '+nullError+'.\n'; 
				}
    		} else if ((test.charAt(0) == 'R') && (test != 'RisNotSpecial')) {
    			errors += '- '+nm+' '+nullError+'.\n'; 
			} // end if value != ""
		} // end if val
  	} // end for loop
	
  	if (errors) {
  		alert(validationMessage+'\n'+errors);
	}
  
	var valid = (errors == '');	
	document.MM_returnValue = valid;
	//return (valid);
  
	if (pressedSubmit == false) {
		pressedSubmit = valid;
		evt = (evt) ? evt : ((event) ? event : null);    
		if (evt.returnValue) {
			evt.returnValue = valid;
		}
		else if (evt.preventDefault && valid==false) {
			evt.preventDefault();
		} 
		else {
			return valid;
		}
	} 
	else {
		return(false);
	}
}




function saveCookie(name,value,days) {
	var expires = "";
    if (days) {
        var date = new Date();
        date.setTime(date.getTime()+(days*24*60*60*1000));
        expires = "; expires=" + date.toGMTString();
    }
    document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
    var c = document.cookie;
    if (c.indexOf(name) == -1) {
    	return null;
    }
    else {
        var start = c.indexOf(name) + name.length + 1;
        for (var end = start; end < c.length; end++) {
			if (c.charAt(end) == ";") {
				break;
			}
		}
        return c.substring(start,end);
    }
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
	if (init==true) with (navigator) {
		if ((appName=="Netscape") && (parseInt(appVersion)==4)) {
			document.MM_pgW=innerWidth;
			document.MM_pgH=innerHeight;
			onresize=MM_reloadPage;
		}
	}
	else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) {
		location.reload();
	}
}
MM_reloadPage(true);

//change to display: block or display: inline
function displayLayers() {
	var i, p, v, obj, args = displayLayers.arguments;
	for (i = 0; i < (args.length-2); i+=3) {
		if ((obj=MM_findObj(args[i]))!=null) {
			v=args[i+2];
			if (obj.style) {
				obj=obj.style;
				v = (v=='show') ? 'block' : (v=='hide') ? 'none' : v;
			}
			obj.display=v;
		}
	}
}


/* AIRガジェットコンテンツ用JS追加（081119）

/**
 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */

if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;



// ページ内リンクのスムーズスクロール用JS　開始
// スクロールスピードの調整は、136行目のss.STEPS =を調整（数値が低いほど早くなる）

var ss = {
  fixAllLinks: function() {
    // Get a list of all links in the page
    var allLinks = document.getElementsByTagName('a');
    // Walk through the list
    for (var i=0;i<allLinks.length;i++) {
      var lnk = allLinks[i];
      if ((lnk.href && lnk.href.indexOf('#') != -1) && 
          ( (lnk.pathname == location.pathname) ||
	    ('/'+lnk.pathname == location.pathname) ) && 
          (lnk.search == location.search)) {
        // If the link is internal to the page (begins in #)
        // then attach the smoothScroll function as an onclick
        // event handler
        ss.addEvent(lnk,'click',ss.smoothScroll);
      }
    }
  },

  smoothScroll: function(e) {
    // This is an event handler; get the clicked on element,
    // in a cross-browser fashion
    if (window.event) {
      target = window.event.srcElement;
    } else if (e) {
      target = e.target;
    } else return;

    // Make sure that the target is an element, not a text node
    // within an element
    if (target.nodeName.toLowerCase() != 'a') {
      target = target.parentNode;
    }
  
    // Paranoia; check this is an A tag
    if (target.nodeName.toLowerCase() != 'a') return;
  
    // Find the <a name> tag corresponding to this href
    // First strip off the hash (first character)
    anchor = target.hash.substr(1);
    // Now loop all A tags until we find one with that name
    var allLinks = document.getElementsByTagName('a');
    var destinationLink = null;
    for (var i=0;i<allLinks.length;i++) {
      var lnk = allLinks[i];
      if (lnk.name && (lnk.name == anchor)) {
        destinationLink = lnk;
        break;
      }
    }
    if (!destinationLink) destinationLink = document.getElementById(anchor);

    // If we didn't find a destination, give up and let the browser do
    // its thing
    if (!destinationLink) return true;
  
    // Find the destination's position
    var destx = destinationLink.offsetLeft; 
    var desty = destinationLink.offsetTop;
    var thisNode = destinationLink;
    while (thisNode.offsetParent && 
          (thisNode.offsetParent != document.body)) {
      thisNode = thisNode.offsetParent;
      destx += thisNode.offsetLeft;
      desty += thisNode.offsetTop;
    }
  
    // Stop any current scrolling
    clearInterval(ss.INTERVAL);
  
    cypos = ss.getCurrentYPos();
  
    ss_stepsize = parseInt((desty-cypos)/ss.STEPS);
    ss.INTERVAL =
setInterval('ss.scrollWindow('+ss_stepsize+','+desty+',"'+anchor+'")',10);
  
    // And stop the actual click happening
    if (window.event) {
      window.event.cancelBubble = true;
      window.event.returnValue = false;
    }
    if (e && e.preventDefault && e.stopPropagation) {
      e.preventDefault();
      e.stopPropagation();
    }
  },

  scrollWindow: function(scramount,dest,anchor) {
    wascypos = ss.getCurrentYPos();
    isAbove = (wascypos < dest);
    window.scrollTo(0,wascypos + scramount);
    iscypos = ss.getCurrentYPos();
    isAboveNow = (iscypos < dest);
    if ((isAbove != isAboveNow) || (wascypos == iscypos)) {
      // if we've just scrolled past the destination, or
      // we haven't moved from the last scroll (i.e., we're at the
      // bottom of the page) then scroll exactly to the link
      window.scrollTo(0,dest);
      // cancel the repeating timer
      clearInterval(ss.INTERVAL);
      // and jump to the link directly so the URL's right
      location.hash = anchor;
    }
  },

  getCurrentYPos: function() {
    if (document.body && document.body.scrollTop)
      return document.body.scrollTop;
    if (document.documentElement && document.documentElement.scrollTop)
      return document.documentElement.scrollTop;
    if (window.pageYOffset)
      return window.pageYOffset;
    return 0;
  },

  addEvent: function(elm, evType, fn, useCapture) {
    // addEvent and removeEvent
    // cross-browser event handling for IE5+,  NS6 and Mozilla
    // By Scott Andrew
    if (elm.addEventListener){
      elm.addEventListener(evType, fn, useCapture);
      return true;
    } else if (elm.attachEvent){
      var r = elm.attachEvent("on"+evType, fn);
      return r;
    } else {
      alert("Handler could not be removed");
    }
  } 
}

ss.STEPS = 10;

ss.addEvent(window,"load",ss.fixAllLinks);

// ページ内リンクのスムーズスクロール用JS　終了


// TOP あなたは何についてお調べですか？用JS 開始（100417）

var qa_swtich = {
	main: function(){
		// elements
		var qa_switch_def = document.getElementById('qa_switch_def');
		var qa_switch_1 = document.getElementById('qa_switch_1');
		var qa_switch_2 = document.getElementById('qa_switch_2');
		var qa_switch_3 = document.getElementById('qa_switch_3');
		var qa_switch_4 = document.getElementById('qa_switch_4');
		qa_switch_1.style.display = 'none';
		qa_switch_2.style.display = 'none';
		qa_switch_3.style.display = 'none';
		qa_switch_4.style.display = 'none';
		var qa_switch_area = [
			qa_switch_def,
			qa_switch_1,
			qa_switch_2,
			qa_switch_3,
			qa_switch_4
		]
		var qa_switch_handler = document.getElementById('qa_switch_handler');
		// method
		var qa_switch_bind = function(anchor, area){
			if (anchor.nodeName == 'A') {
				var img = anchor.childNodes[0];
				var target = document.getElementById(anchor.hash.match(/^#([a-z0-9_]+)$/)[1]);
				anchor.onclick = function(){
					for (var i = 0; i < area.length; i++) {
						area[i].style.display = 'none';
					}
					target.style.display = 'block';
					return false;
				}
				MM_preloadImages(img.src.replace(/handler.gif$/,'handler_on.gif'));
				anchor.onmouseover = function(){
					img.src = img.src.replace(/handler.gif$/,'handler_on.gif');
				};
				anchor.onmouseout = function(){
					img.src = img.src.replace(/handler_on.gif$/,'handler.gif');
				};
			}
		};
		var qa_switch_bind_hover = function(anchor){
			if (anchor.nodeName == 'A') {
				var img = anchor.childNodes[0];
				MM_preloadImages(img.src.replace(/link_([0-9]+).gif$/,'link_$1_on.gif'));
				anchor.onmouseover = function(){
					img.src = img.src.replace(/link_([0-9]+).gif$/,'link_$1_on.gif');
				};
				anchor.onmouseout = function(){
					img.src = img.src.replace(/link_([0-9]+)_on.gif$/,'link_$1.gif');
				};
			}
		}
		// bind
		for (var i = 0; i < qa_switch_handler.childNodes.length; i++) {
			qa_switch_bind(qa_switch_handler.childNodes[i], qa_switch_area);
		}
		for (var i = 0; i < qa_switch_area.length; i++) {
			var qa_switch_area_nodes = qa_switch_area[i].childNodes;
			for (var j = 0; j < qa_switch_area_nodes.length; j++) {
				qa_switch_bind_hover(qa_switch_area_nodes[j]);
			}
		}
	},
	addEvent: function(elm, evType, fn, useCapture) {
		// addEvent and removeEvent
		// cross-browser event handling for IE5+,  NS6 and Mozilla
		// By Scott Andrew
		if (elm.addEventListener){
			elm.addEventListener(evType, fn, useCapture);
			return true;
		} else if (elm.attachEvent){
			var r = elm.attachEvent("on"+evType, fn);
			return r;
		} else {
			alert("Handler could not be removed");
		}
	}
}
qa_swtich.addEvent(window,'load',qa_swtich.main);

// TOP あなたは何についてお調べですか？用JS 終了