</div>											
								</div>
							</div>	
							<div id="tabs-5">
								<div class="box-content">
									<div class="form-group">
										<label class="col-sm-2 control-label">:isRealizedBy</label>
										<div class="col-sm-6">
											<select name="isRealizedBy[]" id="isRealizedBy" multiple="multiple" class="populate placeholder">
												<?php 
$sql_query = "SELECT * FROM DataFormat";
$results = mysql_query($sql_query, $db);
while ($result = mysql_fetch_array($results)) {
    $df_name = $result['name'];
    $df_id = $result['id'];
    if (getSelectedValue("MetadataSchema", $metadataSchemaId, "isRealizedBy", $df_id) > 0) {
        $sel = "selected";
    } else {
        $sel = "";
    }
    echo "<option value='" . $df_id . "' {$sel}>" . $df_name . "</option>\n";
}
?>
											</select>
										</div>
									</div>									
								</div>
							</div>							
							<div class="clearfix"></div>
							<div class="form-group">
								<div class="col-sm-offset-2 col-sm-2">
									</div>
								</div>
							</div>
							<div id="tabs-2">
								<div class="box-content">
									<div class="form-group">
										<label class="col-sm-2 control-label">:usesVocabulary</label>
										<div class="col-sm-6">
											<select name="usesVocabulary[]" id="usesVocabulary" multiple="multiple" class="populate placeholder">
												<?php 
$sql_query = "SELECT * FROM Vocabulary";
$results = mysql_query($sql_query, $db);
while ($result = mysql_fetch_array($results)) {
    $voc_name = $result['name'];
    $voc_id = $result['id'];
    if (getSelectedValue("DataFormat", $DataFormatId, "usesVocabulary", $voc_id) > 0) {
        $sel = "selected";
    } else {
        $sel = "";
    }
    echo "<option value='" . $voc_id . "' {$sel}>" . $voc_name . "</option>\n";
}
?>
											</select>
										</div>
									</div>									
								</div>
							</div>
							<div class="clearfix"></div>
							<div class="form-group">
								<div class="col-sm-offset-2 col-sm-2">
function getFoafAgents($table, $id, $propertyName)
{
    global $db;
    $sql_query = "SELECT * FROM foafAgent";
    $results = mysql_query($sql_query, $db);
    while ($result = mysql_fetch_array($results)) {
        $foaf_name = $result['name'];
        $foaf_id = $result['id'];
        if (getSelectedValue($table, $id, $propertyName, $foaf_id) > 0) {
            $sel = "selected";
        } else {
            $sel = "";
        }
        echo "<option value='" . $foaf_id . "' {$sel}>" . $foaf_name . "</option>\n";
    }
}
									</div>											
								</div>
							</div>	
							<div id="tabs-6">
								<div class="box-content">
									<div class="form-group">
										<label class="col-sm-2 control-label">:Distribution</label>
										<div class="col-sm-6">
											<select name="Distribution[]" id="Distribution" multiple="multiple" class="populate placeholder">
												<?php 
$sql_query = "SELECT * FROM Distribution";
$results = mysql_query($sql_query, $db);
while ($result = mysql_fetch_array($results)) {
    $dis_name = $result['name'];
    $dis_id = $result['id'];
    if (getSelectedValue("Dataset", $DatasetId, "Distribution", $dis_id) > 0) {
        $sel = "selected";
    } else {
        $sel = "";
    }
    echo "<option value='" . $dis_id . "' {$sel}>" . $dis_name . "</option>\n";
}
?>
											</select>
										</div>
									</div>									
								</div>
							</div>							
							<div class="clearfix"></div>
							<div class="form-group">
								<div class="col-sm-offset-2 col-sm-2">