//サイドメニュー用
function menu(no){
	divObj = document.getElementsByTagName('div');
	targetObj= new RegExp('mareax');
	
	for(i=0; i < divObj.length; i++){
		if (divObj[i].id.match(targetObj)){
      if (divObj[i].id == 'mareax'+no){
        var d = document.getElementById('mareax'+no);
        if (d.style.display != 'block'){
          d.style.display = 'block';
        }else{
          d.style.display = 'none';
        }
      }else{
  			//divObj[i].style.display = "none";
      }
		}
	}
}

function sTitle(c,sc,la,stype){
  lc = c;
  lsc = sc;
  lla = la;
	httpObj = createXMLHttpRequest(sTitle2);
	if (httpObj){
    dd = Date();
    if (!stype){
  		httpObj.open("GET","/settitle_ajax.php?c="+c+"&sc="+sc+"&la="+la+"&"+dd);
    }else{
  		httpObj.open("GET","/settitle_ns_ajax.php?c="+c+"&sc="+sc+"&la="+la+"&"+dd);
    }
		httpObj.send(null);
    location.hash = 'res';
	}
}

function sTitle2(){
	if ((httpObj.readyState == 4) && (httpObj.status == 200)){
    document.getElementById('titlesearchResult').innerHTML = httpObj.responseText;
	}
}

function swy(vv){
	httpObj = createXMLHttpRequest(sTitle2);
	if (httpObj){
    dd = Date();
    if (vv == 'default'){
		  httpObj.open("GET","/settitle_ajax.php?c="+lc+"&sc="+lsc+"&la="+lla+"&"+dd);
    }else if (vv == 'str'){
		  httpObj.open("GET","/settitle_ajax.php?c="+lc+"&sc="+lsc+"&la="+lla+"&h=1&"+dd);
    }else{
		  httpObj.open("GET","/settitle_ajax.php?c="+lc+"&sc="+lsc+"&la="+lla+"&y="+vv+"&"+dd);
    }
		httpObj.send(null);
	}
}

function kwTitle(la,type){
	httpObj = createXMLHttpRequest(sTitle2);
	if (httpObj){
    dd = Date();
    if (type == 0){
      var w = document.getElementsByName('tsearchw').item(0).value;
    }else{
      var w = type;
    }
		httpObj.open("GET","/settitle_kw_ajax.php?la="+la+"&w="+encodeURI(w)+"&"+dd);
		httpObj.send(null);
	}
}

