function AddBlogPost() { top.location.href = '/trellix/sitebuilder/f_edit_blog_post.jsp?return_url=/trellix/sitebuilder/f_edit_page.html'; } function EditBlog() { top.location.href = '/trellix/sitebuilder/f_edit_blog.jsp'; } function ShowBlogSettings() { top.location.href = '/trellix/sitebuilder/f_blog_settings.jsp?return_url=/trellix/sitebuilder/f_edit_page.html&show_edit=yes'; } function EditPageTitle(pagenum) { Delete_Cookie('gem_return', '/', ''); top.location.href = 'f_edit_page_title.jsp?caller=f_edit_page.html&pagenum=' + pagenum; } function EditSiteTitle() { Delete_Cookie('gem_return', '/', ''); top.location.href = 'f_edit_site_title.jsp?caller=f_edit_page.html'; } function EditBlogPost(postid) { top.location.href = 'f_edit_blog_post.jsp?return_url=f_edit_page.html&entry_id=' + postid; } function AddFormField(coords) { Set_Cookie('coords', coords, '', '/', ''); top.location.href='/trellix/sitebuilder/f_mode_insert.html?type=Field'; } function AddTableRow(coords) { Set_Cookie('coords', coords, '', '/', ''); sCmd = '/trellix/sitebuilder/SiteBuilderServlet?Command=AddTableRow&sUrl=/trellix/sitebuilder/f_edit_page.html&fUrl=/trellix/sitebuilder/f_edit_page.html&Coords=' + coords; top.location.href = sCmd; } function EditItem(coords, type, subType, dest, size, color, bgcolor, stylename) { // stylename is not used but reserved for HTML Uptake. Set_Cookie('coords', coords, '', '/', ''); Set_Main_Cookie('type', type, '', '/', ''); Delete_Cookie('gem_return', '/', ''); if (type == 'Para') { buf = '/trellix/sitebuilder/f_edit_text.html'; // note assumption here: subType and dest as such are only used for gems, so we can hijack the third argument to be defstyle for paras // ... and fourth for fontname, fifth for size, sixth for color if( subType != null ) { buf += "?defstyle=" + subType; if( dest != null ) { buf += "&font=" + myEscape(dest) + "&size=" + myEscape(size) + "&color=" + myEscape(color) + "&bgcolor=" + myEscape(bgcolor); } } top.location.href = buf; } else if (type == 'Title') { top.location.href = '/trellix/sitebuilder/f_edit_title.jsp?caller=f_edit_page.html'; } else if (type == 'Img') { top.location.href = '/trellix/sitebuilder/f_edit_picture.jsp'; } else if (type == 'Link') { top.location.href = '/trellix/sitebuilder/f_edit_link.html'; } else if (type == 'Table') { top.location.href = '/trellix/sitebuilder/f_edit_table.html'; } else if (type == 'Form') { top.location.href = '/trellix/sitebuilder/f_edit_form.html'; } else if (type == 'FormElement') { top.location.href = '/trellix/sitebuilder/f_edit_field.jsp'; } else if (type == 'PassThruGem') { if (subType == 'JSP') { buf = '/trellix/sitebuilder/gem/' + dest; for (var i = 4; i < arguments.length; i++) buf += arguments[i] + ','; top.location.href = buf; } else if (subType == 'JS') { buf = dest + '('; for (var i = 0; i < arguments.length; i++) buf += arguments[i] + ','; buf += ')'; eval(buf); } else if (subType == 'NE' || subType == '' || !(subType)) { alert('To edit this Site Add-On\'s settings, you must delete this Site Add-On and add a new one with the correct settings.'); } else { alert('ERROR: Invalid gem sub-type.'); } } else if (type == 'Gem') { if (subType == 'framed'){ top.location.href = '/trellix/sitebuilder/f_gem_edit.html'; } else if (subType == 'unframed'){ var cmd; cmd = 'SiteBuilderServlet'; cmd = cmd + '?Command=GemCreate&Mode=edit&PartnerNum=0'; cmd = cmd + '&PageNum=' + Get_Cookie('page_num'); cmd = cmd + '&Coords=' + Get_Cookie('coords'); cmd = cmd + '&fUrl=/trellix/sitebuilder/f_edit_page.html'; top.location.href = cmd; } else alert('This Site Add-On has no editable settings.'); } else { alert('ERROR: Editing of this object type is currently not supported.'); } } function SetPage(page_num, mode) { if (page_num <= 0){ alert('This page has been deleted.'); } else switch (mode) { case 0: Set_Cookie('page_num', page_num, '', '/', ''); document.location.href = 'SiteBuilderServlet?Command=RenderPage&PageNum=' + page_num + '&Mode=0&Site=' + Get_Cookie('site') + '&User=' + escape(Get_Cookie('user')); break; case 1: Set_Cookie('page_num', page_num, '', '/', ''); document.location.href = 'SiteBuilderServlet?Command=RenderPage&PageNum=' + page_num + '&Mode=1&Site=' + Get_Cookie('site') + '&User=' + escape(Get_Cookie('user')) + '&fUrl=/error_redirect.html'; if (parent.fBottom.location.href.indexOf('m_edit_page.jsp') < 0) { parent.fBottom.location.href = '/trellix/sitebuilder/m_edit_page.jsp'; } break; case 2: Set_Cookie('page_num', page_num, '', '/', ''); document.location.href = 'SiteBuilderServlet?Command=RenderPage&PageNum=' + page_num + '&Mode=' + mode; break; case 3: alert('Unable to navigate to other pages while in delete mode. To exit delete mode click the Cancel icon below.'); break; case 4: alert('Unable to navigate to other pages while in move selection mode. To exit move selection mode click the Cancel icon below.'); break; case 5: alert('Unable to navigate to other pages while in copy selection mode. To exit copy selection mode click the Cancel icon below.'); break; case 6: case 7: Set_Cookie('page_num', page_num, '', '/', ''); document.location.href = 'SiteBuilderServlet?Command=RenderPage&PageNum=' + page_num + '&Mode=' + mode; break; case 8: alert('Unable to navigate to other pages while in layout and design selection modes.'); break; case 10: Set_Cookie('page_num', page_num, '', '/', ''); document.location.href = 'SiteBuilderServlet?Command=RenderPage&PageNum=' + page_num + '&Mode=' + mode; break; default: alert('ERROR: Unknown mode'); } } function SetCatalogPage(page_num, mode, cm_category, cm_item, cm_page_number, cm_item_start) { if (page_num <= 0){ alert('This page has been deleted.'); } else switch (mode) { case 0: // Set_Cookie('page_num', page_num, '', '/', ''); document.location.href = 'SiteBuilderServlet?Command=RenderPage&PageNum=' + page_num + '&Mode=' + mode + '&cm_category=' + cm_category + '&cm_item=' + cm_item + '&cm_page_number=' + cm_page_number + '&Site=' + Get_Cookie('site') + '&User=' + escape(Get_Cookie('user')) + '&fUrl=/error_redirect.html'; break; case 1: // Set_Cookie('page_num', page_num, '', '/', ''); document.location.href = 'SiteBuilderServlet?Command=RenderPage&PageNum=' + page_num + '&Mode=' + mode + '&cm_category=' + cm_category + '&cm_item=' + cm_item + '&cm_page_number=' + cm_page_number + '&Site=' + Get_Cookie('site') + '&User=' + escape(Get_Cookie('user')) + '&fUrl=/error_redirect.html'; if (parent.fBottom.location.href.indexOf('m_edit_catalog_page.html') < 0) { parent.fBottom.location.href = '/trellix/sitebuilder/m_edit_catalog_page.html'; } break; case 2: // Set_Cookie('page_num', page_num, '', '/', ''); document.location.href = 'SiteBuilderServlet?Command=RenderPage&PageNum=' + page_num + '&Mode=' + mode + '&cm_category=' + cm_category + '&cm_item=' + cm_item + '&cm_page_number=' + cm_page_number; break; case 3: alert('Unable to navigate to other pages while in delete mode. To exit delete mode click the Cancel icon below.'); break; case 4: alert('Unable to navigate to other pages while in move selection mode. To exit move selection mode click the Cancel icon below.'); break; case 5: alert('Unable to navigate to other pages while in copy selection mode. To exit copy selection mode click the Cancel icon below.'); break; case 6: case 7: // Set_Cookie('page_num', page_num, '', '/', ''); document.location.href = 'SiteBuilderServlet?Command=RenderPage&PageNum=' + page_num + '&Mode=' + mode + '&cm_category=' + cm_category + '&cm_item=' + cm_item + '&cm_page_number=' + cm_page_number; break; case 8: alert('Unable to navigate to other pages while in layout and design selection modes.'); break; case 10: // Set_Cookie('page_num', page_num, '', '/', ''); document.location.href = 'SiteBuilderServlet?Command=RenderPage&PageNum=' + page_num + '&Mode=' + mode + '&cm_category=' + cm_category + '&cm_item=' + cm_item + '&cm_page_number=' + cm_page_number; break; default: alert('ERROR: Unknown mode'); } } function InsertItem(coords, defstyle, font, size, color) { Set_Cookie('coords', coords, '', '/', ''); if( defstyle == null ) defstyle = ""; AddType(defstyle, font, size, color); } function AddType(defstyle, font, size, color) { type = Get_Main_Cookie('type'); if (type == 'Para') { var buf = '/trellix/sitebuilder/f_add_text.html'; if( defstyle != null && defstyle != "" ) { buf += "?defstyle=" + defstyle; if( font != null ) { buf += "&font=" + myEscape(font) + "&size=" + myEscape(size) + "&color=" + myEscape(color); } } top.location.href = buf; } else if (type == 'Img') { top.location.href = '/trellix/sitebuilder/add_call_picture_chooser.html'; } else if (type == 'CImg') { top.location.href = '/trellix/sitebuilder/add_call_picture_chooser.html?tab=edit_clipart'; } else if (type == 'Link') { top.location.href = '/trellix/sitebuilder/f_choose_link.html'; } else if (type == 'ULink') { top.location.href = '/trellix/sitebuilder/f_add_link.jsp?link_type=U'; } else if (type == 'MLink') { top.location.href = '/trellix/sitebuilder/f_add_link.jsp?link_type=M'; } else if (type == 'PLink') { top.location.href = '/trellix/sitebuilder/f_add_link.jsp?link_type=P'; } else if (type == 'WebGem') { Delete_Cookie('gem_return', '/', ''); top.location.href = '/trellix/sitebuilder/gem_proxy.jsp'; } else if (type == 'WeatherGem') { Delete_Cookie('gem_return', '/', ''); top.location.href = '/trellix/sitebuilder/gem/weather_viewer.jsp'; } else if (type == 'MapGem') { Delete_Cookie('gem_return', '/', ''); top.location.href = '/trellix/sitebuilder/gem/map_quest.jsp?mode=2'; } else if (type == 'CursorGem') { Delete_Cookie('gem_return', '/', ''); InsertBGem('tlx.tlx.animated_cursors',true); } else if (type == 'CCNowGem') { Delete_Cookie('gem_return', '/', ''); InsertBGem('tlx.ccnow.cart',true); } else if (type == 'Table') { top.location.href = '/trellix/sitebuilder/f_add_table.html'; } else if (type == 'GTable') { top.location.href = '/trellix/sitebuilder/f_add_table.html?tab=table_templates'; } else if (type == 'BTable') { top.location.href = '/trellix/sitebuilder/f_add_table.html?tab=byo_table'; } else if (type == 'Field') { top.location.href = '/trellix/sitebuilder/f_add_field.html'; } else { alert('ERROR: The type of item you are attempting to insert (' + type + ') has not been implemented.'); } } function MoveItem(src, dest) { if (src == '0') { src = Get_Cookie('coords'); } sCmd = 'SiteBuilderServlet?Command=MoveElements&Type=p&sUrl=/trellix/sitebuilder/f_edit_page.html&fUrl=/trellix/sitebuilder/f_edit_page.html&SrcCoords=' + src + '&DestCoords=' + dest; top.location.href = sCmd; } function CopyItem(src, dest) { if (src == '0') { src = Get_Cookie('coords'); } sCmd = 'SiteBuilderServlet?Command=CopyElements&Type=p&sUrl=/trellix/sitebuilder/f_edit_page.html&fUrl=/trellix/sitebuilder/f_edit_page.html&SrcCoords=' + src + '&DestCoords=' + dest; top.location.href = sCmd; } function EditNavBar() { top.location.href = '/trellix/sitebuilder/f_navbar_props.jsp'; } function tweNavbarPreload(imgSrc, imgObj) { if (document.images) { eval(imgObj+' = new Image()'); eval(imgObj+'.src = "'+imgSrc+'"'); } } function tweNavbarChangeImage(imgName, imgObj) { if (document.images) { document[imgName].src = eval(imgObj + ".src"); } } function EditCatalog() { launchService("tlxpremium.tlxcatmgr.display"); } function ManageProducts(category, page) { var cmd = "f_edit_products.html?return_from=edit_products&return_url=f_edit_page.html"; cmd += "&filter="; cmd += category; cmd += "&cm_page_number="; cmd += page; top.location.href = cmd; } function launchService(servid) { Set_Cookie('gem_class_id', servid, '', '/', ''); Delete_Cookie('gem_return', '/', ''); Set_Cookie('coords', 0, '', '/', ''); top.location.href = 'f_gem_create.html'; } function link_message(){ alert('This page is not available during editing or previewing -- it will be \ndynamically created when you publish your web site. To see this page, \nclick the "Publish to Web" button, then visit your live web site.'); }