/**
     * Audio  field
     */
    public static function AudioInterface($customField, $inputName, $groupCounter, $fieldCounter)
    {
        global $mf_domain;
        $idField = RCCWP_WritePostPage::changeNameInput($inputName);
        $customFieldId = '';
        $freshPageFolderName = dirname(plugin_basename(__FILE__));
        $requiredClass = "";
        $mf_post_id = apply_filters('mf_source_post_data', @$_REQUEST['post']);
        if ($customField->required_field) {
            $requiredClass = "field_required";
        }
        if (isset($mf_post_id)) {
            $customFieldId = $customField->id;
            $valueOriginal = RCCWP_CustomField::GetCustomFieldValues(true, $mf_post_id, $customField->name, $groupCounter, $fieldCounter);
            $path = MF_FILES_URI;
            if (empty($valueOriginal)) {
                $valueOriginal = '';
            }
            if (empty($valueOriginalRelative)) {
                $valueOriginalRelative = '';
            }
            ${$valueOriginalRelative} = $valueOriginal;
            $valueOriginal = $path . $valueOriginal;
            if (!empty($valueOriginal)) {
                $value = stripslashes(trim("\\<div  id='obj-{$idField}' style=\\'width:260px;padding-top:3px;\\'\\>\\<object classid=\\'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\\' codebase='\\http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\\' width=\\'95%\\' height=\\'20\\' wmode=\\'transparent\\' \\>\\<param name=\\'movie\\' value=\\'" . MF_URI . "js/singlemp3player.swf?file=" . urlencode($valueOriginal) . "\\' wmode=\\'transparent\\' /\\>\\<param name=\\'quality\\' value=\\'high\\' wmode=\\'transparent\\' /\\>\\<embed src=\\'" . MF_URI . "js/singlemp3player.swf?file=" . urlencode($valueOriginal) . "' width=\\'100\\%\\' height=\\'20\\' quality=\\'high\\' pluginspage=\\'http://www.macromedia.com/go/getflashplayer\\' type=\\'application/x-shockwave-flash\\' wmode=\\'transparent\\' \\>\\</embed\\>\\</object\\>\\</div\\><br />"));
            }
        }
        // If the field is at right, set a constant width to the text box
        $field_group = RCCWP_CustomGroup::Get($customField->group_id);
        $urlInputSize = false;
        $is_canvas = 0;
        if ($field_group->at_right) {
            $urlInputSize = 5;
            $is_canvas = 1;
        }
        ?>
		<p class="error_msg_txt upload-msg" id="upload_progress_<?php 
        echo $idField;
        ?>
" style="display:none;"></p>
		<script type="text/javascript">
			//this script is for remove the audio file using ajax
			remove_audio = function(){
				if(confirm("<?php 
        _e('Are you sure?', $mf_domain);
        ?>
")){
					//get the name to the image
				  	//id = jQuery(this).attr('id').split("-")[1];
          			pattern = /remove\-([a-z0-9\-\_]+)/i;
					id = jQuery(this).attr("id");
          			id = pattern.exec(id);
          			id = id[1];

					file = jQuery('#'+id).val(); 

					delete_field = jQuery('#magicfields_remove_files').val();
					if(delete_field != ''){
						jQuery('#magicfields_remove_files').val(delete_field+"|||"+file);
					}else{
						jQuery('#magicfields_remove_files').val(file);
					}

					// set the value to empty
					jQuery('#obj-'+id).empty();
					jQuery('#actions-'+id).empty();
					jQuery('#remove-'+id).empty();
					jQuery('#'+id).val("");
					jQuery('#'+id).closest(".mf-field").find(".ajax-upload-list").html('');
				} 
			}

			jQuery(document).ready(function(){
				jQuery("#remove-<?php 
        echo $idField;
        ?>
").click(remove_audio);
			});
		</script>
		
		<div class="mf-audio-value-actions">
		<?php 
        if (!empty(${$valueOriginalRelative})) {
            echo '<div class="mf-audio-value">' . $value . '</div>';
            echo "<div id='actions-{$idField}' class='actions-audio'><a href='javascript:void(0);' id='remove-{$idField}' class='remove-audio'>" . __("Delete", $mf_domain) . "</a></div>";
        } else {
            echo '<div class="mf-audio-value"></div>';
            echo "<div id='actions-{$idField}' class='actions-audio' style='display: none'><a href='javascript:void(0);' id='remove-{$idField}' class='remove-audio'>" . __("Delete", $mf_domain) . "</a></div>";
        }
        if (empty($valueOriginalRelative)) {
            $valueOriginalRelative = '';
        }
        ?>
	  </div>
	  <!-- /.mf-audio-value-actions -->
	  
		<div class="mf_custom_field">
		<input tabindex="3" 
			id="<?php 
        echo $idField;
        ?>
" 
			name="<?php 
        echo $inputName;
        ?>
" 
			type="hidden" 
			class="<?php 
        echo $requiredClass;
        ?>
"
			size="46"
			value="<?php 
        echo ${$valueOriginalRelative};
        ?>
"
			<?php 
        if ($customField->required_field) {
            echo 'validate="required:true"';
        }
        ?>
	
			/>
	
		<?php 
        // adding the SWF upload
        include_once "RCCWP_SWFUpload.php";
        RCCWP_SWFUpload::Body($inputName, 2, $is_canvas, $urlInputSize);
        ?>
		</div>
		<?php 
        if ($customField->required_field) {
            ?>
			<div class="mf_message_error"><label for="<?php 
            echo $inputName;
            ?>
" class="error_magicfields error"><?php 
            _e("This field is required", $mf_domain);
            ?>
.audio</label></div>
		<?php 
        }
    }
    /**
     * Audio  field
     */
    function AudioInterface($customField, $inputName, $groupCounter, $fieldCounter)
    {
        global $mf_domain;
        $customFieldId = '';
        $freshPageFolderName = dirname(plugin_basename(__FILE__));
        if ($customField->required_field) {
            $requiredClass = "field_required";
        }
        if (isset($_REQUEST['post'])) {
            $customFieldId = $customField->id;
            $valueOriginal = RCCWP_CustomField::GetCustomFieldValues(true, $_REQUEST['post'], $customField->name, $groupCounter, $fieldCounter);
            $path = MF_FILES_URI;
            if (empty($valueOriginal)) {
                $valueOriginal = '';
            }
            if (empty($valueOriginalRelative)) {
                $valueOriginalRelative = '';
            }
            ${$valueOriginalRelative} = $valueOriginal;
            $valueOriginal = $path . $valueOriginal;
            if (!empty($valueOriginal)) {
                $value = stripslashes(trim("\\<div  id='obj-{$inputName}' style=\\'width:260px;padding-top:3px;\\'\\>\\<object classid=\\'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\\' codebase='\\http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\\' width=\\'95%\\' height=\\'20\\' wmode=\\'transparent\\' \\>\\<param name=\\'movie\\' value=\\'" . MF_URI . "js/singlemp3player.swf?file=" . urlencode($valueOriginal) . "\\' wmode=\\'transparent\\' /\\>\\<param name=\\'quality\\' value=\\'high\\' wmode=\\'transparent\\' /\\>\\<embed src=\\'" . MF_URI . "js/singlemp3player.swf?file=" . urlencode($valueOriginal) . "' width=\\'100\\%\\' height=\\'20\\' quality=\\'high\\' pluginspage=\\'http://www.macromedia.com/go/getflashplayer\\' type=\\'application/x-shockwave-flash\\' wmode=\\'transparent\\' \\>\\</embed\\>\\</object\\>\\</div\\><br />"));
            }
        }
        // If the field is at right, set a constant width to the text box
        $field_group = RCCWP_CustomGroup::Get($customField->group_id);
        $urlInputSize = false;
        $is_canvas = 0;
        if ($field_group->at_right) {
            $urlInputSize = 5;
            $is_canvas = 1;
        }
        ?>
		<p class="error_msg_txt" id="upload_progress_<?php 
        echo $inputName;
        ?>
" style="visibility:hidden;height:0px"></p>
		<script type="text/javascript">
			//this script is for remove the audio file using ajax
			remove_audio = function(){
				if(confirm("<?php 
        _e('Are you sure?', $mf_domain);
        ?>
")){
					//get the name to the image
					id = jQuery(this).attr('id').split("-")[1];
					file = jQuery('#'+id).val(); 
					jQuery.get('<?php 
        echo MF_URI;
        ?>
RCCWP_removeFiles.php',{'action':'delete','file':file},
								function(message){
									//if(message =="true"){
										jQuery('#obj-'+id).empty();
										jQuery('#actions-'+id).empty();
										jQuery('#'+id).val("");
									//}
								});
				}						   
			}

			jQuery(document).ready(function(){
				jQuery("#remove-<?php 
        echo $inputName;
        ?>
").click(remove_audio);
			});
		</script>
		<?php 
        if (!empty(${$valueOriginalRelative})) {
            echo $value;
            echo "<div id='actions-{$inputName}'><a href='javascript:void(0);' id='remove-{$inputName}'>" . __("Delete", $mf_domain) . "</a></div>";
        }
        if (empty($valueOriginalRelative)) {
            $valueOriginalRelative = '';
        }
        ?>
		<div class="mf_custom_field">
		<input tabindex="3" 
			id="<?php 
        echo $inputName;
        ?>
" 
			name="<?php 
        echo $inputName;
        ?>
" 
			type="hidden" 
			class="<?php 
        echo $requiredClass;
        ?>
"
			size="46"
			value="<?php 
        echo ${$valueOriginalRelative};
        ?>
"
			<?php 
        if ($customField->required_field) {
            echo 'validate="required:true"';
        }
        ?>
	
			/>
	
		<?php 
        // adding the SWF upload
        include_once "RCCWP_SWFUpload.php";
        RCCWP_SWFUpload::Body($inputName, 2, $is_canvas, $urlInputSize);
        ?>
		</div>
		<?php 
        if ($customField->required_field) {
            ?>
			<div class="mf_message_error"><label for="<?php 
            echo $inputName;
            ?>
" class="error_magicfields error">This field is required.audio</label></div>
		<?php 
        }
    }
\t\t<input tabindex="3" 
\t\t\tid="{$varName}" 
\t\t\tname="{$varName}" 
\t\t\ttype="hidden" 
\t\t\tsize="46"
\t\t\tonchange=""
\t\t\tvalue="{$valueRelative}"
\t\t\t/>
\t\t<p id="upload_progress_{$varName}" style="visibility:hidden;height:0px"></p>

EOF;
        ?>

		<?php 
        include_once "RCCWP_SWFUpload.php";
        RCCWP_SWFUpload::Body($varName, 0, 1, 10);
        $content = "";
    } elseif (strtolower($variable->type) == 'gmodule') {
        //$variable->value WILL THIS BE THE XML FILE?
        $xmlfile = 'http://www.google.com/ig/modules/datetime.xml';
        $url = 'http://gmodules.com/ig/creator?synd=open&url=' . $xmlfile;
        echo '<object id="gmodule_content" data="' . $url . '" type="text/html"></object>';
    } elseif (strtolower($variable->type) == 'gmodule_script') {
        echo '<input type="text" id="gmodule_script" value="' . $variable->value . '">';
    }
}
//if(count($variables) == 0) echo 'This plugin has no options (yes, it should be a block instead).';
$content .= '<input type="hidden" id="listcount" name="listcount" value="' . $counter . '">' . "\n";
$content .= '</form>' . "\n";
echo $content;
?>