document.observe("dom:loaded", initialize, false); var loaded = false; function initialize() { SWFAddress.addEventListener(SWFAddressEvent.CHANGE, controller); loaded = true; } var readdep =false; function controller(event) { var homenG = SWFAddress.getParameter('homenG'); var homen = SWFAddress.getParameter('homen'); var city = SWFAddress.getParameter('city'); var year = SWFAddress.getParameter('year'); var tyear = SWFAddress.getParameter('tyear'); var dep = SWFAddress.getParameter('dep'); var htl = SWFAddress.getParameter('hotel'); var mokuteki = SWFAddress.getParameter('theme'); var keyword1 = SWFAddress.getParameter('keyword1'); var keyword2 = SWFAddress.getParameter('keyword2'); var carrier = SWFAddress.getParameter('carrier'); var termfrom = SWFAddress.getParameter('termFrom'); var termto = SWFAddress.getParameter('termTo'); var pricefrom = SWFAddress.getParameter('priceFrom'); var priceto = SWFAddress.getParameter('priceTo'); var p = SWFAddress.getParameter('p'); var nenyu = SWFAddress.getParameter('nenyu'); var online = SWFAddress.getParameter('online'); var page = SWFAddress.getParameter('page'); var count = SWFAddress.getParameter('count'); var sort = SWFAddress.getParameter('sort'); var sw = SWFAddress.getParameter('sw'); var moveto = SWFAddress.getParameter('moveto'); if ( $(moveto) ){ Element.scrollTo(moveto); } if( loaded ){ sw = ""; loaded = false; } var only = SWFAddress.getParameter('only'); var multicity = SWFAddress.getParameter('multicity'); var matching = SWFAddress.getParameter('matching'); var branch_cd = SWFAddress.getParameter('branch_cd'); var brand_cd = SWFAddress.getParameter('brand_cd'); var gid = SWFAddress.getParameter('gid'); if ( nenyu ){ document.STSRC.nenyu.checked = true; }else{ document.STSRC.nenyu.checked = false; } if ( !multicity ){ document.STSRC.homenG.value = homenG; document.STSRC.homen.value = homen; document.STSRC.city.value = city; if ( year ){ document.STSRC.dyear.value = year.substring(0,4); document.STSRC.dmonth.value = year.substring(4,6); chg_day(); document.STSRC.dday.value = year.substring(6,8); } if ( tyear ){ document.STSRC.tyear.value = tyear.substring(0,4); document.STSRC.tmonth.value = tyear.substring(4,6); document.STSRC.tday.value = tyear.substring(6,8); } }else{ var homenGarr = homenG.split(","); var homenarr = homen.split(","); var cityarr = city.split(","); document.STSRC.homenG.value = ''; document.STSRC.homen.value = ''; document.STSRC.city.value = ''; document.STSRC.homenG1.value = homenGarr[0]; document.STSRC.homen1.value = homenarr[0]; document.STSRC.city1.value = cityarr[0]; document.STSRC.homenG2.value = homenGarr[1]; document.STSRC.homen2.value = homenarr[1]; document.STSRC.city2.value = cityarr[1]; document.STSRC.homenG3.value = homenGarr[2]; document.STSRC.homen3.value = homenarr[2]; document.STSRC.city3.value = cityarr[2]; document.STSRC.multi.value = multicity; document.STSRC.multicity.value = multicity; if ( year ){ document.STSRC.m_dyear.value = year.substring(0,4); document.STSRC.m_dmonth.value = year.substring(4,6); document.STSRC.m_dday.value = year.substring(6,8); } } document.STSRC.dep.value = dep; document.STSRC.htl.value = htl; document.STSRC.theme.value = mokuteki; document.STSRC.keyword1.value = keyword1; document.STSRC.keyword2.value = keyword2; document.STSRC.carrier.value = carrier; document.STSRC.termFrom.value = termfrom; document.STSRC.termTo.value = termto; document.STSRC.priceFrom.value = pricefrom; document.STSRC.priceTo.value = priceto; document.STSRC.p.value = p; document.STSRC.nenyu.value = nenyu; if ( nenyu == 1){ //$('nenyuchg').className = 'btn_nennyu betu'; }else{ //$('nenyuchg').className = 'btn_nennyu'; } document.STSRC.online.value = online; if ( online == 1 ){ $('onlinechg').className = 'btn_online betu'; }else{ $('onlinechg').className = 'btn_online'; } document.STSRC.keyword.value = decodeURI(p); document.STSRC.page.value = page; document.STSRC.count.value = count; document.STSRC.sort.value = sort; document.STSRC.sw.value = sw; document.STSRC.only.value = only; document.STSRC.matching.value = matching; document.STSRC.branch_cd.value = branch_cd; document.STSRC.brand_cd.value = brand_cd; document.STSRC.gid.value = gid; dsw = document.STSRC.sw.value; if ( ( dsw != 'paging' && dsw != 'sort' && dsw !='nenyu' ) ){ //readdep = false; } call_data(homenG,homen,city,year,dep,htl,mokuteki,keyword1,keyword2,carrier,termfrom,termto,pricefrom,priceto,p,nenyu,page,count,sort,sw,only,multicity,matching,brand_cd,gid,branch_cd,online,'list'); if ( ( dsw != 'hotel' && dsw != 'paging' && dsw != 'sort' && dsw !='nenyu' ) || !readdep ){ call_data(homenG,homen,city,year,dep,htl,mokuteki,keyword1,keyword2,carrier,termfrom,termto,pricefrom,priceto,p,nenyu,page,count,sort,sw,only,multicity,matching,brand_cd,gid,branch_cd,online,'hotel'); } if ( ( dsw != 'dep' && dsw != 'paging' && dsw != 'sort' && dsw !='nenyu' ) || !readdep ){ call_data(homenG,homen,city,year,dep,htl,mokuteki,keyword1,keyword2,carrier,termfrom,termto,pricefrom,priceto,p,nenyu,page,count,sort,sw,only,multicity,matching,brand_cd,gid,branch_cd,online,'dep'); readdep = true; } if ( ( dsw != 'mokuteki' && dsw != 'paging' && dsw != 'sort' && dsw !='nenyu' ) || !readdep ){ call_data(homenG,homen,city,year,dep,htl,mokuteki,keyword1,keyword2,carrier,termfrom,termto,pricefrom,priceto,p,nenyu,page,count,sort,sw,only,multicity,matching,brand_cd,gid,branch_cd,online,'mokuteki'); } if ( ( dsw != 'keyword1' && dsw != 'paging' && dsw != 'sort' && dsw !='nenyu' ) || !readdep ){ call_data(homenG,homen,city,year,dep,htl,mokuteki,keyword1,keyword2,carrier,termfrom,termto,pricefrom,priceto,p,nenyu,page,count,sort,sw,only,multicity,matching,brand_cd,gid,branch_cd,online,'keyword1'); } if ( ( dsw != 'keyword2' && dsw != 'paging' && dsw != 'sort' && dsw !='nenyu' ) || !readdep ){ call_data(homenG,homen,city,year,dep,htl,mokuteki,keyword1,keyword2,carrier,termfrom,termto,pricefrom,priceto,p,nenyu,page,count,sort,sw,only,multicity,matching,brand_cd,gid,branch_cd,online,'keyword2'); } if ( ( dsw != 'carrier' && dsw != 'paging' && dsw != 'sort' && dsw !='nenyu') || matching || !readdep ){ call_data(homenG,homen,city,year,dep,htl,mokuteki,keyword1,keyword2,carrier,termfrom,termto,pricefrom,priceto,p,nenyu,page,count,sort,sw,only,multicity,matching,brand_cd,gid,branch_cd,online,'carrier'); } if ( ( dsw != 'term' && dsw != 'paging' && dsw != 'sort' && dsw !='nenyu' ) || !readdep ){ call_data(homenG,homen,city,year,dep,htl,mokuteki,keyword1,keyword2,carrier,termfrom,termto,pricefrom,priceto,p,nenyu,page,count,sort,sw,only,multicity,matching,brand_cd,gid,branch_cd,online,'term'); } if (( dsw != 'price' && dsw != 'paging' && dsw != 'sort') || !readdep ){ call_data(homenG,homen,city,year,dep,htl,mokuteki,keyword1,keyword2,carrier,termfrom,termto,pricefrom,priceto,p,nenyu,page,count,sort,sw,only,multicity,matching,brand_cd,gid,branch_cd,online,'price'); } if ( matching == 99 ){ create_matchingbox(); } if ( dsw != 'branch' && dsw != 'paging' && dsw != 'sort' && dsw !='nenyu' && matching == 99){ call_data(homenG,homen,city,year,dep,htl,mokuteki,keyword1,keyword2,carrier,termfrom,termto,pricefrom,priceto,p,nenyu,page,count,sort,sw,only,multicity,matching,brand_cd,gid,branch_cd,online,'branch'); } if ( dsw != 'brand' && dsw != 'paging' && dsw != 'sort' && dsw !='nenyu' && matching == 99){ call_data(homenG,homen,city,year,dep,htl,mokuteki,keyword1,keyword2,carrier,termfrom,termto,pricefrom,priceto,p,nenyu,page,count,sort,sw,only,multicity,matching,brand_cd,gid,branch_cd,online,'brand'); } } function setSWFAddress(param) { SWFAddress.setValue(param); } function tabon(elem,tabno){ if ( $ ){ var bodyobj = $(elem+'bdy'); var tab = elem+'tab'; var tabobj = $(tab); if (bodyobj){ if ( bodyobj.className == "bdy dnone"){ bodyobj.className = "bdy"; } if ( elem == "carrier" ){ $('depbdy').className="bdy dnone"; $('pricebdy').className="bdy dnone"; $('termbdy').className="bdy dnone"; } if ( elem == "dep" ){ $('carrierbdy').className="bdy dnone"; $('pricebdy').className="bdy dnone"; $('termbdy').className="bdy dnone"; } if ( elem == "price" ){ $('depbdy').className="bdy dnone"; $('carrierbdy').className="bdy dnone"; $('termbdy').className="bdy dnone"; } if ( elem == "term" ){ $('depbdy').className="bdy dnone"; $('carrierbdy').className="bdy dnone"; $('pricebdy').className="bdy dnone"; } } if (tabobj){ if ( tabobj.className == 'm'+tabno ){ tabobj.className = 'm'+tabno+' on'+tabno; } if ( elem == "carrier" ){ $('deptab').className="m01"; $('pricetab').className="m03"; $('termtab').className="m04"; } if ( elem == "dep" ){ $('carriertab').className="m02"; $('pricetab').className="m03"; $('termtab').className="m04"; } if ( elem == "price" ){ $('deptab').className="m01"; $('carriertab').className="m02"; $('termtab').className="m04"; } if ( elem == "term" ){ $('deptab').className="m01"; $('carriertab').className="m02"; $('pricetab').className="m03"; } } } } function chg_date(st){ if ( isMSIE ){ var r = document.evaluate('//tr[@class="tb_box"]',document,null,7,null); var tb_len = r.snapshotLength; }else{ var tb_len = document.getElementsByClassName("tb_box").length; } $('sliderpos').value = st; for ( t=1;t= st ){ classname = classname.replace(' dnone',''); $('tds'+t+'_'+i).className = classname; }else{ if ( classname.search(/ dnone/i) == -1 ){ $('tds'+t+'_'+i).className = classname +" dnone"; } } } } } function call_data(homenG,homen,city,year,dep,htl,mokuteki,keyword1,keyword2,carrier,termfrom,termto,pricefrom,priceto,p,nenyu,page,count,sort,sw,only,multicity,matching,brand_cd,gid,branch_cd,online,mode){ //Glayer.show(); var paramList = "homenG="+homenG+"&homen="+homen+"&city="+city+"&year="+year+"&dep="+dep+"&hotel="+htl+"&theme="+mokuteki+"&keyword1="+keyword1+"&keyword2="+keyword2+"&nenyu="+nenyu+"&carrier="+carrier+"&termFrom="+termfrom+"&termTo="+termto+"&priceFrom="+pricefrom+"&priceTo="+priceto+"&p="+p+"&page="+page+"&count="+count+"&sort="+sort+"&only="+only+"&multicity="+multicity+"&matching="+matching+"&brand_cd="+brand_cd+"&branch_cd="+branch_cd+"&online="+online+"&mode="+mode; connect(paramList,mode); //var urlobj = $('url'); //
内に表示させる //urlobj.innerHTML = 'xml'; } function showloading(elem){ busyctrl = getBusyOverlay($(elem), {opacity:0.5, color:"black", text:"loading"}); } function create_matchingbox(){ var matchingbox = $('matchingbox'); var matchbody = ''; matchbody = ''; matchbody += ''; matchbody += ''; matchbody += ''; matchbody += ''; matchbody += ''; matchbody += ''; matchbody += ''; matchbody += ''; matchbody += '
ブランドコード
'; matchbody += '
営業所コード
'; matchbody += '
'; matchingbox.innerHTML = matchbody; }