/* ***************************************************
*                                                 *
*	vars defined here are site independent       *
*						     *
***************************************************  */
var _apiKey 		= '';
var _apiHash 		= '7052c1d088ab4d85992b32c79d04b98bd882c098'; // sha1 hash of url for key


// urls for map to look at for various elements
var properties_url 	= "../mapping/populate_map.php";
var property_url 	= "../panes/pane_property.php";
var office_url 		= "../panes/pane_office.php";
var location_url 	= "../mapping/populate_locations.php";
var school_url 		= "../panes/pane_school.php";
var search_url 		= "../search/";

var propertyStringType = 1;
//var lvt = " target='_top' ";
var lvt = " target='rmlist' ";

// default height and width of map
var map_height 		= 600;
var map_width 		= 595;
var possibleMapWidths	= new Array (400,500,600,800);
var possibleMapHeights	= new Array (500,600,800);

//  height and width of map when the enlarge button is clicked
var map_height_large 	= 600;
var map_width_large 	= 600;

var map_down_from_top	= 0; // used to work out where top of map starts 
var propertyStringType=1;
var max_level 		= 6; // maximum default zoom level. can be overridden by boundaries

var restrictedBoundaries= new Array();
//restrictedBoundaries[0] = new Array (6,-0.32426834106445, 51.49944632447973, -0.067291259765625, 51.3869948645083, "London");

// movements control the x and y movements at each scale
var movements 		= new Array();
movements["1"] 		= 0.004;
movements["2"] 		= 0.009;
movements["3"] 		= 0.02;
movements["4"] 		= 0.06;
movements["5"] 		= 0.07;
movements["6"] 		= 0.03;
movements["7"] 		= 0.04;
movements["8"] 		= 0.05;
movements["9"] 		= 0.06;
movements["10"] 	= 0.07;

// now we deal with icons. each icon should be the same dimensions as those below
var icon_width 		= 30;
var icon_height 	= 22;

var icon_directory 	= "http://www.breckon.co.uk/staging/mapping/icons/";
var house_icon 		= "house.png";
var flat_icon 		= "flat.png";
var houses_icon 	= "houses.png";
var flats_icon 		= "flats.png";
var mixed_icon 		= "mixed.png";
var office_icon 	= "office.png";
var school_icon 	= "school.png";

var images_directory 	= "http://www.breckon.co.uk/staging/mapping/icons/";
var load_bar 		= "load_bar.gif";
var blank_icon 		= "blank.gif";
var scale_on_icon 	= "scale_on.jpg";
var scale_minus_icon 	= "scale_minus.jpg";
var scale_plus_icon 	= "scale_plus.jpg";
var scale_off_icon 	= "scale_off.jpg";
var exclamation 	= "exclamation.gif";
var scale_icon_width 	= 9;
var scale_icon_height 	= 17;

//LOCATIONMAP:

var show_letting_type	= false;
var show_legend		= true;
var show_arrows		= true;
var show_new_homes	= false;
var show_added		= false;
var show_garden		= false;
var show_parking	= false;
var arrows_g		= new Array();
arrows_g[0]		= "move_up_left.gif"; 
arrows_g[1]		= "move_up.gif"; 
arrows_g[2]		= "move_up_right.gif"; 
arrows_g[3]		= "move_left.gif"; 
arrows_g[4]		= "move_right.gif"; 
arrows_g[5]		= "move_down_left.gif"; 
arrows_g[6]		= "move_down.gif"; 
arrows_g[7]		= "move_down_right.gif"; 

var labels 		= new Array();
labels["increase_map"] 	= "";  // text for "enlarge map size"
labels["decrease_map"] 	= "Click to shrink map"; // text for "decrease map size"
labels["search"] 	= "go to"; // text for "decrease map size"
labels["legend"] 	= "<img src='icons/lhs_legend.gif' border=0>";
labels["legendclose"] 	= "<img src='icons/lhs_legend_close.gif' border=0>";
labels["advanced"] 	= "";
labels["advancedclose"] = "<img src='icons/lhs_advanced_close.gif' border=0>";
labels["tabs_options"] 	= "<img src='icons/tabs_options.gif'>"; // text for "decrease map size"
labels["tabs_property"] = "<img src='icons/tabs_property.gif' border=0>"; // text for "decrease map size"
labels["tabs_office"] = "<img src='icons/tabs_office.gif' border=0>"; // text for "decrease map size"
labels["tabs_school"] = "<img src='icons/tabs_school.gif' border=0>"; // text for "decrease map size"
labels["help"] 	= "<img src='icons/help_round_icon.gif' border='0' alt='Click for help'> Click for help"; // text for "decrease map size"
labels["possiblelocations"] = "<img border='0' src='icons/other_areas_header.gif'>"; // text for "decrease map size"
labels["schools"] = "Schools cannot be displayed at the current map level. Please zoom in to see school information.";
labels["list_view"] = "Click here to view all the properties on this map as a list";
labels["advanced_instructions"] = "Click here to show/hide the extra filter options available";
//labels["listview"] = "click for list view";
labels["listview"] = "/staging/images/btn_view_list_on.gif";
labels["mapview"] = "/staging/images/btn_view_map_off.gif";
labels["instructions_top"] = "<img src='icons/info_header_large.gif'>";
labels["instructions_bottom"] = "<img src='icons/info_header_small.gif'>";
labels["search_instructions"] = "Enter a place name and press 'go to' to move the map to this location/postcode";
labels["options_top"] = "Refine Your Search<br><br>";


var advanced_x		= 40;
var advanced_y		= 40;

var helpText = "<div style='float:right;display:inline;'><a href='javascript:void(sle(\"help\"))'>close</a></div><font class='around_map'><u>How to get the most out of this page</u><br>&nbsp;<br><font color='#E0144C'>Moving around the map:</font><br>You can move around the map by either clicking on the map and dragging it in any direction or by using the arrows around the side of the map <img src='icons/move_up.gif'> <img src='icons/move_down.gif'>.<br>&nbsp;<br><font color='#E0144C'>Changing the scale:</font><br>You can zoom in and out of the map using the zoom icons which can be found at the top right of the map: <img src='icons/scale_plus.jpg'> <img src='icons/scale_minus.jpg'> or by clicking on an exact scale betweem the zoom buttons.<br>&nbsp;<br><font color='#E0144C'>Changing current location:</font><br>If you wish to move the map to a particular town or postcode then use the location finder at the bottom right of the map. If only one match is found the map will re-centre on that location. If you do not know the exact place name then type part of it after which you will be given up to 20 possible locations; clicking on one of these takes you to that location.<br>&nbsp;<br><font color='#E0144C'>Viewing properties in a list:</font><br>You can view all the properties visible on the map in a list by clicking on the 'list view' option at the top right of the map.</font>";

//define classes used in map:
var aroundmapdropdownclass = "around_map_drop_down"; // scale drop-down
var aroundmapinputclass = "around_map_input"; // scale drop-down
var aroundmapclass 	= "around_map";
var aroundmaplinksclass = "around_map_links";
var aroundmapbuttonclass= "around_map_buttons";
var aroundmapheadlineclass = "around_map_headline";
var textclass 		= "around_map_input";
var lhsclass 		= "lhs";
var lhsclass2 		= "lhs2";

var lhs_panel_width 	= 166;

// define lhs column for search options
var show_schools	= false;
var show_offices	= false;
var show_searchtext	= false;

var divider		= "";

var price_from 		= new Array();
price_from["b"] 	= new Array (0,100000,200000,250000,300000,400000,500000,600000,750000,1000000,2000000,3000000);
price_from["r"] 	= new Array (0,100,200,250,300,500,600,750,1000,2000,3000,4000);

var price_to 		= new Array();
price_to["b"] 		= new Array (200000,250000,300000,350000,400000,450000,500000,600000,750000,1000000,2000000,3000000);
price_to["r"] 		= new Array (0,100,200,250,300,500,600,750,1000,2000,3000,4000);

var prefix		= new Array();
prefix["b"]		= "";
prefix["r"]		= "(per month)";


var bT                  = new Array (100,30,"#094FA3",1,1,"0,0,0","255,255,255",20,0,13,"pakenham.ttf");
var train_icon     = "trains.png";
var show_trains    = false;
var tag_url             = "utils/tag.php";
var current_url         = "street_level_map.php";

//var below_options = "<div>sdfsdfsd</div>";

