<?php

// sp_areacode.php
// Area code chooser (XDriver)

?>

<style type="text/css">
<!--
@import url(<?=$abs_root;?>/themes/<?=$abs_opt['theme'];?>/css/sp_areacodes.css);
//-->
</style>

<script language="javascript" type="text/javascript">

// This script is used to populate the NumberChooser specialsequence fields, and trigger a search
//

function abs_areacode_search(area, code)
{
	abs_layer_store['sp_8'].hide();
	
	var int_suffix = code.substring(1);
	
	var p_arr = new Array();
	p_arr.push([code + ' (' + area + ') numbers only', 	'!44' + int_suffix, 0, 1]);
	p_arr.push(['None (all UK local numbers)',  		'!44',				0, 0]);
	
	dmx.<?=$abs_numberchooser_name;?>.set_prefix(p_arr);

	dmx.<?=$abs_numberchooser_name;?>.search('Searching for ' + code + ' (' + area + ') numbers');
}

function abs_init_areacode()
{
	if (!'<?=$abs_xstate->areaname;?>' && dmx.resultcode == undefined || !'<?=$abs_xstate->areaname;?>'&& dmx.resultcode.result != 'search' && dmx.resultcode.result != 'page') abs_show_sidepage('sp_8', 80, <?=(strpos($_SERVER['SCRIPT_FILENAME'], 'gold') ? 490 : 225);?>);
	var arajax = new Request.HTML( { url: '<?=$abs_root;?>/common/sp_areacodes_content.php', update: 'dada' } );
	arajax.get();
}

// Set up page initialisation event handler
if (window.addEventListener)
{
	// W3C
	window.addEventListener('load', abs_init_areacode, true);
}
else if (window.attachEvent)
{
	// IE  - Quirks Mode
	window.attachEvent('onload', abs_init_areacode);
}

</script>

<!-- SIDEPAGE -->
<div id="sp_8" class="sidepage" style="width: 750px;" onmouseover="sub_menu_hide();">
	<div class="sidepage_box">
		<div id="sp_8_handle" class="header_bar">
			<a href="" onclick="abs_layer_store['sp_8'].hide(); return false;"><img src="<?=$abs_root;?>/themes/<?=$abs_opt['theme'];?>/gen_images/close_cross.png" alt="" width="15" height="15" style=" border: 0px;"></a>
			UK Area Codes
		</div>
		<div class="box_content" id="dada">

			<div style="text-align: center; margin: 180px 0px;">
				<img src="{GLIB}/interface/ajax_loader_col1.gif" width="16" height="16" alt=""> Loading UK Area Codes
			</div>
		
		</div>
	</div>
</div>

