function headerInfo (b) { var obj = document.getElementById("jshead"); var url = location.href; var locate = "http://www.hakoneropeway.co.jp"; var url_check = url.split("/"); if(url_check[0] == "https:"){ locate = "https://www.hakoneropeway.co.jp"; } if(url_check[3] == "testsite"){ locate += "/testsite"; } var str = ""; //bの有無でPC or SP if(b){ str += '
'; str += '

お知らせ

'; str += ''; str += '
'; }else{ str += '
'; str += '

お知らせ

'; str += ''; str += '
'; } obj.innerHTML = str; }