//****************************************************************************************//
//
//        汎用読み込みJavaScript
//
//****************************************************************************************//

//****************************************************************************************//
//
//                  怨ロード（左右の高さ調整等）
//
//****************************************************************************************//
var fontSize;
window.onload = function(){
	fontSize=85;
	
	var left  = document.getElementById('left_contents');
	var right = document.getElementById('right_contents');
	if(left && right){
		if(left.clientHeight<right.clientHeight){
			var chose = document.getElementById('chose');
			if(chose){
				chose.style.height = (right.clientHeight - left.clientHeight + 45) + 'px';
			}
		}
	}
}

//****************************************************************************************//
//
//                  フォントサイズ変更（大）
//
//****************************************************************************************//
function font_l(){
	obj = document.body;
	big_img = document.getElementById('font_big');
	small_img = document.getElementById('font_small');
	switch(fontSize){
		case 63:
			obj.style.fontSize = '75%';
			fontSize = 75;
			break;
		case 75:
			obj.style.fontSize = '85%';
			small_img.src = './img/right/bt_small_t.gif';
			big_img.src = './img/right/bt_large_t.gif';
			fontSize = 85;
			break;
		case 85:
			obj.style.fontSize = '100%';
			big_img.src = './img/right/bt_large02_t.gif';
			fontSize = 100;
			break;
		case 100:
			obj.style.fontSize = '113%';
			fontSize = 113;
			break;
		case 113:
			//window.alert('これ以上大きく出来ません！！');
			break;
	}
}

//****************************************************************************************//
//
//                  フォントサイズ変更（小）
//
//****************************************************************************************//
function font_s(){
	obj = document.body;
	big_img = document.getElementById('font_big');
	small_img = document.getElementById('font_small');
	switch(fontSize){
		case 63:
			//window.alert('これ以上小さく出来ません！！');
			break;
		case 75:
			obj.style.fontSize = '63%';
			fontSize = 63;
			break;
		case 85:
			obj.style.fontSize = '75%';
			small_img.src = './img/right/bt_small02_t.gif';
			fontSize = 75;
			break;
		case 100:
			obj.style.fontSize = '85%';
			small_img.src = './img/right/bt_small_t.gif';
			big_img.src = './img/right/bt_large_t.gif';
			fontSize = 85;
			break;
		case 113:
			obj.style.fontSize = '100%';
			fontSize = 100;
			break;
	}
}

//*******************************************************************//
//
//                  別ウィンドウでＵＲＬを開く
//
//*******************************************************************//
function OpenWin(url, name, width, height){
	var options = null;
	if(width !=0 && height != 0){
		options = "width=" + width + ",height=" + height;
	}
	return window.open(url,name,options + 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes')
}

//*******************************************************************//
//
//                  バナークリック回数カウント
//
//*******************************************************************//
function ClickBanner(id)
{
	//document.write('<script type="text/javascript" src="./src/function/bn_count.php?id='+id+'"></script>');
	var url = "./src/function/bn_count.php";
	var paramList = "id=" + id;

	new Ajax.Request(url,
	{
		method: 'get',
		onSuccess: getData,
		onFailure: showErrMsg,
		parameters: paramList
	});
	
	function getData(data){
	}
	
	function showErrMsg(){
	}
	
	return true;
}

//*******************************************************************//
//
//                  プレゼントクリックカウント
//
//*******************************************************************//
function ClickPrezentpre(id)
{
	//document.write('<script type="text/javascript" src="./src/function/bn_count_pre.php?id='+id+'"></script>');
	var url = "./src/function/bn_count_pre.php";
	var paramList = "id=" + id;

	new Ajax.Request(url,
	{
		method: 'get',
		onSuccess: getData,
		onFailure: showErrMsg,
		parameters: paramList
	});
	
	function getData(data){
	}
	
	function showErrMsg(){
	}
	
	return true;
}

//*******************************************************************//
//
//                  プレゼントクリックカウント
//
//*******************************************************************//
function ClickPrezent(id)
{
	//document.write('<script type="text/javascript" src="./src/function/bn_count_pre.php?id='+id+'"></script>');
	var url = "./../src/function/bn_count_pre.php";
	var paramList = "id=" + id;

	new Ajax.Request(url,
	{
		method: 'get',
		onSuccess: getData,
		onFailure: showErrMsg,
		parameters: paramList
	});
	
	function getData(data){
	}
	
	function showErrMsg(){
	}
	
	return true;
}
