/* 

NOTES:

feature_set_name: replace this word to tailor standard functionality such as validation, delete, posting



name_of_file: library of javascript to support feature_set_name
    david.kelly@fanore.com (http://www.fanore.com/website_design.htm)
    check_feature_set_name: validate the feature_set_name editing dialogue
    
    
*/


//check_device_management: validate the feature_set_name editing dialogue
function check_device_management(){
    var progress_bar_url=$F('progress_bar_url');
    
//caption
    if ($F('txt_title').blank()){
         show_error_message("please enter a name for this device!",'error_message_panel');
        $('txt_title').focus();
        return false;
    }
    var el=get_el('FCKDATASOURCE');
    if (el){    
        var cEditor = FCKeditorAPI.GetInstance('txtHTML');
        var datasource_name = 'fd_description';
        //alert(datasource_name);
       $(datasource_name).value= cEditor.GetXHTML(true);
         
    }       
    
    //deal with manufacturers
    var el=get_el('optManufacturer');
    var buffer="0"
    for (var i=0;i<el.length;i++){
        if (el[i].checked){
            buffer+= "," + el[i].value;
        }
    }
    $('manufacturers').value=buffer;
    $('url_payload').value=$F('url_params')
    //return false;
    $('save').target='keyhole'; 
// display a window indicating save progress 
    progress_window(progress_bar_url)         
    $('save').submit();

}

function device(paramID){
    
    
    generic_populate_panel('../asp/object_administration.asp', 'objectid=1084&mode=6&tag=_listDeviceProducts&master=' + paramID, 'bulk_members_panel', '');
    generic_populate_panel('../asp/object_administration.asp', 'objectid=1084&mode=6&tag=_listNonDeviceProducts&master=' + paramID, 'bulk_data_panel', '');
    
}
