function reserve_temp_order_pixels($block_info, $in_str)
{
    global $label;
    if (session_id() == '') {
        return false;
    }
    // cannot reserve pixels if there is no session
    // check if it is free
    $sql = "select block_id from blocks where banner_id='" . $_REQUEST['BID'] . "' and block_id IN({$in_str}) ";
    $result = mysql_query($sql) or die($sql . mysql_error());
    if (mysql_num_rows($result) > 0) {
        echo js_out_prep($label['check_sel_notavailable'] . " (E432)");
        //do_log_entry ($sql);
        return;
    }
    $blocks = explode(',', $in_str);
    foreach ($block_info as $key => $block) {
        //$price = get_zone_price($_REQUEST['BID'],  $block['map_y']/10, $block['map_x']/10);
        $price = get_zone_price($_REQUEST['BID'], $block['map_y'] / BLK_HEIGHT, $block['map_x'] / BLK_WIDTH);
        $currency = get_default_currency();
        // enhance block info...
        $block_info[$key]['currency'] = $currency;
        $block_info[$key]['price'] = $price;
        $block_info[$key]['banner_id'] = $_REQUEST['BID'];
        $total += $price;
        //mysql_query ($sql) or die (mysql_error().$sql);
        //echo $key.", ";
    }
    //echo 'total:'.$total;
    //print_r($block_info);
    //$block_info = serialize($block_info);
    $sql = "UPDATE temp_orders set price='{$total}' where session_id='" . session_id() . "'  ";
    mysql_query($sql);
    //echo $sql;
    // save to file
    $fh = fopen(SERVER_PATH_TO_ADMIN . 'temp/' . "info_" . md5(session_id()) . ".txt", 'wb');
    fwrite($fh, serialize($block_info));
    fclose($fh);
    mysql_query($sql) or die(mysql_error() . $sql);
}
					} else {

						if (xmlhttp.responseText.indexOf('max_selected')>-1) {
							<?php 
$label['max_blocks_selected'] = str_replace('%MAX_BLOCKS%', G_MAX_BLOCKS, $label['max_blocks_selected']);
?>
							alert('<?php 
echo js_out_prep($label['max_blocks_selected']);
?>
 ');
						}

						if (xmlhttp.responseText.indexOf('max_orders')>-1) {
							alert ('<?php 
echo js_out_prep($label['advertiser_max_order']);
?>
');
						}

						hide_block(clicked_block, map_x, map_y, xmlhttp.responseText);

					}
					

				}
				update_order();
				trip_count--; // count down, enable button when 0
				//alert(trip_count);
				if (trip_count <= 0) {
					document.getElementById('submit_button1').disabled=false;