/***********************************************************************************************
* DROP DOWN LIST CONTENTS                                                                      *
* These arrays list the items that should be listed in the drop down lists on the toolbar      *
* eg. paragraph, font face and font size. Each item should include the text to be displayed,   *
* and the name of the stylesheet class that should determine how the item should be displayed  *
* in the list                                                                                  *
***********************************************************************************************/

//paragraph style
var edtArrFormatBlockItems = new Array
(
    "Header 1", "H1",
    "Header 2", "H2",
    "Header 3", "H3",
    "Header 4", "H4",
    "Header 5", "H5",
    "Header 6", "H6",
    "Paragraph", "P"
)

//font size
var edtArrFontSizeItems = new Array
(
    "1", "edtFontSize1",
    "2", "edtFontSize2",
    "3", "edtFontSize3",
    "4", "edtFontSize4",
    "5", "edtFontSize5",
    "6", "edtFontSize6",
    "7", "edtFontSize7"
)

//font face
var edtArrFontFaceItems = new Array
(
    "Arial", "edtFontFaceArial",
    "Courier New", "edtFontFaceCourierNew",
    "Century Gothic", "edtFontFaceCenturyGothic",
    "Comic Sans MS", "edtFontFaceComicSansMS",
    "Impact", "edtFontFaceImpact",
    "Tahoma", "edtFontFaceTahoma",
    "Times New Roman", "edtFontFaceTimesNewRoman",
    "Trebuchet MS", "edtFontFaceTrebuchetMS",
    "Verdana", "edtFontFaceVerdana",
    "Verdana Black", "edtFontFaceVerdanaBlack",
    "Verdana Narrow", "edtFontFaceVerdanaNarrow"
)

/*****************************************************************************************
* PATHS & URL'S                                                                          *
* Paths and url's to various html and aspx files, such as popups for tables, images etc. *
*****************************************************************************************/

// Physical path to root of website - DO NOT include \ at the end
edtRootPath = "D:\\Home\\DC Web Design\\processmeasurement.uk.com\\htdocs";

// URL to root of website - DO NOT include / at the end
//edtRootUrl = "http://localhost/pmatestsite";
var sUrl = window.location;

sUrl = sUrl.toString()

var urlLength = sUrl.toString().length

for(i=8; i < urlLength; i++)
{
   if(sUrl.toString().substring(i,i+1)=="/")
    {
        sUrl = sUrl.toString().substring(0,i+1);
        i = sUrl.toString().length+1;
        break;
    }
}

//sUrl = sUrl.substring(7,sUrl.length-1)
//if(sUrl=="www.processmeasurement.uk.com" || sUrl=="www.silkyproducts.co.uk" || sUrl=="www.silkyproducts.com" || sUrl == "www.optifuel.co.uk" || sUrl=="www.dc-web.co.uk" || sUrl=="www.dcwebdesign.co.uk")
//{
//    sUrl += "/preload";
//}
//sUrl = "http://" + sUrl;
var edtRootUrl = sUrl;

// Physical path to uploaded files - this should NOT start or end with a \, just include 
// the folder name relative to the root of the site (eg. media\images)
edtUploadPath = "uploads";

// URL to uploaded files - this should NOT start or end with a /, just include the folder of the images 
// relative to the root url (eg. media/images)
edtUploadUrl = "uploads";

// Path to the images folder.
edtImagePath = edtRootUrl + "/libs/editor/images/";

// URL to upload popup 
edtHTMLPathUpload = edtRootUrl + "/libs/editor/popups/upload.aspx?root=" + Url.encode(edtRootPath) + "&uplfolder=" + Url.encode(edtUploadPath);

// Path to insert db field popup.
edtHTMLPathInsertDbField = edtRootUrl + "/libs/editor/popups/insert_dbfield.aspx";

// Path to insert form popup.
edtHTMLPathInsertForm = edtRootUrl + "/libs/editor/popups/insert_form.html";

// Path to insert checkbox popup.
edtHTMLPathInsertCheckbox = edtRootUrl + "/libs/editor/popups/insert_checkbox.html";

// Path to insert radio button popup.
edtHTMLPathInsertRadiobutton = edtRootUrl + "/libs/editor/popups/insert_radiobutton.html";

// Path to insert text area popup.
edtHTMLPathInsertTextArea = edtRootUrl + "/libs/editor/popups/insert_textarea.html";

// Path to insert submit button popup.
edtHTMLPathInsertSubmit = edtRootUrl + "/libs/editor/popups/insert_submit.html";

// Path to insert image submit button popup.
edtHTMLPathInsertImageSubmit = edtRootUrl + "/libs/editor/popups/insert_image_submit.html";

// Path to reset form button popup.
edtHTMLPathInsertReset = edtRootUrl + "/libs/editor/popups/insert_reset.html";

// Path to insert hidden form field popup.
edtHTMLPathInsertHidden = edtRootUrl + "/libs/editor/popups/insert_hidden.html";

// Path to insert password field popup.
edtHTMLPathInsertPassword = edtRootUrl + "/libs/editor/popups/insert_password.html";

// Path to insert text field popup.
edtHTMLPathInsertText = edtRootUrl + "/libs/editor/popups/insert_text.html";

// Path to insert table popup.
edtHTMLPathInsertTable = edtRootUrl + "/libs/editor/popups/insert_table.html";

// Path to edit table properties popup.
edtHTMLPathEditTable = edtRootUrl + "/libs/editor/popups/edit_table.html";

// Path to insert link popup.
edtHTMLPathInsertLink = edtRootUrl + "/libs/editor/popups/insert_link.aspx?actn=add";

// Path to edit link popup.
edtHTMLPathEditLink = edtRootUrl + "/libs/editor/popups/insert_link.aspx?actn=edit";

// Path to insert image popup.
edtHTMLPathInsertImage = edtRootUrl + "/libs/editor/popups/insert_image.html";

// Path to page properties popup.
edtHTMLPathPageProperties = edtRootUrl + "/libs/editor/popups/page_properties.aspx";


/********************************************
* Misc configuration settings               *
********************************************/

// ASP/.NET enabled? Determines whether or not to show function such as image upload that require
// asp or asp.net
edtASPNet = true;
edtASP = false;

// Character to put around database fields
edtDbFieldCharOpen = "{{"
edtDbFieldCharClose = "}}"

// Dimensions of the editor.
edtWidth = "555px";
edtHeight = "400px";

// Name of the IFRAME (content editor).
edtName = "WebEdit";

// Name of the hidden form field.
edtFormName = "WebEdit_content";

// Page for form to submit to - leave blank to submit to self 
edtFormSubmitUrl = "";

// Allow design mode
edtDesignMode = true;

// Allow code view mode 
edtCodeMode = true;

// Allow preview mode
edtPreviewMode = true;

// Allow save button
edtSave = true;

// Allow cancel button
edtCancel = true;
