// JavaScript Document

function ShowBalloon(evt,num)
{
	
	Element.show('BackNumberBalloon');
	
	objX = bytefx.$position($('BKimg' + num)).x;
	objY = bytefx.$position($('BKimg' + num)).y;
	
	var url = '/asset_beauty/pickbeauty.ej';
	var pars = 'issue=' + num;
	
	new Ajax.Request(
	url, 
	{
		method: 'post', 
		parameters: pars, 
		onComplete:function(httpObj){
		$('BalloonBody').innerHTML = httpObj.responseText;
		}
	});
	
	t = $('BeautyBKScroll').scrollLeft;

	x = Element.getHeight('BalloonBody') + 20;

	$('BackNumberBalloon').style.left = (objX + 35 - t) + "px";
	$('BackNumberBalloon').style.top = (objY - x) + "px";
	
	
}

function HideBalloon()
{
	Element.hide('BackNumberBalloon');
}

/*
Balloon for Items
*/

function ShowItemBalloon(evt,num)
{
	
	Element.show('ItemBalloon');
	
	objX = bytefx.$position($('ItemImg' + num)).x;
	objY = bytefx.$position($('ItemImg' + num)).y;
	
	var url = '/asset_beauty/pickitem.ej';
	var pars = 'issue=' + num;

	new Ajax.Request(
	url, 
	{
		method: 'post', 
		parameters: pars, 
		onComplete:function(httpObj){
		$('ItemBalloonBody').innerHTML = httpObj.responseText;
		}
	});
	
	x = 200//Element.getHeight('ItemBalloonBody') + 10;

	$('ItemBalloon').style.left = (objX + 100) + "px";
	$('ItemBalloon').style.top = (objY - x) + "px";
	
	
}

function HideItemBalloon()
{
	Element.hide('ItemBalloon');
}