function AddQueryStringParameter(url, paramname, paramvalue) { var rval = url; var pos1; var pos2; if (paramname == '') return rval; pos1 = url.indexOf("?"); if (pos1 < 0) { rval += "?" + paramname + "=" + escape(paramvalue); } else { pos1 = url.indexOf(paramname+"=",pos1); if (pos1 >= 0) { pos1 += paramname.length() + 1; pos2 = url.indexOf("&",pos1); if (pos2 >= 0) { rval = url.substring(0,pos1) + escape(paramvalue) + url.substring(pos2); } else { rval = url.substring(0,pos1) + escape(paramvalue); } } else { rval += "&" + paramname + "=" + escape(paramvalue); } } return rval; } function modifyUrl(url,randParam,randVal) { var rval = url; if (randParam != '') { rval = AddQueryStringParameter(rval,randParam,randVal); } return rval; } function writeSponsorFrameSet2(mainPage,toolbar,urlTop,topHeight,urlRight,rightWidth,rightScrolling,randParam) { var randVal = Math.random(); randVal = Math.floor(randVal * 32768); document.write('\r\n'); document.write('\r\n'); document.write('\r\n'); if (toolbar == 'm_all_my_sites.html' || toolbar == 'm_add_picture.html') { document.write('\r\n'); } else { document.write('\r\n'); } document.write('\r\n'); document.write('\r\n'); document.write('\r\n'); document.write('\r\n'); document.write('\r\n'); document.write('\r\n'); } function writeSponsorFrameSet3(mainPage,toolbar,urlTop,topHeight,urlLeft,leftWidth,urlRight,rightWidth,rightScrolling,urlBottom,bottomHeight,bottomScrolling,randParam) { var randVal = Math.random(); randVal = Math.floor(randVal * 32768); document.write('\r\n'); document.write('\r\n'); document.write('\r\n'); document.write('\r\n'); document.write('\r\n'); if (toolbar == 'm_all_my_sites.html' || toolbar == 'm_add_picture.html') { document.write('\r\n'); } else { document.write('\r\n'); } document.write('\r\n'); document.write('\r\n'); document.write('\r\n'); document.write('\r\n'); document.write('\r\n'); document.write('\r\n'); document.write('\r\n'); document.write('\r\n'); } function WriteFrameSet(top, middle, bottom, renderPage, mode, isGem, topHeight) { if (renderPage == true) { middle = '/servlet/SiteBuilderServlet?Command=RenderPage&PageNum=' + Get_Cookie('page_num') + '&Mode=' + mode + '&RenderError=/trellix/sitebuilder/f_error.jsp'; } if (Get_Cookie('help_page') == '') { help_page = 'unavailable'; } else { help_page = Get_Cookie('help_page'); } if (topHeight == null || topHeight <= 0) { topHeight = '71'; } if ((Get_Cookie('help') == '1') && (help_page != 'nohelp') && (Get_Cookie('map') == '1') && (isGem != '1')) { document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); } else if ((Get_Cookie('help') == '1') && (help_page != 'nohelp') && (isGem != '1')) { document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); } else if (Get_Cookie('map') == '1') { document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); } else { document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); } } function WriteAdFrameSet(adReqPage, middle, bottom, renderPage, mode, isGem) { WriteFrameSet('/trellix/sitebuilder/ad_top_small.html', middle, bottom, renderPage, mode, isGem); } function WritePreviewFrameSet(middle, bottom, renderPage, mode) { if (renderPage == true) { middle = '/servlet/SiteBuilderServlet?Command=RenderPage&PageNum=' + Get_Cookie('page_num') + '&Mode=' + mode + '&RenderError=/trellix/sitebuilder/f_error.jsp'; } if (Get_Cookie('help_page') == '') { help_page = 'unavailable'; } else { help_page = Get_Cookie('help_page'); } if ((Get_Cookie('help') == '1') && (Get_Cookie('map') == '1')) { document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); } else if (Get_Cookie('help') == '1') { document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); } else if (Get_Cookie('map') == '1') { document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); } else { document.write(''); document.write(''); document.write(''); document.write(''); } } function logPageView(action,layout,refresh) { // load blank.gif logging image var randVal; randVal = Math.random(); randVal = Math.floor(randVal * 32768); var logimg = new Image(); var pg = top.location.href; var pos = pg.lastIndexOf('/'); if (pos >= 0) pg = pg.substring(pos+1); pos = pg.indexOf('?'); if (pos >= 0) pg = pg.substring(0,pos); logimg.src = '/trellix/sitebuilder/images/blank.gif?log=1&page='+pg+'&action='+action+'&layout='+layout+'&refresh='+refresh+'&r='+randVal; } function replaceBottomFrame(filename) { //alert(filename); parent.fBottom.location.replace('/trellix/sitebuilder/' + filename); }