function SetViewSection(section,viewstatus)
{

        JsHttpRequest.query(
            'ajax/backend/back_common.php', // backend
            {
	func		: 'setviewstatus',
	setsection	: section, 
	status		: viewstatus 
            },
            // Function is called when an answer arrives. 
            function(result, errors) {
                // Write errors to the debug div.
                //document.write(errors);
                // Write the answer.
                if (result) {
		alert(result['res']);
                }
            },
            false  // do not disable caching
        );

}
function getCity(country_id,city_select_id)
{
         var sel = document.getElementById(city_select_id);
         sel.innerHTML = '';
         var opt = document.createElement('option');
         opt.text = l_load+'...';
          try{
              sel.add(opt,null); // standards compliant
              }
              catch(ex)
              {
               sel.add(opt); // IE only
              }  
        		              
         JsHttpRequest.query(
            'ajax/backend/back_common.php', // backend
            {
	         'func'	  : 'getcity',
	         'id'	  : country_id,
	         'isie'   : true//is_ie 
            },
            // Function is called when an answer arrives. 
            function(result, errors) {
                // Write errors to the debug div.
                //document.write(errors);
                // Write the answer.
                if (result) {
                   //if (is_ie){
		              var sel = document.getElementById(city_select_id);
		              sel.innerHTML = '';
		              for(var i in result['citys']){
		                  var opt = document.createElement('option');
		                  opt.value = i;
		                  opt.title = result['citys'][i];
		                  opt.text = result['citys'][i];
                          try{
                              sel.add(opt,null); // standards compliant
                              }
                              catch(ex)
                              {
                               sel.add(opt); // IE only
                              }  		              
		              }
                   //}else{
                   //      document.getElementById(city_select_id).innerHTML = result['city'];  
                   //}
                }
            },
            false  // do not disable caching
        ); 	
}
