function EditItem(coords, type, subType, dest) { Set_Cookie('coords', coords, '', '/', ''); Set_Main_Cookie('type', type, '', '/', ''); 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 if( subType != null ) { buf += "?defstyle=" + subType; } 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 == '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 Web Gem\'s settings, you must delete this Web Gem 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 = '/servlet/SiteBuilderServlet'; cmd = cmd + '?Command=GemCreate&Mode=edit&PartnerNum=119'; 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 Web Gem has no editable settings.'); } else { alert('ERROR: Editing of this object type is currently not supported.'); } } function SetPage(page_num, mode) { switch (mode) { case 0: Set_Cookie('page_num', page_num, '', '/', ''); document.location.href = '/servlet/SiteBuilderServlet?Command=RenderPage&PageNum=' + page_num + '&Mode=' + mode; break; case 1: case 2: Set_Cookie('page_num', page_num, '', '/', ''); document.location.href = '/servlet/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 = '/servlet/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; default: alert('ERROR: Unknown mode'); } } function InsertItem(coords, defstyle) { Set_Cookie('coords', coords, '', '/', ''); if( defstyle == null ) defstyle = ""; AddType(defstyle); } function AddType(defstyle) { type = Get_Main_Cookie('type'); if (type == 'Para') { var buf = '/trellix/sitebuilder/f_add_text.html'; if( defstyle != null && defstyle != "" ) { buf += "?defstyle=" + defstyle; } top.location.href = buf; } else if (type == 'Img') { top.location.href = '/trellix/sitebuilder/add_call_picture_chooser.html'; } else if (type == 'Link') { top.location.href = '/trellix/sitebuilder/f_choose_link.html'; } else if (type == 'WebGem') { Delete_Cookie('gem_return', '/', ''); top.location.href = '/trellix/sitebuilder/f_add_gem.html'; } else if (type == 'Table') { top.location.href = '/trellix/sitebuilder/f_add_table.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 = '/servlet/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 = '/servlet/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 preload(imgObj, imgSrc) { if (document.images) { eval(imgObj+' = new Image()'); eval(imgObj+'.src = "'+imgSrc+'"'); } } function chkpreload(imgObj, imgSrc) { if (document.images) { eval(imgObj+' = new Image()'); eval(imgObj+'.src = "'+imgSrc+'"'); alert(imgObj+'.src = "'+imgSrc+'"'); } } function changeLayerImage(layer, imgName, imgObj) { if (document.images) { if (document.layers && layer!=null) eval('document.'+layer+'.document.images["'+imgName+'"].src = '+imgObj+'.src'); else document.images[imgName].src = eval(imgObj+".src"); } } function changeImage(imgName, imgObj) { if (document.images) { document[imgName].src = eval(imgObj + ".src"); } }