/* General Scripts For All Devices. Don't Use jQuery. */


/* iPhone or iPod Touch Detector */
function is_iphone() { // return the result as boolean
	// return RegExp(" AppleWebKit/").test(navigator.userAgent) && RegExp(" Mobile/").test(navigator.userAgent);
	return RegExp(" AppleWebKit/").test(navigator.userAgent) && RegExp(" Mobile/").test(navigator.userAgent) && !RegExp("iPad").test(navigator.userAgent);
}


/* Search Form */
function replacemultibytespace(inputelementid) {
	var inputelement = document.getElementById(inputelementid); //引数のIDを持つ要素を代入
	inputelement.value = inputelement.value.replace("　", " "); //全角スペースを半角スペースに置換
	return true;
}

/* Excerpt */

function clickExcerpt(url){
	window.location.href=url;
}


function jumpto(url){
	window.location.href=url;
}

function changeClassName(objId, newName) {
	document.getElementById(objId).className = newName;
}


















/* Setting Up the Open-Contact Button */
function setOpenContact() {
	if(document.getElementById('opencontact')) {
		var theOpenContact = document.getElementById('opencontact');
		theOpenContact.href='javascript:void(0);';
		theOpenContact.onclick=function(){openContact()};
		theOpenContact.innerHTML='問い合わせフォームを開く';
	}
}









