<!--
function wordSearch() {
if(document.fwd.freeword.value==""){alert('フリーワードを入力してください。'); return false;}
w=document.fwd.freeword.value;
w=w + "_貸事務所";
w=encodeURI(w);
u='/tokyo-office/' + w;
window.location.href=u;
}
function wordSearcht() {
if(document.fwdt.freewordt.value==""){alert('フリーワードを入力してください。'); return false;}
w=document.fwdt.freewordt.value;
w=w + "_貸事務所";
w=encodeURI(w);
u='/tokyo-office/' + w;
window.location.href=u;
}

function goto() {
	a=document.list.ars.options[document.list.ars.selectedIndex].value;
	f=document.list.tfs.options[document.list.tfs.selectedIndex].value;
	t=document.list.tts.options[document.list.tts.selectedIndex].value;
	
    var type = document.list.type.value;
    
	strF = document.list.tfs.options[document.list.tfs.selectedIndex].text.replace("坪","");
	strT = document.list.tts.options[document.list.tts.selectedIndex].text.replace("坪","");
	
	if(parseInt(strF) >= parseInt(strT)){f=8;}
	if(a!=''){
		s=a + '/';
	}else{s='';}
	if(f==8 && t==0){
        if(type == 1){
            u='/' + document.list.base.value + '/' + s + 'taishin/';
        } else {
            u= '/' + document.list.base.value + '/' + s;
        }
    } else {
        if(type == 1){
            u='/' + document.list.base.value + '/' + s + 'taishin/' + '1_0_' + f + '_' + t + '/';
        } else {
            u= '/' + document.list.base.value + '/' + s + '1_0_' + f + '_' + t + '/';
        }
    }
    //alert(document.list.base.value);
	window.location.href=u;
}

function chgSort(o) {
    var url = document.URL;
    a=document.list.ars.options[document.list.ars.selectedIndex].value;
    f=document.list.tfs.options[document.list.tfs.selectedIndex].value;
    t=document.list.tts.options[document.list.tts.selectedIndex].value;

        strF = document.list.tfs.options[document.list.tfs.selectedIndex].text.replace("坪","");
        strT = document.list.tts.options[document.list.tts.selectedIndex].text.replace("坪","");

    if(parseInt(strF) >= parseInt(strT)){f=8;}
    if(a!=''){
        s=a + '/';
    }else{s='';}
    
    if(o==0 && f==8 && t==0){
        u='/' + document.list.bases.value + '/';
    } else {
        u='/' + document.list.bases.value + '/' + '1_' + o + '_' + f + '_' + t + '/';
    }
    
    window.location.href=u;
}
function chgPage(p) {
a=document.list.ars.options[document.list.ars.selectedIndex].value;
f=document.list.tfs.options[document.list.tfs.selectedIndex].value;
t=document.list.tts.options[document.list.tts.selectedIndex].value;
o=document.list.so.value;
if(f>=t && t>0){f=0;}
if(a!=''){
	s=a + '/';
}else{s='';}
if(p==1 && o==0 && f==0 && t==0){u='/' + document.list.bases.value + '/' + s;}
else                            {u='/' + document.list.bases.value + '/' + s + p + '_' + o + '_' + f + '_' + t + '/';}
window.location.href=u;
}

function goto_w() {
f=document.list.tfs.options[document.list.tfs.selectedIndex].value;
t=document.list.tts.options[document.list.tts.selectedIndex].value;
if(f>=t && t>0){f=0;}

if(f==0 && t==0){u='/tokyo-office/' + document.list.wd.value;}
else            {u='/tokyo-office/' + document.list.wd.value + '/1_0_' + f + '_' + t + '/';}
window.location.href=u;
}
function chgSort_w(o) {
f=document.list.tfs.options[document.list.tfs.selectedIndex].value;
t=document.list.tts.options[document.list.tts.selectedIndex].value;
if(f>=t && t>0){f=0;}
if(o==0 && f==0 && t==0){u='/tokyo-office/' + document.list.wd.value;}
else                    {u='/tokyo-office/' + document.list.wd.value + '/1_' + o + '_' + f + '_' + t + '/';}
window.location.href=u;
}

function chgPage_w(p) {
f=document.list.tfs.options[document.list.tfs.selectedIndex].value;
t=document.list.tts.options[document.list.tts.selectedIndex].value;
o=document.list.so.value;
if(f>=t && t>0){f=0;}
if(p==1 && o==0 && f==0 && t==0){u='/tokyo-office/' + document.list.wd.value;}
else                            {u='/tokyo-office/' + document.list.wd.value + '/' + p + '_' + o + '_' + f + '_' + t + '/';}
window.location.href=u;
}

function ListAdd(){
 if(!navigator.cookieEnabled){
   alert('候補リストに追加するにはクッキーの使用を許可してください。');
   return;
 }
 c=0;
 CookieWrite('t',1,20);
 c=CookieRead('t');
 if(c==0){
   alert('クッキーの使用を許可（プライバシー設定を「既定」か「中-高」）してください。');
   return;
 }
 lst='';
 cnt=0;
 for(var i=0; i<document.list.elements['bkn[]'].length; i++){
  if (document.list.elements['bkn[]'][i].checked){
   if(lst!=''){lst+='%00';}
   lst += document.list.elements['bkn[]'][i].value; 
   cnt++;
  }
 }
 // if(cnt==0){alert('NO DATA'); return;}
 bknstr=CookieRead('bk');
 if(bknstr!=''){bknstr+='%00';}
 bknstr+=lst;
 CookieWrite('bk',bknstr,20);
 for(var i=0; i<document.list.elements['bkn[]'].length; i++){
  if(document.list.elements['bkn[]'][i].checked ){document.list.elements['bkn[]'][i].checked=false;}}
 if(cnt>0){alert(cnt + '件の物件を検討リストに追加しました。');}
}

function ListAddOne(b){
 if(!navigator.cookieEnabled){
   alert('候補リストに追加するにはクッキーの使用を許可してください。');
   return;
 }
 c=0;
 CookieWrite('t',1,20);
 c=CookieRead('t');
 if(c==0){
   alert('クッキーの使用を許可（プライバシー設定を「既定」か「中-高」）してください。');
   return;
 }
 if(b!=''){
	 bknstr=CookieRead('bk');
	 if(bknstr!=''){bknstr+='%00';}
	 bknstr+=b;
	 CookieWrite('bk',bknstr,20);
	 alert('1件の物件を候補リストに追加しました。');
 }
}
function ListDeleteOne(b){
 if(!navigator.cookieEnabled){
   alert('候補リストに追加するにはクッキーの使用を許可してください。');
   return;
 }
 c=0;
 CookieWrite('t',1,20);
 c=CookieRead('t');
 if(c==0){
   alert('クッキーの使用を許可（プライバシー設定を「既定」か「中-高」）してください。');
   return;
 }
 lst='';
 cnt=0;
 bknstr=CookieRead('bk');
 bknlst=bknstr.split('%00');
 for(i=0; i<bknlst.length; i++){
  if(bknlst[i]!=b){
   if(lst!=''){lst+='%00';}
   lst+=bknlst[i];
  }
 }
 CookieWrite('bk',lst,20);
 document.frm.action='/kentolist.php';
 document.frm.submit();
}


function CookieRead(kword){
  kword=kword + '=';
  kdata='';
  scookie=document.cookie + ';';
  start=scookie.indexOf(kword);
  if(start != -1){
    end = scookie.indexOf(';', start);
    kdata = unescape(scookie.substring(start + kword.length, end));
  }
  return kdata;
}
function CookieWrite(kword, kdata, kday){
  sday = new Date();
  sday.setTime(sday.getTime() + (kday * 1000 * 60 * 60 * 24));
  s2day = sday.toGMTString();
  document.cookie = kword + '=' + escape(kdata) + '; domain=towers-p.co.jp; path=/; expires=' + s2day;
}
function ReadCookie(nm){
 alert(CookieRead(nm));
}
function DeleteCookie(nm){
  document.cookie = nm + '=;expires=Thu,01-Jan-70 00:00:01 GMT';
}
function seikyu(){
	document.method='post';
	document.list.action='/seikyu.php';
	document.list.submit();
}
function seikyuOne(b){
	document.list.buken.value=b;
	document.method='post';
	document.list.action='/seikyu.php';
	document.list.submit();
}
function SendForm(){
	if(document.entry.kaisha.value==''){alert('貴社名を入力してください。'); return false;}
	if(document.entry.tanto.value==''){alert('ご担当者名を入力してください。'); return false;}
	if(document.entry.tel.value==''){alert('電話番号を入力してください。'); return false;}
	if(document.entry.mail.value==''){alert('メールアドレスを入力してください。'); return false;}
	document.entry.action='/formsend.php';
	document.entry.submit();
}
function SendFormList(){
	if(document.entry.kaisha.value==''){alert('貴社名を入力してください。'); return false;}
	if(document.entry.tanto.value==''){alert('ご担当者名を入力してください。'); return false;}
	if(document.entry.pref.options[document.entry.pref.selectedIndex].value==''){alert('都道府県を入力してください。'); return false;}
	if(document.entry.adr.value==''){alert('住所を入力してください。'); return false;}
	if(document.entry.mail.value==''){alert('メールアドレスを入力してください。'); return false;}
	if(document.entry.tel1.value=='' || document.entry.tel2.value=='' || document.entry.tel3.value==''){alert('電話番号を入力してください。'); return false;}
	if(document.entry.nairan.checked==true || document.entry.shiryo.checked==true || document.entry.hiyo.checked==true || document.entry.plan.checked==true || document.entry.sodan.checked==true || document.entry.teian.checked==true){
		document.entry.action='/formsend.php';
		document.entry.submit();
	} else {alert('お問い合わせ区分を入力してください。'); return false;}
}
function SendFormOwner(){
	if(document.entry.kaisha.value==''){alert('貴社名を入力してください。'); return false;}
	if(document.entry.tanto.value==''){alert('ご担当者名を入力してください。'); return false;}
	if(document.entry.adr.value==''){alert('住所を入力してください。'); return false;}
	if(document.entry.tel.value==''){alert('電話番号を入力してください。'); return false;}
	if(document.entry.mail.value==''){alert('メールアドレスを入力してください。'); return false;}
	if(document.entry.tenant.checked==true || document.entry.keisai.checked==true || document.entry.chiryo.checked==true || document.entry.maint.checked==true || document.entry.kaifuku.checked==true || document.entry.kanri.checked==true || document.entry.sonota.checked==true){
		document.entry.action='/formsend.php';
		document.entry.submit();
	} else {alert('お問い合わせの内容を入力してください。'); return false;}
}

function SendFormDesign(){
	document.entry.cm.value='INQUIRE';
	document.entry.action='/office-design/';
	document.entry.submit();
}
function SendFormDesignNext(){
	if(document.entry.kaisha.value==''){alert('貴社名を入力してください。'); return false;}
	if(document.entry.tanto.value==''){alert('ご担当者名を入力してください。'); return false;}
	if(document.entry.adr.value==''){alert('ご住所を入力してください。'); return false;}
	if(document.entry.tel.value==''){alert('電話番号を入力してください。'); return false;}
	if(document.entry.mail.value==''){alert('メールアドレスを入力してください。'); return false;}
	document.entry.action='/formsend.php';
	document.entry.submit();
}

function showGoogleEarth(url) {
	window.open(url);
}

//-->
