
function addClip() {
	var title, url, host, port;
	url = encodeURI(document.URL);
	title = encodeURI(document.title);
	host = location.host;
    host = host.replace(/:[0-9]+/, '');
	port = parseInt(location.port);

	if (!location.port || port == 80 || port == 443) {
		sslport = '';
	} else if (port == 10080 || port == 10443) {
		sslport = ':10443';
	} else if (port == 20080 || port == 20443) {
		sslport = ':20443';
	}

    var qurl = 'https://'
		+ host + sslport
		+ '/mypage/bookmark_input.php'
		+ '?title=' + title
		+ '&url=' + url
		+ '';

    location.href = qurl;
}

