<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: 			*/
// +----------------------------------------------------------------------+
// | PHP version 4/5                                                      |
// +----------------------------------------------------------------------+
// | Copyright (c) 2004-2010 ARMIA INC                                    |
// +----------------------------------------------------------------------+
// | This source file is a part of iScripts VistaCart                     |
// +----------------------------------------------------------------------+
// | Authors: Jipson<jipson.thomas@armiasystems.com>             		  |
// +----------------------------------------------------------------------+
?>
<?php echo $javascript->link('jquery.js'); ?>
<?php echo $javascript->link('hint.js'); ?>
<script>
$(document).ready(function() 
{
  var dflt_cntry='';
  dflt_cntry='<?php echo $data["shipping_origin_country"];?>';
  if(dflt_cntry != '')
  setStates(dflt_cntry);
  else
  setStates('US');
  
  <?php if($data['fflat_shipping_require']=='Y'){?> $('#flatrate1').show(); <?php } else { ?> $('#flatrate1').hide(); <?php } ?>
		<?php if($data['sflat_shipping_require']=='Y'){?> $('#flatrate2').show(); <?php } else { ?> $('#flatrate2').hide(); <?php } ?>
		<?php if($data['tflat_shipping_require']=='Y'){?> $('#flatrate3').show(); <?php } else { ?> $('#flatrate3').hide(); <?php } ?>
		<?php if($data['foflat_shipping_require']=='Y'){?> $('#flatrate4').show(); <?php } else { ?> $('#flatrate4').hide(); <?php } ?>	
		<?php if($data['shipping_require_usps']=='Y'){?>  $('.uspsusername').show(); <?php } else { ?>  $('.uspsusername').hide(); <?php } ?>	
		<?php if($data['shipping_require_fedex']=='Y'){?>  $('.fedexaccno').show();$('.fedexmeterno').show(); <?php } else { ?>  $('.fedexaccno').hide();$('.fedexmeterno').hide(); <?php } ?>	
		<?php if($data['shipping_require_canada']=='Y'){?>  $('.canadapost').show(); <?php } else { ?>  $('.canadapost').hide(); <?php } ?>			
});

function setStates(val)
{
  if(val=='US')
  {
    $('#us_states').show();
	$('#other_states').hide(); $('#origin_state').val('');
  }	
  else
  {
    $('#other_states').show(); 
	$('#us_states').hide();
	//$('#origin_state').val('');
  }	
}
</script>


<script>
/*scripts for Shipping Tab starts here */
function rateShowHide(id)
{
          if(id==1)
		  {   
			   if($('#fflat_shipping_require').attr('checked')==true)
			   $('#flatrate'+id+'').slideDown();
			   else
			   $('#flatrate'+id+'').slideUp();
		   }	
		   if(id==2)
		  { 
		   if($('#sflat_shipping_require').attr('checked')==true)
    	   $('#flatrate'+id+'').slideDown();
		   else
		   $('#flatrate'+id+'').slideUp();
		  } 
		   if(id==3)
		  { 
		   if($('#tflat_shipping_require').attr('checked')==true)
    	   $('#flatrate'+id+'').slideDown();
		   else
		   $('#flatrate'+id+'').slideUp();
		  } 
		   if(id==4)
		  { 
		   if($('#foflat_shipping_require').attr('checked')==true)
    	   $('#flatrate'+id+'').slideDown();
		   else
		   $('#flatrate'+id+'').slideUp();
		  } 
}
	   
function shipShowHide(arg)
{
       if(arg=="usps")
	   {
		   if($('#shipping_require_usps').attr('checked')==true)
		   $('.uspsusername').slideDown();
		   else
		   $('.uspsusername').slideUp();
	   }   
	   if(arg=="fedex")
	   {
		   if($('#shipping_require_fedex').attr('checked')==true)
		   {     $('.fedexaccno').slideDown();$('.fedexmeterno').slideDown();   }	 
		   else
		   {   $('.fedexaccno').slideUp('slow');$('.fedexmeterno').slideUp('slow');   }			   
	   }   
	   if(arg=="post")
	   {
		    if($('#shipping_require_canada').attr('checked')==true)
		    $('.canadapost').slideDown();
		    else
		    $('.canadapost').slideUp();	   
	   }   
  return true;
}
/*scripts for Shipping Tab starts here */
function validateShip(thisform)
{
  if($.trim($('#shipping_origin_country').val())=='')
  {
   alert("Please select the Shipping Origin Country.");
   $('#shipping_origin_country').focus();
   return false;
  }
  //alert($('#shipping_origin_city').val());
  if($.trim($('#shipping_origin_city').val())=='')
  {
   alert("Shipping Origin City cannot be empty.");
   $('#shipping_origin_city').focus();
   return false;
  }
  if($.trim($('#shipping_origin_zip').val())=='')
  {
   alert("Shipping Origin Zip Code cannot be empty.");
   $('#shipping_origin_zip').focus();
   return false;
  }
  if($.trim($('#fflat_shipping_require:checked').val())=="Y"){
      if($.trim($('[name=flat_shipping_first]').val())== ''){
          alert('Flat Rate Shipping Charge for first item can not be empty');
          return false;
      }
      if($.trim($('[name=flat_shipping_additional]').val())== ''){
          alert('Flat Rate Shipping Charge for additional items can not be empty');
          return false;
      }
      if($.trim($('[name=flat_ship_name]').val())== ''){
          alert('Flat Rate Shipping Display name can not be empty');
          return false;
      }
  }
  if($.trim($('#sflat_shipping_require:checked').val())=="Y"){
      if($.trim($('[name=secflat_shipping_first]').val())== ''){
          alert('2nd Flat Rate Shipping Charge for first item can not be empty');
          return false;
      }
      if($.trim($('[name=secflat_shipping_additional]').val())== ''){
          alert('2nd Flat Rate Shipping Charge for additional items can not be empty');
          return false;
      }
      if($.trim($('[name=secflat_ship_name]').val())== ''){
          alert('2nd Flat Rate Shipping Display name can not be empty');
          return false;
      }
  }
  if($.trim($('#tflat_shipping_require:checked').val())=="Y"){
      if($.trim($('[name=thirdflat_shipping_first]').val())== ''){
          alert('3rd Flat Rate Shipping Charge for first item can not be empty');
          return false;
      }
      if($.trim($('[name=thirdflat_shipping_additional]').val())== ''){
          alert('3rd Flat Rate Shipping Charge for additional items can not be empty');
          return false;
      }
      if($.trim($('[name=thirdflat_ship_name]').val())== ''){
          alert('3rd Flat Rate Shipping Display name can not be empty');
          return false;
      }
  }
  if($.trim($('#foflat_shipping_require:checked').val())=="Y"){
      if($.trim($('[name=forthflat_shipping_first]').val())== ''){
          alert('4th Flat Rate Shipping Charge for first item can not be empty');
          return false;
      }
      if($.trim($('[name=forthflat_shipping_additional]').val())== ''){
          alert('4th Flat Rate Shipping Charge for additional items can not be empty');
          return false;
      }
      if($.trim($('[name=forthflat_ship_name]').val())== ''){
          alert('4th Flat Rate Shipping Display name can not be empty');
          return false;
      }
  }
  thisform.submit();
}
</script>
<div align="center" class="subheading">
              <div align="left">Shipping Settings</div>
            </div>
            <br />
			<?php if($session->check('Message.flash')) { ?><div id="okbox"><font color="#446423"><?php $session->flash(); ?></font></div><?php } ?>			
			
			<div align="left" id="item_details_admin">

	<form id="shipsetting" name="shipsetting" method="post" action="<?php echo $sitebase.$sitefolder.'/'.$this->params["controller"];?>/ship_setting">
	<div align="left" id="item_details_admin">
              <div align="center" id="items_display_area_admin">
                  <div align="left" class="inner_content_area_admin">
				  
				  
                           <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner"><strong>Flat Rate Shipping Service Required</strong></p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="checkbox" name="fflat_shipping_require" id="fflat_shipping_require" value="Y" <?php if($data['fflat_shipping_require']=='Y'){?> checked <?php } ?> onclick="rateShowHide('1');" >
									<a href="#" class="tooltip" title="Would you like to enable flat rate shipping for your store? Check this box to enable this function." onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>	
									</a>	
								</span>							
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
						  						  
						  
		<div id="flatrate1"> <!-- Start of flat rate1 -->
						  
						   <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Flat Rate Shipping Charge for 1st Item  <?php echo Sanitize::html($pcurr["logo"]); ?></p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="text" name="flat_shipping_first" class="box2_admin" size="27" value="<?php echo Sanitize::html($data['flat_shipping_first']);?>">																	
								</span>							
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
						  
						  <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Flat Rate Shipping Charge for Each Additional Item <?php echo Sanitize::html($pcurr["logo"]); ?></p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="text" name="flat_shipping_additional" class="box2_admin" size="27" value="<?php echo $data['flat_shipping_additional'];?>">									
								</span>							
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
						  
						  <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Flat Rate Shipping Display Name</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="text" name="flat_ship_name" class="box2_admin" size="27" value="<?php echo Sanitize::html($data['flat_ship_name']);?>">									
								</span>							
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
						  
			   </div><!-- End of flar rate1 -->
						   
						
						  
						  <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner"><strong>2nd Flat Rate Shipping Service Required</strong></p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="checkbox" name="sflat_shipping_require" id="sflat_shipping_require" value="Y" <?php if($data['sflat_shipping_require']=='Y'){?> checked <?php } ?> onclick="rateShowHide('2');">
									<a href="#" class="tooltip" title="Check this box to enable a 2nd flat shipping service rate." onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>	
									</a>	
								</span>							
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>		
				         </div>
						  
						  
		<div id="flatrate2"><!-- Start of flat rate2 -->					  
					  
						  <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">2nd  Flat&nbsp;Rate&nbsp;Shipping&nbsp;Charge&nbsp;for&nbsp;first&nbsp;item &nbsp;<?php echo Sanitize::html($pcurr["logo"]); ?></p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="text" name="secflat_shipping_first" class="box2_admin" size="27" value="<?php echo Sanitize::html($data['secflat_shipping_first']);?>">										
								</span>							
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
						  
						  <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <span class="maintext_inner">2nd Flat&nbsp;Rate&nbsp;Shipping&nbsp;Charge&nbsp;for&nbsp;each&nbsp;<br/>additional&nbsp;items&nbsp;<?php echo $pcurr["logo"]; ?></span>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="text" name="secflat_shipping_additional" class="box2_admin" size="27" value="<?php echo Sanitize::html($data['secflat_shipping_additional']);?>">									
								</span>							
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
						  
						    <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">2nd&nbsp;Flat&nbsp;Rate&nbsp;Shipping&nbsp;Display&nbsp;name </p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="text" name="secflat_ship_name" class="box2_admin" size="27" value="<?php echo Sanitize::html($data['secflat_ship_name']);?>">									
								</span>							
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
			</div><!-- End of flar rate2 -->
						  
						  
						  <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner"><strong>3rd Flat Rate Shipping Service Required</strong></p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="checkbox" name="tflat_shipping_require" id="tflat_shipping_require" value="Y" <?php if($data['tflat_shipping_require']=='Y'){?> checked <?php } ?> onclick="rateShowHide('3');">
									<a href="#" class="tooltip" title="Check this box to enable a 3rd flat shipping service rate." onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>	
									</a>	
								</span>							
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
						  
						  
				 <div id="flatrate3"><!-- Start of flat rate3 -->
						  
						  <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">3rd Flat&nbsp;Rate&nbsp;Shipping&nbsp;Charge&nbsp;for&nbsp;first&nbsp;item &nbsp;<?php echo Sanitize::html($pcurr["logo"]); ?></p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="text" name="thirdflat_shipping_first" class="box2_admin" size="27" value="<?php echo Sanitize::html($data['thirdflat_shipping_first']);?>">									
								</span>							
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
						  
						  <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <span class="maintext_inner">3rd Flat&nbsp;Rate&nbsp;Shipping&nbsp;Charge&nbsp;for&nbsp;each&nbsp;<br/>additional&nbsp;items&nbsp;<?php echo Sanitize::html($pcurr["logo"]); ?></span>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="text" name="thirdflat_shipping_additional" class="box2_admin" size="27" value="<?php echo Sanitize::html($data['thirdflat_shipping_additional']);?>">									
								</span>							
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
						  
						  <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">3rd Flat&nbsp;Rate&nbsp;Shipping&nbsp;Display&nbsp;name</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="text" name="thirdflat_ship_name" class="box2_admin" size="27" value="<?php echo Sanitize::html($data['thirdflat_ship_name']);?>">									
								</span>							
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
						  
	   </div><!-- End of flar rate3 -->
						  
						  
						  <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner"><strong>4th Flat Rate Shipping Service Required</strong></p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="checkbox" name="foflat_shipping_require"  id="foflat_shipping_require" value="Y" <?php if($data['foflat_shipping_require']=='Y'){?> checked <?php } ?> onclick="rateShowHide('4');">
									<a href="#" class="tooltip" title="Check this box to enable a 4th flat shipping service rate." onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>	
									</a>	
								</span>							
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>


						 
			<div id="flatrate4">	 <!-- Start of flat rate4 -->  
						  <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">4th Flat&nbsp;Rate&nbsp;Shipping&nbsp;Charge&nbsp;for&nbsp;first&nbsp;item &nbsp;<?php echo Sanitize::html($pcurr["logo"]); ?></p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="text" name="forthflat_shipping_first"  id="forthflat_shipping_first" class="box2_admin" size="27" value="<?php echo Sanitize::html($data['forthflat_shipping_first']);?>">									
								</span>							
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
						  
						  <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <span class="maintext_inner">4th Flat&nbsp;Rate&nbsp;Shipping&nbsp;Charge&nbsp;for&nbsp;each&nbsp;<br/>additional&nbsp;items&nbsp;<?php echo Sanitize::html($pcurr["logo"]); ?></span>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="text" name="forthflat_shipping_additional" class="box2_admin" size="27" value="<?php echo Sanitize::html($data['forthflat_shipping_additional']);?>">									
								</span>							
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
						  
						  <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">4th Flat&nbsp;Rate&nbsp;Shipping&nbsp;Display&nbsp;name</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="text" name="forthflat_ship_name" class="box2_admin" size="27" value="<?php echo Sanitize::html($data['forthflat_ship_name']);?>">									
								</span>							
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
						
   </div><!-- End of flar rate4 -->
						
						  
						  <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Shipping Origin Country &nbsp; <font color="#FF0000">*</font></p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<?php echo $form->input('shipping_origin_country', array('options' => $countrylist,'label' => '', 'selected' => $data['shipping_origin_country'],'class' => 'box2_admin','onchange' => 'javascript:setStates(this.value)'));?>
                                                                       		
								</span>	
                                                            <div style="margin-top: 7px;">
								 <a href="#" class="tooltip"  title="Where is the package being shipped from?" onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none' ,'margin-top' => 1));?>	
									</a>
                                                            </div>
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
						  
						  
						  <!--
						  <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Shipping Origin State &nbsp; <font color="#FF0000">*</font></p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<?php echo $form->input('shipping_origin_country', array('options' => $countrylist,'label' => '', 'selected' => $data['shipping_origin_country'],'class' => 'box2_admin'));?>
									<a href="#" class="tooltip" title="Enter the Shipping origin Country." onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>	
									</a>	
								</span>							
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
						  -->
						  
						  
				 <div  id="us_states">
				    <div id="grid_admin">
                    <div align="left" id="inner_leftcontent">
                      <p class="maintext_inner">Shipping Origin State &nbsp; <span class="required_field">*</span></p>
                    </div>
                    <div align="right" id="inner_rightcontent" class="newwidth">
                    <span class="toplinks">
					 <select class="box2_admin" name="shipping_origin_state" id="shipping_origin_state">
						<?php
						foreach($us_states as $stval) { ?>
						<option value="<?php echo $stval["Statecode"]["code"];?>" <?php if($stval["Statecode"]["code"] == $data['shipping_origin_state']) echo "selected=selected";?>><?php echo $stval["Statecode"]["name"];?></option>
						<?php } ?>
						</select>    
                        </span>
                    </div>
                    <div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif');?></div>
                  </div>
                  <div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif');?></div>
				  </div>
				  
				  
				    <div id="other_states" style="display:none;">
				   <div id="grid_admin">
                    <div align="left" id="inner_leftcontent">
                      <p class="maintext_inner">Shipping Origin State &nbsp; <span class="required_field">*</span></p>

                    </div>
                    <div align="right" id="inner_rightcontent" class="newwidth">
                   <span class="toplinks">
									<input type="text" name="origin_state"  id="origin_state" class="box2_admin" size="27" value="<?php echo Sanitize::html($data['shipping_origin_state']);?>">
									<a href="#" class="tooltip" title="Enter the Shipping origin State Code" onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>	
									</a>	
								</span>		
                    </div>
                    <div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif');?></div>
                  </div>
                  <div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif');?></div>
				  </div>
                 <div id="grid_admin">
                    <div align="left" id="inner_leftcontent">
                      <p class="maintext_inner">Shipping Origin City &nbsp; <span class="required_field">*</span></p>

                    </div>
                    <div align="right" id="inner_rightcontent" class="newwidth">
                   <span class="toplinks">
									<input type="text" name="shipping_origin_city"  id="shipping_origin_city" class="box2_admin" size="27" value="<?php echo Sanitize::html($data['shipping_origin_city']);?>">
									<a href="#" class="tooltip" title="Enter the Shipping origin city" onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>	
									</a>	
								</span>		
                    </div>
                    <div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif');?></div>
                  </div>
                  <div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif');?></div>
						  
						  
						  <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Shipping Origin Postal Code &nbsp;  <font color="#FF0000">*</font></p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="text" name="shipping_origin_zip"  id="shipping_origin_zip" class="box2_admin" size="27" value="<?php echo Sanitize::html($data['shipping_origin_zip']);?>">
									<a href="#" class="tooltip" title="Enter the zip code/postal code from where items are shipped." onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>	
									</a>	
								</span>							
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
						  
						  <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner"><strong>UPS Shipping Service Required</strong></p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="checkbox" name="shipping_require" value="Y" <?php if($data['shipping_require']=='Y'){?> checked <?php } ?>>
									<a href="#" class="tooltip" title="Enable this check box if you wish to allow UPS Shipping Service.<br />
									UPS offers guaranteed time-definite and day-definite delivery based on your shipment's destination.<br>http://www.ups.com/" onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>	
									</a>	
								</span>	
								<div class="maintext_inner"><font color="#FF0000"> Note : UPS Shipping Service will support only US- Dollar!!</font></div>						
							</div>


							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
						  
																	  
						    
						  <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner"><strong>USPS Shipping Service Required</strong></p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="checkbox" name="shipping_require_usps"  id="shipping_require_usps" value="Y" onClick="javascript:return  shipShowHide('usps');"<?php if($data['shipping_require_usps']=='Y'){?> checked <?php } ?>>
									<a href="#" class="tooltip" title="Enable this check box if you wish to allow USPS Shipping Service.
									USPS Shipping Service provides  mail processing and delivery service for individuals and businesses in the United States.<br>http://www.usps.com/" onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>	
									</a>	
								</span>							
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
						  
						  <div id="grid_admin" class="uspsusername" style="display:none">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">USPS Username</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="text" name="USPS_Username" class="box2_admin" size="27" value="<?php echo Sanitize::html($data['USPS_Username']);?>">
									<a href="#" class="tooltip" title="Enter the USPS Username" onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>	
									</a>	
								</span>							
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
                                                 <!--****USPS Label Fedex enable********************-->
                                                  <div id="grid_admin" class="uspsusername" style="display:none">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Enable USPS Shipping Label</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<div class="maintext_inner">
									<input type="radio" name="allow_uspslabel" value="Y" <?php if($data["allow_uspslabel"] == "Y"){ ?> checked <?php } ?>>Yes &nbsp;
									<input type="radio" name="allow_uspslabel" value="N"  <?php if($data["allow_uspslabel"] == "N"){ ?> checked <?php } ?>>No
									<a href="#" class="tooltip" title="Enable this if you wish to use USPS Shipping Label Creation.
									<br><b>Shipping label :- </b>A label attached to a shipping unit, containing certain data." onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>
									</a>
								  </div>
								</span>
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
						  
						    <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">&nbsp;</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">&nbsp;</span>							
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
						  
						  <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner"><strong>FEDEX Shipping Service Required</strong></p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="checkbox" name="shipping_require_fedex" id="shipping_require_fedex"    value="Y" onClick="javascript:return  shipShowHide('fedex');"<?php if($data['shipping_require_fedex']=='Y'){?> checked <?php } ?>>
									<a href="#" class="tooltip" title="Enable this check box if you wish to allow Fedex Shipping Service." onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>	
									</a>	
								</span>							
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
						  
						 
						  
						  <div id="grid_admin" class="fedexaccno" style="display:none">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Fedex Bill Account Number</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									
									<input name="fedexbillaccno" type="text" class="box2_admin" size="27" id="fedexbillaccno" value="<?php echo Sanitize::html($data['fedexbillaccno']);?>"> 		
									<a href="#" class="tooltip" title="Enter your Fedex Billing Account Number." onclick="return false;">


									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>	
									</a>	
				                 <div class="maintext_inner">  Test Accno : 510088000</div>
								</span>							
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>

						  
						   <div id="grid_admin" class="fedexaccno" style="display:none">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Fedex Ship Account Number</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									
									<input name="fedexshipaccno" type="text" class="box2_admin" size="27" id="fedexshipaccno" value="<?php echo Sanitize::html($data['fedexshipaccno']);?>"> 		
									<a href="#" class="tooltip" title="Enter your Fedex Shipping Account Number." onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>	
									</a>	
				                 <div class="maintext_inner">  Test Accno : 510088000</div>
								</span>							
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
						  
						  
						  
						  <div id="grid_admin" class="fedexmeterno" style="display:none">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Fedex Meter Number </p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input name="fedexmeterno" type="text" class="box2_admin" size="27" id="fedexmeterno" value="<?php echo Sanitize::html($data['fedexmeterno']);?>">
									<a href="#" class="tooltip" title="Enter your Fedex Meter Number." onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>	
									</a>	
				                   <div class="maintext_inner">Test Meter No : 100022250</div>
								</span>							
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
						  
						  
						  <div id="grid_admin" class="fedexmeterno" style="display:none">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Fedex Key </p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input name="fedexkey" type="text" class="box2_admin" size="27" id="fedexkey" value="<?php echo Sanitize::html($data['fedexkey']);?>">
									<a href="#" class="tooltip" title="Enter your Fedex Key." onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>	
									</a>	
				                   <div class="maintext_inner">Test Fedex Key : VH9gpVObdc0EvOIQ</div>
								</span>							
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
						  
						  <div id="grid_admin" class="fedexmeterno" style="display:none">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Fedex Password </p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input name="fedexpaswd" type="password" class="box2_admin" size="27" id="fedexpaswd" value="<?php echo Sanitize::html($data['fedexpaswd']);?>">
									<a href="#" class="tooltip" title="Enter your Fedex Password." onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>	
									</a>	
				                   <div class="maintext_inner">Test Fedex Password : wQYp3s0PqmZYSM9piA7EdvWhJ</div>
								</span>							
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>


                                                  <!--****Shipping Label Fedex enable********************-->
                                                  <div id="grid_admin" class="fedexaccno" style="display:none">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Enable Fedex Shipping Label</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">

									<div class="maintext_inner">
									<input type="radio" name="allow_fedexlabel" value="Y" <?php if($data["allow_fedexlabel"] == "Y"){ ?> checked <?php } ?>>Yes &nbsp;
									<input type="radio" name="allow_fedexlabel" value="N"  <?php if($data["allow_fedexlabel"] == "N"){ ?> checked <?php } ?>>No
									<a href="#" class="tooltip" title="Enable this if you wish to use Fedex Shipping Label Creation.
									<br><b>Shipping label :- </b>A label attached to a shipping unit, containing certain data." onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>
									</a>
								  </div>	
				                 
								</span>
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
						  
						  
						      <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">&nbsp;</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">&nbsp;</span>							
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
						  
						
						  <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner"><strong>Canada Post Shipping Service Required</strong></p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="checkbox" name="shipping_require_canada"  id="shipping_require_canada" value="Y" onClick="javascript:return  shipShowHide('post');"<?php if($data['shipping_require_canada']=='Y'){?> checked <?php } ?>>
									<a href="#" class="tooltip" title="Enable this check box if you wish to allow Canada Post Shipping Service." onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>	
									</a>	
								</span>							
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>


						  </div>
						  
						  <div id="grid_admin" class="canadapost" style="display:none;">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Canada Post Merchant Id</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input name="canadamerchantid" type="text" class="box2_admin" size="27" id="canadamerchantid" value="<?php echo Sanitize::html($data['canadamerchantid']);?>"> 
									<a href="#" class="tooltip" title="Enter your Canada Post Merchant Id." onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>	
									</a>	
		                           <div class="maintext_inner">Test Merchant Id: CPC_DEMO_XML </div>
								</span>							
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
						
						  
						  
						  <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner"><strong>Australia Post Shipping Service Required</strong></p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="checkbox" name="shipping_require_australia" value="Y" <?php if($data['shipping_require_australia']=='Y'){?> checked <?php } ?>>
									<a href="#" class="tooltip" title="Enable this check box if you wish to allow Australia Post Shipping Service." onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>	
									</a>	
								</span>							
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div> 
						  
						   <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">&nbsp;</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<div align="center">
									<input type="button" value="Save" class="buttn_admin" onClick="validateShip(document.shipsetting);">&nbsp;&nbsp;
									<input type="button" value="Back" class="buttn_admin" onClick="javascript:history.go(-1);"></div>
								</span>							
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
						  
           </div>
      </div>
</div>
</form>
<div align="left" class="float_clear1"></div>
</div>
 <div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif');?></div> 
 <style>
     .input select{
         float: left;
         margin-right: 5px;
     }
 </style>