<style type="text/css">
	.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
		margin-right: 300px!important ;
	}
</style>
<script type="text/javascript">
    function formatAddress() {
        var addressFormatted = '';
		var address1_value = $.trim($("#popup_address1").val());
		var address2_value = $.trim($("#popup_address2").val());
		var popup_city_value = $.trim($("#popup_city").val());
		var popup_state_value = $.trim($("#popup_state").val());
		var popup_country_value = $.trim($("#popup_country").val());
		var popup_pin_value = $.trim($("#popup_pin").val());
		
        var popup_address1 = false;
        var popup_address2 = false;
        var popup_city = false;
        var popup_state = false;
        var popup_country = false;
        var popup_pin = false;
        if(address1_value !='') {
            addressFormatted +=  address1_value;
            popup_address1 = true;
        }
        if(address2_value !='') {
            if(popup_address1) {
                addressFormatted += "<br/>" + address2_value;
            }else {
                addressFormatted += address2_value;
            }
            popup_address2 = true;
        }
        if(popup_pin_value !='') {
            if(popup_address1 || popup_address2 || popup_city || popup_state || popup_country) {
                addressFormatted += "<br/>" + popup_pin_value;
            }else {
                addressFormatted += popup_pin_value;
            }
        }
        if(popup_city_value !='') {
            if(popup_address1 || popup_address2) {
                addressFormatted += "<br/>" + popup_city_value;
            }else {
                addressFormatted += popup_city_value;
            }
            popup_city = true;
        }
        if(popup_state_value !='') {
            if(popup_address1 || popup_address2 || popup_city) {
                addressFormatted += "<br/>" + popup_state_value;
            }else {
                addressFormatted += popup_state_value;
            }
            popup_state = true;
        }
        if(popup_country_value !='') {
            if(popup_address1 || popup_address2 || popup_city || popup_state) {
                addressFormatted += "<br/>" + popup_country_value;
            }else {
                addressFormatted += popup_country_value;
            }
            popup_country = true;
        }
		
        $("#textAddress").html('');
        $("#textAddress").html(addressFormatted);
        $('#SurveyMainForm_delivery_address').html($("#textAddress").html().replace(/<br>/g, '\n'));
    }
    
    function sendCombination(value)  {
        $.ajax({
            url: '<?php echo Yii::app()->baseUrl; ?>/survey/getcategorycombination',
            type: 'POST',
            data: 'combination='+value,
            success: function(msg){
                    
                var obj = jQuery.parseJSON(msg);
                $('#SurveyMainForm_request_category').val(obj.cat);
                $('#SurveyMainForm_request_sub_category').val(obj.subcat);
                $('#SurveyMainForm_request_location').val(obj.loc);
                $('#SurveyMainForm_request_service_level').val(obj.level);
                $( "#pick-category-modal" ).dialog( "close" );
            }
        });
    }
    function customRange(a) {  
		var b = new Date();  
		var c = new Date(b.getFullYear(), b.getMonth(), b.getDate());  
		if (a.id == 'SurveyMainForm_bid_end_date') {  
			if ($('.txt_calender1').datepicker('getDate') != null) {  
				c = $('.txt_calender1').datepicker('getDate');  
			}  
		} else if(a.id == 'SurveyMainForm_end_date') {
			if ($('.txt_calender3').datepicker('getDate') != null) {  
				c = $('.txt_calender3').datepicker('getDate');  
			}  
		}  
		return {  
			minDate: c  
		}  
	}
	
    $(document).ready(function() {
		
		//Date Picker Section STARTS
		$( ".txt_calender1, .txt_calender2, .txt_calender3, .txt_calender4" ).datepicker({
			minDate: 0,
			dateFormat: '<?php if(isset(Yii::app()->session['jsDateFormat'])) { echo Yii::app()->session['jsDateFormat'];} else { echo 'm/d/Y';} ?>',
			beforeShow: customRange
		})
		$('.formicon').click(function() {
			$(this).parent().prev().find('.textfield').datepicker("show");
		}); 
		//Date Picker Section ENDS
        $( "#address_popup_form").dialog({autoOpen: false, minWidth: 700, modal:true,
            show: "blind", hide: "explode", draggable: false,
            buttons : {"OK" : function(){$(this).dialog('close'); formatAddress(); },
                "Cancel" : function() {$(this).dialog("close");}
            }
        });
        $("#SurveyMainForm_delivery_address").focus(function () {
            $( "#address_popup_form" ).dialog( "open" );
			
        });
                
        $( "#pick-category-modal" ).dialog({autoOpen: false, minWidth: 730, modal:true, show: "fadeIn", hide: "fade", draggable: false, resizable: false});
        //var surveyId = '';
        
        $('#pick-category').click(function(){
            $( "#pick-category-modal" ).dialog( "open" );
        });
        
        //        $('#response-grid table tr td img').click(function()    {
        //            var dropBoxId = $(this).attr('alt');
        //            dropBoxId += "-" + $("#" + dropBoxId + " option:selected").val();
        //            alert(dropBoxId);
        //            sendCombination(dropBoxId);
        //        });
        
        $('#response-grid table img').bind('click', function() {
            var dropBoxId = $(this).attr('alt');
            dropBoxId += "-" + $("#" + dropBoxId + " option:selected").val();
            sendCombination(dropBoxId);
        });
    });
</script>
<?php
$form = $this->beginWidget('CActiveForm', array(
    'id' => 'survey-main-form',
    'htmlOptions' => array('enctype' => 'multipart/form-data'),
    'enableClientValidation' => false,
    'clientOptions' => array(
        'validateOnSubmit' => false,
    ),
        ));
?>  
<table width="100%" cellpadding="0" cellspacing="0">
    <!--form-->
    <tr>
        <td>
            <table class="formmaintable" border="0" cellspacing="20" cellpadding="0">
                <!--field set 1-->
                <tr>
                    <td>
                        <table class="formholder" width="100%" border="0" cellspacing="0" cellpadding="5">
                            <!--header row-->
                            <tr>
                                <td class="headerrow">Customer Information</td>
                            </tr>
                            <!--form row-->
                            <tr>
                                <td>
                                    <!--form table-->
                                    <table class="formtable" width="100%" border="0" cellspacing="5">
                                        <tr>
                                            <td class="alignright"><?php echo $form->labelEx($model, 'customer_organisation_name'); ?>:</td>
                                            <td>
                                                <span><?php echo $form->textField($model, 'customer_organisation_name', array('class' => 'textfield')); ?></span><span><?php echo $form->error($model, 'customer_organisation_name'); ?></span>
                                            </td>
                                            <td class="alignright"><?php echo $form->labelEx($model, 'customer_organisation_location'); ?>:</td>
                                            <td>
                                                <span><?php echo $form->textField($model, 'customer_organisation_location', array('class' => 'textfield')); ?></span><span><?php echo $form->error($model, 'customer_organisation_location'); ?></span>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="alignright"><?php echo $form->labelEx($model, 'customer_contact_person'); ?>:</td>
                                            <td>
                                                <span><?php echo $form->textField($model, 'customer_contact_person', array('class' => 'textfield')); ?></span>
                                                <span><?php echo $form->error($model, 'customer_contact_person'); ?></span>
                                            </td>
                                        </tr>
                                    </table><!--form table ends here-->
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <!--field set 2-->
                <tr>
                    <td>
                        <table class="formholder" width="100%" border="0" cellspacing="0" cellpadding="5">
                            <!--header row-->
                            <tr>
                                <td class="headerrow">Request Information</td>
                            </tr>
                            <!--form row-->
                            <tr>
                                <td>
                                    <!--form table-->
                                    <table class="formtable" width="100%" border="0" cellspacing="5">
                                        <tr>
                                            <td class="alignright"><?php echo $form->labelEx($model, 'name'); ?>:</td>
                                            <td colspan="3">
                                                <span><?php echo $form->textField($model, 'name', array('class' => 'textfield')); ?></span>
                                                <span><?php echo $form->error($model, 'name'); ?></span>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="alignright"><?php echo $form->labelEx($model, 'description'); ?>:</td>
                                            <td colspan="3">
                                                <span><?php echo CHtml::activeTextArea($model, 'description', array('class' => 'textarea')); ?></span>
                                                <span><?php echo $form->error($model, 'description'); ?></span>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td valign="top" class="alignright"><?php echo $form->labelEx($model, 'bid_start_date'); ?>:</td>
                                            <td>
                                                <table class="twocolumn" width="100%" border="0" cellspacing="0">
                                                    <tr>
                                                        <td>
                                                            <span><?php echo $form->textField($model, 'bid_start_date', array('class' => 'textfield txt_calender1', 'readonly' => 'readonly')); ?></span>
                                                        </td>
                                                        <td><div class="formicon"><img src="<?php echo Yii::app()->request->baseUrl; ?>/themes/default/media/images/calender.png" alt=""/></div></td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2"><?php echo $form->error($model, 'bid_start_date'); ?></td>
                                                    </tr>
                                                </table>   
                                            </td>
                                            <td valign="top" class="alignright"><?php echo $form->labelEx($model, 'bid_end_date'); ?>:</td>
                                            <td>
                                                <table class="twocolumn" width="100%" border="0" cellspacing="0">
                                                    <tr>
                                                        <td>
                                                            <span><?php echo $form->textField($model, 'bid_end_date', array('class' => 'textfield txt_calender2', 'readonly' => 'readonly')); ?></span>
                                                        </td>
                                                        <td><div class="formicon"><img src="<?php echo Yii::app()->request->baseUrl; ?>/themes/default/media/images/calender.png" alt=""/></div></td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2"><?php echo $form->error($model, 'bid_end_date'); ?></td>
                                                    </tr>
                                                </table>   
                                            </td>
                                        </tr>
                                        <tr>
                                            <td valign="top" class="alignright"><?php echo $form->labelEx($model, 'start_date'); ?>:</td>
                                            <td>
                                                <table class="twocolumn" width="100%" border="0" cellspacing="0">
                                                    <tr>
                                                        <td>
                                                            <span><?php echo $form->textField($model, 'start_date', array('class' => 'textfield txt_calender3', 'readonly' => 'readonly')); ?></span>
                                                        </td>
                                                        <td><div class="formicon"><img src="<?php echo Yii::app()->request->baseUrl; ?>/themes/default/media/images/calender.png" alt=""/></div></td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2"><?php echo $form->error($model, 'start_date'); ?></td>
                                                    </tr>
                                                </table>   
                                            </td>
                                            <td valign="top" class="alignright"><?php echo $form->labelEx($model, 'end_date'); ?>:</td>
                                            <td>
                                                <table class="twocolumn" width="100%" border="0" cellspacing="0">
                                                    <tr>
                                                        <td>
                                                            <span><?php echo $form->textField($model, 'end_date', array('class' => 'textfield txt_calender4', 'readonly' => 'readonly')); ?></span>
                                                        </td>
                                                        <td><div class="formicon"><img src="<?php echo Yii::app()->request->baseUrl; ?>/themes/default/media/images/calender.png" alt=""/></div></td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2"><?php echo $form->error($model, 'end_date'); ?></td>
                                                    </tr>
                                                </table>   
                                            </td>
                                        </tr>
                                        <tr>
                                            <td valign="top" class="alignright"><?php echo $form->labelEx($model, 'early_response_priority'); ?>:</td>
                                            <td>
                                                <div class="databoxradio">
                                                    <?php
                                                    $earlyResponseStatus = array('Y' => 'Yes', 'N' => 'No');
                                                    echo $form->radioButtonList($model, 'early_response_priority', $earlyResponseStatus, array('separator' => "</div><div class=\"databoxradio\">", 'labelOptions' => array('class' => 'radiolabel'), 'style' => 'float:left;'));
                                                    ?>
                                                </div>
                                            </td>
                                            <td valign="top" class="alignright"><?php echo $form->labelEx($model, 'sub_contract_accepted'); ?>:</td>
                                            <td>
                                                <div class="databoxradio">
                                                    <?php
                                                    $subContractStatus = array('Y' => 'Yes', 'N' => 'No');
                                                    echo $form->radioButtonList($model, 'sub_contract_accepted', $subContractStatus, array('separator' => "</div><div class=\"databoxradio\">", 'labelOptions' => array('class' => 'radiolabel'), 'style' => 'float:left;'));
                                                    ?>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td> </td>
                                            <td valign="top"><?php echo $form->error($model, 'early_response_priority'); ?></td>
                                            <td> </td>
                                            <td valign="top"><?php echo $form->error($model, 'sub_contract_accepted'); ?></td>
                                        </tr>
                                        <tr>
                                            <td class="alignright"><?php echo $form->labelEx($model, 'delivery_address'); ?>:</td>
                                            <td colspan="3"><?php echo CHtml::activeTextArea($model, 'delivery_address', array('class' => 'textarea-large')); ?></td>
                                        </tr>
                                    </table>
                                    <!--form table ends here-->
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <!--field set 3-->
                <tr>
                    <td>
                        <table class="formholder" width="100%" border="0" cellspacing="0" cellpadding="5">
                            <!--header row-->
                            <tr>
                                <td class="headerrow">
                                <table width="100%">
                                    <tr>
                                        <td align="left" valign="center">Request Category</td>
                                        <td align="right" valign="center"><?php echo CHtml::link('Pick Category', '', array('id' => 'pick-category', 'class' => 'pick_category')) ?></td>
                                    </tr>
                                </table>
                                 </td>
                            </tr>
                            <!--form row-->
                            <tr>
                                <td>
                                    <!--form table-->
                                    <table class="formtable" width="100%" border="0" cellspacing="5">
                                        <tr>
                                            <td valign="top" class="alignright"><?php echo $form->labelEx($model, 'request_category'); ?>:</td>
                                            <td>                                               
                                                <span><?php
                                                    $this->widget('CAutoComplete', array(
                                                        'name' => CHtml::activeName($model, 'request_category'),
                                                        'value' => ($model->request_category) ? $model->request_category : '',
                                                        'url' => array('survey/autocompletecategory'),
                                                        'cssFile' => 'autocomplete.css',
                                                        'minChars' => 1,
                                                        'delay' => 100,
                                                        'matchCase' => false,
                                                        'htmlOptions' => array('size' => '40', 'onBlur' => 'changeCategoryValue();'),
                                                        'methodChain' => ".result(function(event,item){\$(\"#request_category\").val(item[1]);})",
                                                    ));
                                                    ?>       
                                                    <?php echo CHtml::hiddenField('hiddenCategory'); ?>
                                                </span>
                                                <span>
                                                    <?php echo $form->error($model, 'request_category'); ?>
                                                </span>
                                            </td>
                                            <td valign="top" class="alignright"><?php echo $form->labelEx($model, 'request_sub_category'); ?>:</td>
                                            <td>
                                                <span>
                                                    <?php
                                                    $this->widget('CAutoComplete', array(
                                                        'name' => CHtml::activeName($model, 'request_sub_category'),
                                                        'value' => ($model->request_sub_category) ? $model->request_sub_category : '',
                                                        'url' => array('survey/autocompletesubcategory'),
                                                        'cssFile' => 'autocomplete.css',
                                                        'minChars' => 1,
                                                        'delay' => 100,
                                                        'matchCase' => false,
                                                        'htmlOptions' => array('size' => '40'),
                                                        'methodChain' => ".result(function(event,item){\$(\"#request_sub_category\").val(item[1]);})",
                                                    ));
                                                    ?>
                                                </span>
                                                <span>
                                                    <?php echo $form->error($model, 'request_sub_category'); ?>   
                                                </span>                                              
                                            </td>
                                        </tr>
                                        <tr>
                                            <td valign="top" class="alignright"><?php echo $form->labelEx($model, 'request_location'); ?>:</td>
                                            <td>
                                                <span>                                                    
                                                    <?php
                                                    $this->widget('CAutoComplete', array(
                                                        'name' => CHtml::activeName($model, 'request_location'),
                                                        'value' => ($model->request_location) ? $model->request_location : '',
                                                        'url' => array('survey/autocompletelocation'),
                                                        'cssFile' => 'autocomplete.css',
                                                        'minChars' => 1,
                                                        'delay' => 100,
                                                        'matchCase' => false,
                                                        'htmlOptions' => array('size' => '40'),
                                                        'methodChain' => ".result(function(event,item){\$(\"#request_location\").val(item[1]);})",
                                                    ));
                                                    ?>                                                    
                                                </span>
                                                <span>
                                                    <?php echo $form->error($model, 'request_location'); ?>
                                                </span>
                                            </td>
                                            <td valign="top" class="alignright"><?php echo $form->labelEx($model, 'request_service_level'); ?>:</td>
                                            <td>
                                                <span>
                                                    <?php
                                                    $this->widget('CAutoComplete', array(
                                                        'name' => CHtml::activeName($model, 'request_service_level'),
                                                        'value' => ($model->request_service_level) ? $model->request_service_level : '',
                                                        'url' => array('survey/autocompleteservicelevel'),
                                                        'cssFile' => 'autocomplete.css',
                                                        'minChars' => 1,
                                                        'delay' => 100,
                                                        'matchCase' => false,
                                                        'htmlOptions' => array('size' => '40'),
                                                        'methodChain' => ".result(function(event,item){\$(\"#request_service_level\").val(item[1]);})",
                                                    ));
                                                    ?>                                                    
                                                </span>
                                                <span>
                                                    <?php echo $form->error($model, 'request_service_level'); ?>
                                                </span>
                                            </td>
                                        </tr>
                                    </table><!--form table ends here-->
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <!--field set 4-->
                <tr>
                    <td>
                        <table class="formholder" width="100%" border="0" cellspacing="0" cellpadding="5">
                            <!--header row-->
                            <tr>
                                <td class="headerrow"><div class="textbold12">Attached Document Reference</div></td>
                            </tr>
                            <!--form row-->
                            <tr>
                                <td>
                                    <!--form table-->
                                    <table width="100%" border="0" cellspacing="5">
                                        <!--attahment 1-->
                                        <?php /* ?> <tr>
                                          <td align="center" valign="middle">
                                          <div class="attachmentholder">
                                          <div class="attachmentlink"><a href="#">Attachment 1</a></div>
                                          <div class="attachmentdelete"><a href="#"><img title="Delete" src="<?php echo Yii::app()->request->baseUrl; ?>/media/images/trash.png" alt="delete" /></a></div>
                                          </div>
                                          </td>
                                          </tr><?php */ ?>
                                        <!--upload field-->
                                        <tr>
                                            <td align="center" valign="middle">
                                                <div class="uploadcontentholder">
                                                    <div class="floatleft">
                                                        <div align="right" style="font-size:9px; padding-right:70px;">Allowed Extensions (<?php echo $this->multiUploadFilesAllowed;?>)</div>
                                                        <div class="attachmentlabel"><?php echo $form->labelEx($model, 'attachment'); ?>:</div>
                                                        <div class="attachmentbox">
                                                            <?php
                                                            $this->widget('CMultiFileUpload', array(
                                                                'name' => 'files',
                                                                'accept' => $this->multiUploadFilesAllowed,
                                                                'max' => 10,
                                                                'remove' => Yii::t('ui', '<div><img  title="Delete" style="float:left;padding-right:5px;" src=' . Yii::app()->request->baseUrl . '/media/images/trash.png /></div>'),
                                                                //'denied'=>'', message that is displayed when a file type is not allowed
                                                                //'duplicate'=>'', message that is displayed when a file appears twice
                                                                'htmlOptions' => array('size' => 25),
                                                            ));
                                                            ?>
                                                            <div class="attachmentholder">
                                                                <?php
                                                                if (count($attachmentModel) > 0)
                                                                {
                                                                    foreach ($attachmentModel as $attachments)
                                                                    {
                                                                        $fileName = explode('_', $attachments->attachment_name, 4);
                                                                        echo "<div class=clear></div><div class='attachmentsingle'><a attachemnt_id=" . $attachments->id . " class='remove_attachment' href='#files_wrap' class='MultiFile-remove'><img title='Delete' style='float:left;padding-right:5px;' src=" . Yii::app()->request->baseUrl . "/media/images/trash.png /></a><div style='float:left;'>" . $fileName['3'] . "</div></div>";
                                                                    }
                                                                }
                                                                ?>
                                                                <?php echo CHtml::hiddenField('hiddenRemovedFiles'); ?>
                                                            </div>                                                          
                                                        </div>
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <!--button-->
    <tr>
        <td align="center" valign="middle">
		<?php if($is_question_exists==1){ $width  = '80%';}else{$width  = '50%';}?>
			<div  style="float:left;width:<?php echo $width;?>">
				<div class="surveybuttons"><?php  if(in_array('38',$this->getUserPrivileges()) && isset($_GET['surveyId'])){  
				echo CHtml::Button('Save as Draft', array('class' => 'buttons', 'onClick' => 'window.location.href="'.Yii::app()->createAbsoluteUrl("survey").'/preview/surveyId/'.$_GET['surveyId'].'"'));}
				 ?></div>
				<?php if($is_question_exists==1){?>
                
                <div class="surveybuttons"><?php  if(in_array('38',$this->getUserPrivileges())){  
				echo CHtml::Button('Create Test Link', array('class' => 'buttons', 'id' => 'btn_test_link')); }
				?></div>
				<div class="surveybuttons"><?php  if(in_array('38',$this->getUserPrivileges())){ 
				echo CHtml::Button('Request Preview', array('class' => 'buttons', 'onClick' => 'isQuestionExist("'.Yii::app()->createAbsoluteUrl("survey").'/preview/surveyId/'.$_GET['surveyId'].'");'));}
				 ?></div>
                <div class="surveybuttons"><?php  if(in_array('38',$this->getUserPrivileges())){ 
				 echo CHtml::Button('Send Request', array('class' => 'buttons', 'onClick' => 'isQuestionExist("'.Yii::app()->createAbsoluteUrl("suppliers").'/invite/surveyId/'.$_GET['surveyId'].'");'));}
				  ?></div>
				  <?php }?>
				  <div class="surveybuttons"><?php
				 if(in_array('34',$this->getUserPrivileges())){ 
            echo CHtml::submitButton('Save & Continue', array('class' => 'buttons'));
            }
				 ?></div>
				 <input type="hidden" id="is_question_exists" value="<?php echo $is_question_exists?>" />
            </div>
			<div id="test_link_box" title="Test Link" class="popupinfoholder">
				<?php echo Yii::app()->createAbsoluteUrl($surveyLink,array('key'=>$testLinkEncrypted)); ?>
			</div>
    	</td>
    </tr>
</table>
<?php $this->endWidget(); ?>  
<div id="address_popup_form" title="Address">
    <form name="frm_adress" id="frm_address">
        <fieldset>
        <div style="width:700px; margin-left:-166px;">
        <table class="formtable" width="50%" border="0" cellspacing="5">
            <tr><td class="alignright"><label for="name">Address line 1:</label></td>
            <td><input type="text" name="popup_address1" id="popup_address1" class="text ui-widget-content ui-corner-all textfield" /></td></tr>
            <tr><td class="alignright"><label for="email">Address line 2:</label></td>
            <td><input type="text" name="popup_address2" id="popup_address2" value="" class="text ui-widget-content ui-corner-all textfield" /></td></tr>
            <tr><td class="alignright"><label for="password">Zip/Pin:</label></td>
            <td><input type="text" name="popup_pin" id="popup_pin" value="" class="text ui-widget-content ui-corner-all textfield" /></td></tr>
            <tr><td class="alignright"><label for="password">City:</label></td>
            <td><input type="text" name="popup_city" id="popup_city" value="" class="text ui-widget-content ui-corner-all textfield" /></td></tr>
            <tr><td class="alignright"><label for="password">State:</label></td>
            <td><input type="text" name="popup_state" id="popup_state" value="" class="text ui-widget-content ui-corner-all textfield" /></td></tr>
            <tr><td class="alignright"><label for="password">Country:</label></td>
            <td><input type="text" name="popup_country" id="popup_country" value="" class="text ui-widget-content ui-corner-all textfield" /></td></tr>
            </table>
            </div>
        </fieldset>
    </form>
</div>
<div id="textAddress" style="display:none;"></div>
<div id="pick-category-modal" title="Pick Category" class="popupinfoholder2">
    <?php echo CHtml::hiddenField('paginationstatus', ''); ?>
    <div style="width:700px; height:auto;">
        <?php
        $widget = $this->widget('zii.widgets.grid.CGridView', array(
            'id' => 'response-grid',
            'dataProvider' => $pickdataset->pickCategorylistingForMain(),
            'cssFile' => Yii::app()->baseUrl . '/media/css/gridview.css',
            'summaryText' => '',
            'ajaxUpdate' => 'response-grid',
            'enablePagination' => true,
            'pager' => array(
                'class' => 'LinkPager',
                'cssFile' => false,
                'header' => false,
                'firstPageLabel' => 'First',
                'prevPageLabel' => 'Previous',
                'nextPageLabel' => 'Next',
                'lastPageLabel' => 'Last',
            ),
            'columns' => array(
                array(
                    'name' => 'id',
                    'header' => '#',
                    'value' => '$this->grid->dataProvider->pagination->currentPage * $this->grid->dataProvider->pagination->pageSize + ($row+1)',
                ),
                array(
                    'type' => 'raw',
                    'name' => 'categoryExt',
                    'header' => 'Category',
                ),
                array(
                    'type' => 'raw',
                    'header' => 'Sub Category',
                    'value' => '$data->subCategory->name',
                ),
                array(
                    'type' => 'raw',
                    'name' => 'locationExt',
                    'header' => 'Location',
                ),
                array(
                    'type' => 'raw',
                    'header' => 'Name',
                    'value' => 'CHtml::dropDownList($data->corporate_id."-".$data->category_id."-".$data->sub_category_id."-".$data->location_id,"",popDropBox($data->masterCategoryServiceLevels), array("class" => "listbox"), array("empty" => "Select a Location"))',
                ),
                array(
                    'type' => 'raw',
                    'header' => 'Pick',
                    'value' => 'CHtml::image(Yii::app()->baseUrl . "/media/images/edit_icon.png",$data->corporate_id."-".$data->category_id."-".$data->sub_category_id."-".$data->location_id,array("title" => "Select this Combination"))',
                ),
            ),));
        function popDropBox($data)
        {
            $list = array();
            foreach ($data as $row)
            {
                $list[$row->serviceLevel->id] = $row->serviceLevel->name;
            }
            return $list;
        }
        ?>
        <div class="grid-view-footer">
            <div class="paginationholder">
                <div id="pagination">
                    <?php //$widget->renderPager(); ?>
                </div>
            </div>
        </div>
    </div>
</div>
This problem exists only in IE