<?php
  require('includes/application_top.php');
$pageName="standardSize";
  // fetches content for pagetext and slideshow
    require('contentFetch.php');
  
 if (isset($_POST['action']) && ($_POST['action'] == 'process')) {
    //$collar_size = tep_db_prepare_input($_POST['collarSize']);
    //$sleeve_length = tep_db_prepare_input($_POST['sleeveLength']);
    //$fit_style = tep_db_prepare_input($_POST['fitStyle']);
    
   //set_measurements();
  if( $shirt_mode ){
    $current_measurements=   &$_SESSION['current_shirt']['measurements'];
  }else{
    $current_measurements= &$_SESSION['measurements'] ;
  }
   
  $current_measurements['measurements_type']= array( "Measurements Type" ,"Standard Measurements" );
  $current_measurements['fit_style']= array( "Style" , $_POST['fit_style'] );
  $current_measurements['sleeve_length']= array( "Sleeve Length" ,  $_POST['sleeve_length'] );
  $current_measurements['collar_size']= array( "Collar Size"  , $_POST['collar_size'] );
        
    //echo $current_measurements['fit_style'];
   // echo $current_measurements['sleeve_length'];
    //echo $current_measurements['collar_size'];
 
    //$messageStack->add('standard_sizing', "Your preferences have been saved.");
    if( isset( $_POST['design_another'] ) || isset( $_POST['design_another_x'] )){
        tep_redirect( "shirtDesign.php" );
    }else{ //go to cart
        tep_redirect( $_POST['destination'] . ".php" );
    }
 }//action and process
    
    
    
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<meta name="description" content="<?=$metaDesc?>"/>

<title><?=$titleText?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<link rel="stylesheet" type="text/css" href="main.css">

<script src="scripts/renderPopup.js" type="text/javascript"></script>

<script language="javascript"><!--
function rowOverEffect(object) {
  if (object.className == 'moduleRow') object.className = 'moduleRowOver';
}

function rowOutEffect(object) {
  if (object.className == 'moduleRowOver') object.className = 'moduleRow';
}
//--></script>


<?
  require('measurementsFetch.php');
  ?>
  
  <script language="JavaScript">
     function setContext( fieldName ){
        //alert("setCheck "+ document.getElementById( field.name + "_check" ) );
        //header
        
        var url= slides[ fieldName ];
        //alert( "slideName: "+slideName+" url: "+url );
        var slideImg= document.getElementById( "slideImg" );
        
        if( slideImg.src != url )  slideImg.src = url;
    
    }//fn
</script>

</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" onload="setContext('normal');">

<!-- header //-->
<?php require('headerRegistration.php'); ?>
<!-- header_eof //-->

<!-- body //-->
 <form method=post action="standard_measurements.php">
<div class="loginContent">
            
            <div style="position:absolute;display:block;left:0px;margin-top:5px;width:60px">
            <img src="images/shirtDesign.gif">
            <img src="images/measurements/measurements.gif" style="margin-top:3px">
            </div>
            
            <div class="whiteContent"  style="height:630px">
            
                   <!--div class="measurementTotal"><span style="padding-right:10px;padding-top:10px;float:right"><?=$currencies->format($cart->show_total())?> US</span></div-->
                  
                    <div class="measurementOuter">
                        <div class="measurementOuterContent" style="height:480px" >
                        
                            <div class="measurementSmall">
                               
                                    <span class="up1" style="color: #333333;font-weight: bold;line-height:12px">Standard Sizing</span>
                                    
                                 
                                  <div class="labelDark">Collar Size:</div>
                                  <select name="collar_size">
                                    <option value="15">15 in / 38 cm</option>
                                    <option value="15.5">15.5 in / 39 cm</option>
                                    <option value="16">16 in / 41 cm</option>
                                    <option value="16.5">16.5 in / 42 cm</option>
                                    <option value="17">17 in / 43 cm</option>
                                    <option value="17.5">17.5 in / 44 cm</option>
                                    <option value="18">18 in / 46 cm</option>
                                    <option value="18.5">18.5 in / 47 cm</option>

                                  </select>
                                  
                                  <div class="labelDark">Sleeve Length:</div>
                                  <select name="sleeve_length">
                                       <option value="32">32 in / 81 cm</option>
                                       <option value="32.5">32.5 in / 83 cm</option>
                                       <option value="33">33 in / 84 cm</option>
                                       <option value="33.5">33.5 in / 85 cm</option>
                                       <option value="34">34 in / 86 cm</option>
                                       <option value="34.5">34.5 in / 87cm</option>
                                       <option value="35">35 in / 89 cm</option>
                                       <option value="36">36 in / 91 cm</option>
                                       <option value="36.5">36.5 in / 93 cm</option>
                                       <option value="37">37 in / 94 cm</option>
                                       <option value="37.5">37.5 in / 95 cm</option>
                                       <option value="38">38 in / 97 cm</option>
                                       
                                  </select>
                                  
                                  <br>
                                  
                                  <div class="labelDark">Fit Style:</div>
                                  <div class="redUnder" style="height:65px;width: 187px">
                                  <table class="radioTableNarrow" cellspacing=0 cellpadding=0>
                                        <tr height=10>
                                            <td>Traditional</td>
                                             <td width=20 valign=middle><input type=radio class="radio" name="fit_style" value="traditional"  onclick="setContext(this.value)"></td>
                                        </tr>
                                    </table>
                                    
                                    <table class="radioTableNarrow" cellspacing=0 cellpadding=0>
                                        <tr height=10>
                                            <td>Normal</td>
                                             <td width=20 valign=middle><input type=radio class="radio" name="fit_style" value="normal" checked  onclick="setContext(this.value)"></td>
                                        </tr>
                                    </table>
                                    
                                    
                                    
                                    <table class="radioTableNarrow" cellspacing=0 cellpadding=0>
                                        <tr height=10>
                                            <td>Athletic</td>
                                             <td width=20 valign=middle><input type=radio class="radio" name="fit_style" value="athletic" onclick="setContext(this.value)"></td>
                                        </tr>
                                    </table>
                                    
                                </div>
                                    <input type=hidden name="action" value="process">
                                     <input type=hidden name="measurements_type" value="standard">
                                     
                                     <br>
                                    <span onclick="showPopup()" class="dottedUnderline">Click here</span> for our sizing chart
                                     
                             </div>
                            
                            
                            <?php  if ($messageStack->size('standard_sizing') > 0) {?><div style="margin-top: 60px;width: 80%; float: left"><?php echo $messageStack->output('standard_sizing'); ?></div><?php  }?>
                            
                        </div>
                        
                    
           
            <div class="measurementsNavBtnLeft"><a href="measurements_home.php"><img  alt="continue" src="images/buttons/previousOff.gif" id="_header" onmouseover="javascript:this.src='images/buttons/previousOn.gif';" onmouseout="javascript:this.src='images/buttons/previousOff.gif';"></a></div>

                       <div class="measurementsNavBtnRight"><input type=image name="submit" value="shopping_cart" alt="checkout" src="images/buttons/checkoutOff.gif" id="_header" onmouseover="javascript:this.src='images/buttons/checkoutOn.gif';" onmouseout="javascript:this.src='images/buttons/checkoutOff.gif';"><input type=hidden name="destination" value="shopping_cart"></div>



</form>
                    </div>
           
           
            <!--div class="measurementRight"><?=$pageText?></div-->
            
            <div style="float:right; padding-right:60px;margin-top:97px;"><?=$pageText?></div>
    
    <!--/form-->
                  
                  <!--//////////////////-->
                    
                </div>
                
<!-- body_eof //-->

<!-- footer //-->
<?php include('footer.php'); ?>
<!-- footer_eof //-->

<div id="popup" class="popupInfo" style="display:none"><img src="images/measurements/sizing_chart.jpg"></div>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

