function wopen(url,name,w,h,r,s,st){
var w=window.open(url,name,"width="+w+",height="+h+",resizable="+r+",toolbar=0,location=0,status="+st+",menubar=0,directories=0,scrollbars="+s);
}

var block = new Array();
function blocks(key) {
if(block[key]==1) {
document.getElementById('block'+key).style.display='none';
document.getElementById('l'+key).style.backgroundPosition = '-65px -176px';
block[key]=0;
} else {
document.getElementById('block'+key).style.display='block';
document.getElementById('l'+key).style.backgroundPosition = '-79px -176px';
block[key]=1;
}

}


function votes_over(key) {
for(i=1;i<=key;i++) {
document.getElementById('v'+i).style.backgroundPosition = 'bottom';
document.getElementById('vq'+i).style.color = '#D84007';
}
}

function votes_out(key) {
for(i=10;i>=1;i--) {
document.getElementById('v'+i).style.backgroundPosition = 'top';
document.getElementById('vq'+i).style.color = '#929292';
}
}

function uonline(time1, time2, id) {
document.getElementById('time'+id).innerHTML = 'Последнее посещение: сегодня, '+time1;
document.getElementById('time'+id).style.display='block';
}
function uonlineout(id) {
document.getElementById('time'+id).style.display='none';
document.getElementById('time'+id).innerHTML = '';
}



function cityadd(city_id, city_name) {
var objSel = document.getElementById("city"); 
objSel.options[objSel.options.length] = new Option(city_name, city_id, "Selected", "Selected");
document.getElementById('country').style.display='none';
document.getElementById('country').innerHTML = '';
}


function citysel(city_id, region_id, country_id) {
var ajax = new upweb_ajax();
var varsString = "";
ajax.requestFile = "/upweb/ajax/ajax_city.php";
ajax.method = 'GET';
ajax.setVar('country_id', country_id);
ajax.setVar('region_id', region_id);
ajax.setVar('city_id', city_id);
ajax.element = 'country';
ajax.runAJAX(varsString);
}

function citylist(region_id, country_id) {
var ajax = new upweb_ajax();
var varsString = "";
ajax.requestFile = "/upweb/ajax/ajax_city.php";
ajax.method = 'GET';
ajax.setVar('country_id', country_id);
ajax.setVar('region_id', region_id);
ajax.element = 'country';
ajax.runAJAX(varsString);
}

function region(country) {
var country_id = country;
var ajax = new upweb_ajax();
var varsString = "";
ajax.requestFile = "/upweb/ajax/ajax_city.php";
ajax.method = 'GET';
ajax.setVar('country_id', country);
ajax.element = 'country';
ajax.runAJAX(varsString);
}


function country(country) {
if(country=="other") {
document.getElementById('country').style.display='block';
var ajax = new upweb_ajax();
var varsString = "";
ajax.requestFile = "/upweb/ajax/ajax_city.php";
ajax.method = 'GET';
ajax.element = 'country';
ajax.runAJAX(varsString);
} else {
document.getElementById('country').style.display='none';
document.getElementById('country').innerHTML = '';
}

}


function wopen(url,name,w,h,r,s,st) {
var w=window.open(url,name,"width="+w+",height="+h+",resizable="+r+",toolbar=0,location=0,status="+st+",menubar=0,directories=0,scrollbars=1");
}