function countlink(groupID, countlinkID, targetURL) {
	try {
		var countlinkDomain = 'clink.nifty.com';
		var latestEvent;
		try {
			if(typeof window.event != 'undefined') {
				//IE,safari supplies a standard window.event object
				latestEvent = window.event;
			} else {
				var tmpEvent = arguments.callee.caller.arguments[0];
				if(typeof tmpEvent != 'undefined' && tmpEvent.constructor == MouseEvent){
					latestEvent = tmpEvent;
				}
			}
			if(typeof latestEvent != 'undefined' && latestEvent.type == 'mousedown'){
				var typeButton = latestEvent.button;
				if(typeButton != 1 && typeButton != 0){
					return true;
				}
			}
		} catch (e) {
			//
		}
		var countlinkURL = countlinkDomain + '/c/' + groupID + '/' + countlinkID + '/?' + targetURL;
		if (targetURL.indexOf('https://') == 0) {
			countlinkURL = 'https://' + countlinkURL;
		} else {
			countlinkURL = 'http://'  + countlinkURL;
		}
		var countScriptElement = document.createElement('script');
		countScriptElement.setAttribute('src', countlinkURL);
		countScriptElement.setAttribute('type', 'text/javascript');
		document.getElementsByTagName('head').item(0).appendChild(countScriptElement);
		if (arguments.length == 3 || arguments.length > 3 && arguments[3] != false) {
			if (navigator.userAgent.indexOf('AppleWebKit') > -1) {
				if (typeof latestEvent != 'undefined' && latestEvent.type == 'click') {
					window.location.href = targetURL;
					return false;
				}
			}
		}
	} catch (e) {
		//
	}
	return true;
};
