var picnum=0;

function imgPopup(url,x,y)
{
	window.open(url,'popup', 'scrollbars=no,status=no,resizable=0,width='+x+',height='+y);
}

function ahide(acc,serv) { return acc+"@"+serv; }

function email(acc,serv,text) 
{
	if (text=='') text=ahide(acc,serv);
	document.write('<span class="email" onclick="window.open('+"'mailto:"+ahide(acc,serv)+"'"+')" style="" onmouseover="window.status='+"'Отправить письмо'"+'" onmouseout="window.status='+"''"+'">'+text+'</span>');
}

function image(surl,lurl,width,height,alt,caption,author,style,cls)
{
	if (width=='') width=620;
	if (height=='') height=620;
	if (alt=='') alt='Увеличить изображение';
	if (cls=='') cls="image";
	cls=' class="'+cls+'"';
	var bottom='';
	if (author!='') bottom='<div style="text-align: right; font-size: 10px; font-family: Arial">'+author+'</div>';
	if (caption!='') bottom=bottom+'<div style="text-align: center;">'+caption+'</div>';
	document.write('<div '+cls+' style="'+style+'"><a href="'+lurl+'" '+style+'" onClick="return hs.expand(this)"><div><img '+cls+' src="'+surl+'" alt="'+alt+'" /></div>'+bottom+'</a></div>');
}

function image3(surl,lurl,num)
{
	if (num=='') { picnum++; num=picnum; }
	document.write('<a href="'+lurl+'" onClick="return hs.expand(this)"><img src="'+surl+'" style="border: 1px solid rgb(255, 255, 255);" name="pic'+num+'" border="0" id="pic'+num+'" class="photo_"></a>');
}

function image_capt(surl,lurl,width,height,capt_width,alt,caption,author,style,cls)
{
	if (capt_width=='') capt_width='inherit';
	if (width=='') width=620;
	if (height=='') height=620;
	if (alt=='') alt='Увеличить изображение';
	if (cls=='') cls="image";
	cls=' class="'+cls+'"';
	var bottom='';
	if (author!='') bottom='<div style="text-align: right; font-size: 80%; font-family: Arial">'+author+'</div>';
	if (caption!='') bottom=bottom+'<div style="text-align: center; font-size: 90%;">'+caption+'</div>';
	document.write('<div'+cls+' style="width: '+capt_width+'; '+style+'"><div onclick="imgPopup('+"'"+lurl+"',"+width+','+height+')" style="cursor:hand;"><img src="'+surl+'" alt="'+alt+'" /></div>'+bottom+'</div>');
}

function ShowHide(itemid) 
{ 
	if (itemid.style.display!='none') itemid.style.display='none'; 
	else itemid.style.display='block'; 
}
