var mainStyle=["white","#306767","","","",,"black","#FFFFDF","","","",,,,2,"#306767",2,,,,,"",3,,,];

var TipId="tiplayer";       
var FiltersEnabled = 0;
var tips = new Array();
    tips[0] = 
    tips[2] = ["Print Checklist","When you have finished your modifications, print it and have your child start filling it out."];

function customTipMove(e) {
    mig_mo(e);
    try {
       document.onmousemove=positiontip;
    } catch (err) {}        
};

function overPrettyPrint() {
    var tip = ["Cool Print","Prints a decorated, color version of the Checklist in PDF format.<br /><br />" +
                "To use Cool Print, you must have Adobe's free Adobe Reader installed.<br /><br />" +
                "If you're not sure if you already have it, try Cool Print and see if it works.<br /><br />" +
                "If not, <a href='javascript:void(0)' onclick='popUp(\"http://www.adobe.com/products/acrobat/readstep2.html\");'>click here</a> to download."];

    stm(tip,mainStyle);
}

function overSimplePrint() {
    var tip = ["Simple Print","Prints a simple B&W version of the Checklist. No PDF plugin is required." + 
        "<br/><a href='javascript:void(0)' onclick='popUp(\"/help/faq/links/faq_printing.html\");'>Learn&nbsp;More&nbsp;>></a>"];

    stm(tip,mainStyle);
}

function makeSortable(section) {
        if (section) {
                createSortable(section);
        } else {
                $$("div.section").each( function(section) { 
                           createSortable(section);
                        } 
                );
        }
        createSortableSections();	
}

function createSortable(section) {
        var section_items = section.down("div.section_items");
        if (section.visible() && section_items && section_items.id) {
                //console.log("Sortable : " + section_items.id);
                Sortable.destroy(section_items.id);
                Sortable.create(section_items.id,{tag:'div', dropOnEmpty: true, only:'rowsub', ghosting:false, constraint:false, onUpdate:function(){ updateItemPositions(section_items.id);} });
        }
}

function createSortableSections() {
        var sections = $$("div.draggable");
        //console.log(sections);
        //console.log(sections.length);
        if (sections.length > 1) {
                //console.log("Sortable sections: " + (sections.length - 1));
                Sortable.destroy('grid');
                Sortable.create('grid',{tag:'div',dropOnEmpty: true ,only:'draggable', ghosting:false, constraint:false, onUpdate:function(){ updateSectionPositions();} });	
        }
}

makeSortable();
