function sobaka(str, length, str2)
{
    var p3 = '<'+'a h'+'ref'+'="m'+'ai'+'lt'+'o:';	
    var p1 = str.substr(0, length);
    var p2 = str.substr(length);
    if (str2 != '')
{
window.document.write(p3+p1+'&#'+'6'+'4;'+p2+'&#'+'46;&#'+'114;&#1'+'17;">'+str2 +'<'+'/'+'a'+'>');
}
else
{
window.document.write(p3+p1+'&#6'+'4;'+p2+'&#4'+'6;&'+'#11'+'4;&'+'#'+'117;">'+p1+'&#64;'+p2+'&#46;&'+'#11'+'4;&#1'+'17;<'+'/'+'a>');
}
    window.document.close();
}

function openWindow(url, width, height, title) {
	var feat = 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width='+width+',height='+height+',top=100, left=150';
	var pg = '<html><title>'+title+'</title><body style="margin:0" align=""><img src="'+url+'" align="middle" onClick="window.close();"></body></html>';
 	opinion = window.open('', "PopupWindowImg", feat);
	opinion.document.open()
	opinion.document.write(pg);
	opinion.document.close()
	opinion.focus();
}