var cFlg = getCookie("visited");
if(opc == undefined){
	opc = 0;
}

function cmObj() {
	this.base_url = "/";
	this.middle_url = "";
	this.protocol = "";
};

cmObj.prototype.getSWF = function() {
	var swf = this.protocol + this.base_url + this.middle_url + 'shared/swf/cm.swf';
	return swf;
}

cmObj.prototype.getWidth = function() {
	return 820;
}

cmObj.prototype.getHeight = function() {
	return 620;
}

function setClass(target, cname) {
	if (document.all) {
		if (navigator.userAgent.indexOf("Opera") != -1) {
			target.setAttribute('class', cname);
		} else {
			target.setAttribute('className', cname);
		}
	} else {
		target.setAttribute('class', cname);
	}
}

function checkBrowser() {
	var userAgent = navigator.userAgent;
	
	if (navigator.userAgent.indexOf('Win',0) != -1 && navigator.appName == "Microsoft Internet Explorer") {
		return 'winIE';
	}
	if (userAgent.indexOf('Netscape') != -1) {
		return 'NN';	
	}
	if (userAgent.indexOf('Firefox') != -1) {
		return 'Firefox';
	}
	if (userAgent.indexOf('Safari') != -1) {
		return 'Safari';
	}

	return 'otherBrowser';
}

function doInsert() {
	document.write("<div id='kagomeswf'></div>");
	document.write('<script type="text/javascript" charset="utf-8" src="' + Kagome.protocol + Kagome.base_url + 'js/prototype.js"></script>');
	document.write('<script type="text/javascript" charset="utf-8" src="' + Kagome.protocol + Kagome.base_url + 'js/XYcoordinate.js"></script>');
	document.write('<script type="text/javascript" charset="utf-8" src="' + Kagome.protocol + Kagome.base_url + 'js/KagomeAddEvent.js"></script>');
	document.write('<script type="text/javascript" charset="utf-8" src="' + Kagome.protocol + Kagome.base_url + 'js/kagomebox.js"></script>');
}

var Kagome = new cmObj();
var browser = checkBrowser();
doInsert();
