var pic_large, pic_width, pic_height, caption_win;
function win_c(pic_large, pic_width, pic_height, caption_win)
{
pic_window=window.open('','pic_window', "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width="+pic_width+",height="+pic_height+",left=0,top=0");
pic_window.document.open();
pic_window.document.writeln('<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1251">');
pic_window.document.writeln('<title>' + caption_win + '</title></head><body bgcolor=ffffff topmargin=0 leftmargin=0 marginheight=0 marginwidth=0>');
pic_window.document.writeln('<a href="" onClick="self.close()"><img src=' + pic_large + ' border=0 alt="закрыть"></a>');
pic_window.document.writeln('</body></html>');
pic_window.document.close();
};

function enwin_c(pic_large, pic_width, pic_height, caption_win)
{
pic_window=window.open('','pic_window', "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width="+pic_width+",height="+pic_height+",left=0,top=0");
pic_window.document.open();
pic_window.document.writeln('<html><head>');
pic_window.document.writeln('<title>' + caption_win + '</title></head><body bgcolor=ffffff topmargin=0 leftmargin=0 marginheight=0 marginwidth=0>');
pic_window.document.writeln('<a href="" onClick="self.close()"><img src=' + pic_large + ' border=0 alt="close"></a>');
pic_window.document.writeln('</body></html>');
pic_window.document.close();
};



var subid=0;

function showAction(type,id,sid)
{var req = new Request.HTML({url:'vote/vote_script.php'+'?action='+type+'&id='+id+'&vid='+sid, onSuccess: function(html) {$('voteresult').set('text', '');$('voteresult').adopt(html);}, onFailure: function() {$('voteresult').set('text', 'The request failed.'+'vote/vote_script.php'+'?action='+type+'&id='+id);} });
req.send();
}
function selectionId(id){subid=id;}

function unlock()
{document.getElementById("voteOk").disabled=false;
}

function makeVote(id)
{showAction(2,id,subid);
}

///-----------------------------------------------------------------------------------------------------
