	var opa = 0;
	var moX = 0;
	var moY = 0;
	var allDIV = 0 ;
	document.onmousemove = posmove;	
	function posmove(movings)
	{
		if(!movings)
			{
				movings = window.event;
			}
		moX = movings.clientX;
		moY = movings.clientY;
		browsers_type = window.navigator.appName;
		if(browsers_type=='Microsoft Internet Explorer')
		{
			koe = 'IE';
		}
		else if(browsers_type == 'Netscape')
		{
			koe = 'FF';
		}
	}
	function make_info_div(info_id,showme)
	{
		allDIV = allDIV + 1;
		idToMake = 'infodivs_'+(allDIV);
		nakoeID = document.getElementById(info_id.id);
		nDiv = document.createElement('div');
		nDiv.id = idToMake;
		nDiv.style.border="solid black 1px";
		nDiv.style.background="#808080";
		nDiv.style.position="absolute";
		opa = 10;
		pLeft = nakoeID.offsetLeft;
		pTop  = nakoeID.offsetTop;
		cur_id  = nakoeID;
		if(koe=='FF')
		{
			while(cur_id = cur_id.parentNode)
			{
				if(cur_id == document.getElementsByTagName('body')[0])
				{	
					break;
				}
				else
				{
					if(cur_id.parentNode.offsetLeft>0)
					{
						kolko_da = (cur_id.parentNode.offsetLeft - cur_id.offsetLeft);
						pLeft = pLeft + kolko_da;
					}
					else
					{
						pLeft = pLeft;
					}
					//document.getElementById('shows').value = cur_id.offsetParent.offsetLeft;
					if(cur_id.parentNode.offsetTop>0)
					{
						kolko_da = ( cur_id.offsetTop - cur_id.parentNode.offsetTop);
						pTop  = pTop  + cur_id.parentNode.offsetTop;
					}
					else
					{
						pTop = pTop;
					}
					document.getElementById('shows').value = cur_id.parentNode.offsetTop;
					if(cur_id.parentNode.offsetTop<=0 && cur_id.parentNode.offsetLeft <=0)
					{
						break;
					}
					else
					{
						cur_id = cur_id.parentNode;
						continue;
					}
				}
			}
		}
		else if(koe=='IE')
		{
			while(cur_id = cur_id.parentNode)
			{
				if(cur_id == document.getElementsByTagName('body')[0])
				{	
					break;
				}
				else
				{
					if(cur_id.offsetParent.offsetLeft>0)
					{
						kolko_da = ( cur_id.offsetParent.offsetLeft - cur_id.offsetLeft);
						pLeft = (pLeft + cur_id.offsetParent.offsetLeft + cur_id.offsetLeft);
						document.getElementById('shows').value = cur_id.offsetParent.offsetLeft + '  -  ' + cur_id.offsetLeft + ' - ' + kolko_da;
					}
					else
					{
						pLeft = pLeft;
					}
					//document.getElementById('shows').value = cur_id.offsetParent.offsetLeft;
					if(cur_id.offsetParent.offsetTop>0)
					{
						kolko_da = ( cur_id.offsetParent.offsetTop - cur_id.offsetTop);
						pTop  = pTop  + cur_id.offsetParent.offsetTop;
					}
					else
					{
						pTop = pTop;
					}
					if(cur_id.offsetParent.offsetTop<=0 && cur_id.offsetParent.offsetLeft <=0)
					{	
						break;
					}
					else
					{
						cur_id = cur_id.offsetParent;
						continue;
					}
				}
			}
		}
		nDiv.style.left = ((pLeft+15)+'px');
		nDiv.style.top = ((pTop+15)+'px');
		nDiv.width="10px";//fade_do_hide
		texts = '';
		texts += '<button onclick=fade_do_hide("'+idToMake+'",10); style="width:16px;height:16px;" align="rigth">x</button>';
		texts += showme;
		nDiv.innerHTML = texts;
		document.body.appendChild(nDiv);
	}
	function fade_do_hide(koeidda,stat)
	{
		killThisID = document.getElementById(koeidda);
		browsers = window.navigator.appName;
		if(stat>0)
		{
			if(browsers.match('Netscape'))
			{
				
				stat = (stat - 0.3);
			}
			else if(browsers.match('Microsoft Internet Explorer'))
			{	
				stat = (stat - 0.3);
			}
			killThisID.style.opacity=(stat/10);
			killThisID.style.filter = 'alpha(opacity='+(stat*10)+')';
			setTimeout("fade_do_hide('"+koeidda+"',"+stat+")",1);
		}
		else
		{
			opa = 0;
			if(allDIV > 0 )
			{
				allDIV = (allDIV-1);
			}
			else
			{
				allDIV = 0 ;
			}
			cl_now = '';
			killThisID.parentNode.removeChild(killThisID);
		}
	}
function change_btn($id,$this)
{
	$cur_btn = document.getElementById($id);
	$cur_btn.src=$this;
}
function pre_star()
{
	$n1 = new Image();
	$n2 = new Image();
	$n1.src = '{$IMGPATH}star.png';
	$n2.src = '{$IMGPATH}no_star.png';
}
window.onload = pre_star;
function delete_picture($pic_id,$hide_id)
{
	$.get($webpath+"ajax/delete_pic.php",{ pic_id : $pic_id},function(data){});
	$("#"+$hide_id).hide();
}