<?php
	
	$dial = "";	
	
	$service = $_GET['service'];
	
	$range = $_GET['range'];
	if($range == 'UK-GEO-All') {
		$dial = $_GET['dial'];
	} 
	
	$service_name['EC'] = 'dmConnect call forwarding';
	$service_name['EXV'] = 'dmVoice voicemail &amp; call hunting';
	$service_name['EXF'] = 'dmFax fax to email';
	$service_name['EXS'] = 'dmSwitchboard virtual switchboard';
	
	$size = $_GET['size'];
	
	$cols['xs'] = 1;
	$cols['sm'] = 2;
	$cols['md'] = 3;
	
	$width['xs'] = 300;
	$width['sm'] = 560;
	$width['md'] = 860;
	
	if($size == 'xs')
		$nudgers = 0;
	else
		$nudgers = 1;
	
	$dialcode['UK-GEO-All'] = $dial;
	$dialcode['UK-NGN-Free'] = '0800';
	$dialcode['UK-NGN-G6'] = '0844';
	$dialcode['UK-NGN-Loc'] = '0845';
	$dialcode['UK-NGN-Nat'] = '0870';
	$dialcode['UK-NGN-G7'] = '0871';
	
	$ecom_name = $dialcode[$range].$service;
	
	
	//echo 'range: '.$range.' | dial:'.$dial.' | service: '.$service.' | ecomname: '.$ecom_name;
?>

			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<h4 class="modal-title" id="numberModalLabel">Choose an <?php echo $dialcode[$range]; ?> number with <?php echo $service_name[$service]; ?></h4>
			</div>
			<div class="modal-body" id="numbercontent">
				<p class="text-center">
					<a href="#" title="Help me choose a number" data-toggle="modal" data-target="#helpModal">Help me use the number chooser</a>
				</p>
<!-- eComponent: numberchooser_<?php echo $ecom_name; ?> / DMR-2.0.A.0-(BU)-svn-424 --> 
	<script language="javascript" type="text/javascript"> 
	/*<![CDATA[[*/ var dealer_id = '8592'; /* Set dealer ID */ /*]]>*/ 
	</script> 
	<script language="javascript" type="text/javascript" src="http://ecom0.live.dmclub.net/js/applib.js"></script> 
	<iframe id="numberchooser_<?php echo $ecom_name; ?>" name="numberchooser_<?php echo $ecom_name; ?>" src="http://ecom0.live.dmclub.net/?v.css_link=&amp;c.ecom_type=numberchooser&amp;c.ecom_name=numberchooser_<?php echo $ecom_name; ?>&amp;v.auto_height=0&amp;v.rows=10&amp;v.show_help_text=1&amp;v.show_help_sg=1&amp;v.show_ctl_search=1&amp;c.cmd=search&amp;v.multi_choose_mode=0&amp;v.multi_page=1&amp;v.show_nudgers=<?php echo $nudgers; ?>&amp;d.free_0800_only=0&amp;d.cn12=0&amp;v.show_ctl_areacode=1&amp;d.uk_areacodes=<?php echo $dial; ?>&amp;v.show_ctl_easy_sp_seq=1&amp;d.sp_seq_1=&amp;v.show_ctl_gold=1&amp;d.min_gold_percent=10&amp;d.max_gold_percent=20&amp;v.show_res_gold=1&amp;v.cols=<?php echo $cols[$size]; ?>&amp;d.sorted_by=num_a&amp;v.touchscreen_mode=AUTO&amp;d.trf_range=<?php echo $range; ?>&amp;d.trf_service=<?php echo $service; ?>&amp;d.trf_plan=Bas&amp;v.show_ctl_sp_seq=1&amp;d.gold_range=0-%2A&amp;r_add_to_trolley=redirect%3A%3Atop%3A%3A/checkout.html&amp;c.no_step=1&amp;c.ecv=live-svn424" width="<?php echo $width[$size]; ?>" height="600" frameborder="no" scrolling="no"></iframe> 
<!-- /eComponent -->

				<div class="clearfix"></div>
			</div>
		