function content(url) {
	var contentWindow = window.open(url, "Amatorsko", "menubar=no, scrollbars=yes, toolbar=no, status=yes, resizable=yes, width=800, height=600, left="+(((screen.availWidth-800)/2)-10)+", top="+(((screen.availHeight-600)/2)-20));
	contentWindow.creator = self; }

function avatar_gallery() {
	var win = window.open('main.php?site=account&action=gallery',"AvatarGallery",'width=650,height=650,left=50,top=50,resizable=0,scrollbars=yes,menubar=no');
	win.creator=self; }

function choose_avatar(avatar) {
	creator.account_profile_form.user_avatar.value = avatar;
	creator.account_profile_form.picture_avatar.src="images/avatars/" + avatar + ".gif";
	window.close(); }

function change_avatar() {
	if (document.account_profile_form.user_avatar.value == '') {
		document.all.picture_avatar.src="images/noavatar.gif"; }
	else {
		document.all.picture_avatar.src="images/avatars/"+(document.account_profile_form.user_avatar.value)+".gif"; } }

function change_country() {
	if (document.account_profile_form.user_country.options[document.account_profile_form.user_country.selectedIndex].value != 'pl') {
		document.account_profile_form.user_province.selectedIndex = 17; }
	else {
		document.account_profile_form.user_province.selectedIndex = 0; } }

var vote_urls = new Array('images/vote_0.gif','images/vote_1.gif','images/vote_2.gif','images/vote_3.gif','images/vote_4.gif','images/vote_5.gif');
var vote_images = new Array();
for (var i = 0; i<vote_urls.length; ++i) {
	vote_images[i] = new Image();
	vote_images[i].src = vote_urls[i]; }

function set_vote(vote) {
	for (var i = 1; i<=5; i++) {
		if (vote >= i) { nr = i; }
		else { nr = 0; }
		var image = document.images['vote_' + i];
		if (image) { image.src = vote_images[nr].src; } } }

function put_emoticon(emoticon) {
	document.getElementById('editor_area').value  += ' ' + emoticon + ' ';
	document.getElementById('editor_area').focus();	}
