/*window.onload = function()
{	
	
}*/

function U_profile_del_image(type)
{	
	
	AC.simple
	(
		'?LRPC=p4cardesign.profile.show&args={"del":"'+type+'"}', 'POST',
		function(txt)
		{
			jQuery('#profile_del_'+type).css('display', 'none');
			jQuery('#profile_upload_'+type).css('display', '');	
			jQuery('#profile_has_'+type).attr('value', 0);			
		}
	);
}

function input_img_display(sh, hd, field)
{
	if (jQuery('#has_'+field).attr('value') == 1)
	{
		jQuery('#upload_'+field).css('display', hd);
		jQuery('#del_'+field).css('display', sh);
	}
}

function input_img_value()
{
	if (jQuery('#upload_avatar').attr('value'))
	{
		jQuery('#has_avatar').attr('value', 1);
	}
	else
	{
		if(jQuery('#del_avatar').css('display') == 'none')
		{
			jQuery('#has_avatar').attr('value', 0);
		}	
	}
	
	if (jQuery('#upload_photo').attr('value'))
	{
		jQuery('#has_photo').attr('value', 1);
	}
	else
	{
		if(jQuery('#del_photo').css('display') == 'none')
		{
			jQuery('#has_photo').attr('value', 0);
		}
	}
}
