function yomruImage(user,domain,pic){ 
	var suffix='ru'; 
	document.write('<a href="' + 'mailto:' + user + '@' + domain + '.' + suffix + '"><img src="/pic/child/'+pic+'"></a>'); 
} 
function yomru(user,domain){ 
	var suffix='ru'; 
	document.write('<a href="' + 'mailto:' + user + '@' + domain + '.' + suffix + '"><span>Написать письмо</span></a>'); 
} 


function ShowPhoto(what,title,x,y) {
 var viewer = 'site/popup/viewer.php';
 var url = viewer+'?pic='+encode(what)+'&desc='+title;
 window.open(url,'pictureWindow','scrollbars=0,resizable=1,location=0,status=1,width=200,height=100,left='+(screen.width/2-100)+',top='+(screen.height/2-50));
}

function getCitys(id_region) {
    // Create new JsHttpRequest object.
    var req = new JsHttpRequest();
    // Code automatically called on load finishing.
    req.onreadystatechange = function() {
        if (req.readyState == 4) {
            // Write result to page element ($_RESULT become responseJS). 
            $('city_list').innerHTML ='<select id="city" name="city" style="margin: 5px 0px 0px 60px; width:200px;"><option value=""></option>' + req.responseJS.citys + '</select>';
            //document.getElementById('basketSSum').innerHTML = req.responseJS.ssum;
            // Write debug information too (output become responseText).
            //document.getElementById('debug').innerHTML = req.responseText;
        } else {
           //document.getElementById('basketItemField'+id_obj).style.background = '#ffa';
		} 
    } 
    // Prepare request object (automatically choose GET or POST).
    req.open(null, '/skin/on/a_citys.php', true);
    // Send data to backend.
    req.send( {
      id_region: id_region
    } );
    return true;
}

