﻿
function newWindow(siteIDCSS, CurrentLocIDCSS, CurrentThemeIDCSS, Lang, PageBackground, BodyBgColor) {
    var baseURL = ''
    var popup
    var browserName = navigator.appName
    var browserVer = parseInt(navigator.appVersion)
    var hideEmailLink
    var sourceTitle = escape(document.title)
    var sourceURL = escape(location)
    var url = baseURL + '/includes/EmailPageForm.aspx?Lang=' + Lang + '&amp;URL=' + sourceURL + '&amp;sourceTitle=' + sourceTitle + '&amp;siteIDCSS=' + siteIDCSS + '&amp;CurrentLocIDCSS=' + CurrentLocIDCSS + '&amp;CurrentThemeIDCSS=' + CurrentThemeIDCSS + '&amp;PageBackground=' + PageBackground + '&amp;BodyBgColor=' + BodyBgColor
    if (browserName == "Netscape") {
        features = "scrollbars=yes,resizable=no,width=570,height=400"
    } else {
        features = "scrollbars=no,resizable=yes,width=540,height=430"
    }
    var emailLinkURL = url;
    var amp = '&amp';
    while(emailLinkURL.match('&amp;'))
        {
        emailLinkURL = emailLinkURL.replace('&amp;', amp.substring(0, 1));
        }
    if (!popup || popup.closed) 
        {
        popup = window.open(emailLinkURL,"popup",features)
    } else {
        popup.location = url
        popup.focus()
    }
}