//標準サイズ cometalkConfig.entranceWidth cometalkConfig.entranceHeight
/*@cc_on 
var doc = document;
eval('var document = doc');
@*/



var cometalk_importFileUrlRoot = "http://chat.cometalk.jp";
var cometalk_ent_width = '160px';
var cometalk_ent_height = '280px';
var cometalk_ent_div ='';

	//既にある場合はそっちも
	if(document.getElementById("jp.cometalk.cometalkEntrance") == null){
		//alert("入り口作成");
		cometalk_ent_div ='<div id="jp.cometalk.cometalkEntrance"></div>';
	}

var cometalk_isOtherBrowsr = false;
var cometalk_default_theme = 'mac_os_x';

if(typeof cometalkConfig == "undefined"){
	cometalkConfig = new Object();
}

	//さらにrefもパラメータに追加
	cometalkConfig.ref = document.URL;

	//Rooyパス
	if(typeof cometalkConfig.importFileUrlRoot != 'undefined'){
		cometalk_importFileUrlRoot = cometalkConfig.importFileUrlRoot;
	}


	//別ブラウザの場合（デフォルト別ブラウザなので、定義なしあるいはon）
	if (typeof cometalkConfig.otherBrowser == "undefined"){
		cometalkConfig.otherBrowser = 'on';
	}

	//幅
	if(typeof cometalkConfig.entranceWidth != 'undefined'){
		cometalk_ent_width = cometalkConfig.entranceWidth;
	}
	//高さ
	if(typeof cometalkConfig.entranceHeight != 'undefined'){
		cometalk_ent_height = cometalkConfig.entranceHeight;
	}
	//ブログパーツを設置するか否か
	if( (typeof cometalkConfig.entranceEnabled != 'undefined')
	&&(cometalkConfig.entranceEnabled == 'false')){
		cometalk_ent_div="";
	}
	//テーマ切り替え
	if(typeof cometalkConfig.windowTheme != 'undefined'){
		cometalk_default_theme = cometalkConfig.windowTheme;
	}	

	//別ブラウザの場合import追加
	//alert(cometalkConfig.otherBrowser);
	if(cometalkConfig.otherBrowser == 'off'){
		//alert("off");
		cometalk_ent_div += '<script src="'+cometalk_importFileUrlRoot+'/cometalk/lib/prototype-window/effects.js" type="text/javascript"></script>'
	+ '<script src="'+cometalk_importFileUrlRoot+'/cometalk/lib/prototype-window/window.js" type="text/javascript"></script>'
	+ '<script src="'+cometalk_importFileUrlRoot+'/cometalk/lib/prototype-window/debug.js" type="text/javascript"></script>'
	+ '<link rel="stylesheet" type="text/css" href="'+cometalk_importFileUrlRoot+'/cometalk/themes/default.css"></link>'
	+ '<link href="'+cometalk_importFileUrlRoot+'/cometalk/themes/'+cometalk_default_theme+'.css" rel="stylesheet" type="text/css"></link>'
	+ '<script src="'+cometalk_importFileUrlRoot+'/cometalk/lib/prototype-window/cookiemanager.js" type="text/javascript"></script>'
	+ '<script src="'+cometalk_importFileUrlRoot+'/cometalk/lib/prototype-window/window_effects.js" type="text/javascript"></script>';

	}

//出力
document.write(
'<div style="width:'+cometalk_ent_width+';height:'+cometalk_ent_height+'"><script src="'+cometalk_importFileUrlRoot+'/cometalk/lib/prototype-window/prototype.js" type="text/javascript"></script>'
+ '<script src="'+cometalk_importFileUrlRoot+'/cometalk/lib/swfJs/AC_OETags.js" type="text/javascript"></script>'
+ cometalk_ent_div
+ '<script defer="defer" charset="UTF-8" src="'+cometalk_importFileUrlRoot+'/cometalk/script/cometalkAPI.js" type="text/javascript"></script></div>'
);




