// プロトコル変換
var url = location.href;
keys = new Array();
keys[0] = 'login';
keys[1] = 'inquiry_form';
keys[2] = 'regist_form';
keys[3] = 'mail';
key = '/' + keys.join('|') + '/';

if ( url.match(/^http:\/\/.*ccs-inc.co.jp/) ) {
	if ( url.match(key) ) {
		url = url.replace("http:", "https:");
		location.replace(url);
	} else {
	}
} else if ( url.match(/^https:\/\/.*ccs-inc.co.jp/) )  {
	if ( url.match(key) ) {
	} else {
		url = url.replace("https:", "http:");
		location.replace(url);
	}
}

function smartRollover() {
	if(document.getElementsByTagName) {
		var images = document.getElementsByTagName("img");

		for(var i=0; i < images.length; i++) {
			if(images[i].getAttribute("src").match("_off."))
			{
				images[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on."));
				}
				images[i].onmouseout = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_on.", "_off."));
				}
			}
		}
	}
}

if(window.addEventListener) {
	window.addEventListener("load", smartRollover, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", smartRollover);
}
