/*
   *** ATTENTION ***
   In order to make this work on the internet, you MUST go to make_address() and
   uncomment PART B and comment out PART A.
   PART A is to allow for local viewing.
*/

/* globals for all documents; used for spambot-resistant display of email address */
var g_strMktgDept = new String("&#109;&#097;&#114;&#107;&#101;&#116;&#105;&#110;&#103;");
var g_strEducatnDept = new String("&#101;&#100;&#117;&#099;&#097;&#116;&#105;&#111;&#110;");
var g_strNetrn = new String("&#110;&#101;&#116;&#114;&#111;&#110;");
var g_strHr = new String("&#104;&#114");
var g_strHtln = new String("&#104;&#111;&#116;&#108;&#105;&#110;&#101;");
var g_strWbMstr = new String("&#119;&#101;&#98;&#109;&#97;&#115;&#116;&#101;&#114;");

var g_Browser = new String();   // for browser-sniffing.
var g_URL = location.href;
var g_HostPrefix = getURLBase();

/* END OF GLOBALS */

function getURLBase()
{
//
// What is the front part of the URL? This website is run several different
// ways, and the location of the "base" of the URL is not consistent. So
// we have to make it work.
    if (window.location.host != "www.netron.com")
    {
        //
        // either on localhost or on pandora. In any case, we have to split the
        // href after the 'netron' part of the string, if there is one.
        //
        var re = /netron/
        var ar = re.exec(g_URL);
        if (ar != null)
        {
            var tempstr = g_URL.substring(0,ar.index + 6);
            return tempstr;
        }
    }
    //
    // Default value for www.netron.com and mysterious configs:
    return window.location.protocol + "//" + window.location.host;
} // end of getURLBase

function spmelly(nme, dom, disp, xtra)
/* 
   Prints spam-harvester-unfriendly email addresses.
   Takes 3 required and 1 optional parameter.
   - nme is the user name
   - dom is the domain w/o the dot or top-level domain identifier
     (e.g., '.com'. This gets appended automatically.)
   - disp is the 'display' name of the link e.g., Marketing, Sales, Netron Hotline etc.
   - xtra is any extra things appended to "mailto" href for a pop-up email address, 
     e.g., 'subject=Your Request&body=Forget it'.
*/
{
    var append = "";
    if (xtra == null || xtra == "")
    {
        ;
    } 
    else 
    {
        append = "?" + xtra;
    }
    var a = new String('<a href="');
    var clsa = new String('</a>');
    var mail = String.fromCharCode(109, 97, 105, 108);
    var to   = String.fromCharCode(0164, 0157, 072);
    var et = String.fromCharCode(0100);
    var tld = new String('&#046;&#099;&#111;&#109;');
    document.write(a + mail + to + nme + et + dom + tld + append + '">');
    document.write(disp);
    document.write(clsa);
}



/* Determine the user's browser type/version. */
        
function includeStyleSheet(name) 
{
    g_Browser=navigator.appName;
    var version=navigator.appVersion;
    var ver1=version.substring(0,1);
    var ver2=version.lastIndexOf("MSIE");
    var ver3=version.substring(ver2+5,ver2+6);

    if (g_Browser == "Netscape")
    {
        if (ver1 == 4)
        {
            document.write('<link rel="stylesheet" href="' + name + '_nc4.css" type="text/css">');
        }
        else if (ver1 >= 5)
        {
            // Mozilla or Netscape 7
            document.write('<link rel="stylesheet" href="' + name + '_ie4.css" type="text/css">');
        }
    }

    if (g_Browser == "Microsoft Internet Explorer")
    {
        if (ver1 >= 4)
        {
            document.write('<link rel="stylesheet" href="' + name + '_ie4.css" type="text/css">');
        }
        if (ver3 == 3)
        {
            document.write('<link rel="stylesheet" href="' + name + '_ie3.css" type="text/css">');
        }
    }
}


/*
   Includes the META tags at the top of every html file.
   Loads up the style sheets & favourites icon.
*/
function includeHeaders() {
    document.write('<meta name="description" content="Netron provides tools and services for the creation of adaptable business systems.">');
    document.write('<meta name="keywords"    content="application as400 service solution provider cics cobol component development frames NETRON/CAP fusion ims mainframe netron software reuse adaptive reengineering re-engineering adaptable ibm db2">');
    document.write('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">');
    document.write('<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">  <!-- for IE -->');
    document.write('<link rel="icon" href="/favicon.ico" type="image/vnd.microsoft.icon"> <!-- for other browsers -->');
    includeStyleSheet(make_address("/css/body"));
    includeStyleSheet(make_address("/css/lmenu"));
}


/*
    Prints the <td ...> characteristics of the lmenuXXX tables.
    - classname is the name of the .css class for the column.
    - col_link is optional.  It is the link for any text in the table.
    - outside_link is optional.  It is set to 1 if the link is outside the netron.com domain.
*/
function col_desc(classname, col_link, outside_link) {
    if (col_link == null || col_link == "") 
    {
        return ('<td class="' + classname + ' style="cursor:default;">');
    }
    else 
    {
        if (classname=="title") {
            return ('<td class="' + classname + '" style="cursor:default;" bgcolor="#A2D9F6">');
        }
        else
        {
            var address = make_address (col_link);
            if (document.URL == address)
            {
             // The current row is for the page being displayed now - change row colour and remove link.
                return ('<td class="' + classname + '" style="cursor:default;" bgcolor="#A2D9F6">');
            }
            else 
            {
                if (outside_link != null && outside_link != 0) 
                {
                    address = col_link;
                }
                // Allow foreground/background/border colour to change when mouse moves over row.
                return ('<td class="' + classname + '"  style="cursor:pointer;" bgcolor="#BFDBF7" onmouseover="this.style.backgroundColor=\'#FFCC99\'; this.style.borderColor=\'#FF9933\'; return true;" onmouseout="this.style.backgroundColor=\'#BFDBF7\'; this.style.borderColor=\'#92B6FF\'; return true;" onmouseup="handleMenuClick(event); return true;"><a class="' + classname + '" href="' + address + '">');
            }
        }
    }
}

//---------------------------------------------
// X-Browser Handler for a mouseup that's inside the
// Menu link TD cell, but not exactly on the
// anchor tag. Lets the user click anywhere
// inside the cell and display the item, not just
// inside the anchor.
//---------------------------------------------
function handleMenuClick(e)
{
// Makes the assumption that all menu TD cells 
// generated by function "col_desc"
// have exactly one anchor tag.
    if (!e)
        var e = window.event;

    var element = typeof e.srcElement!='undefined' ? e.srcElement : e.target;
    //
    // If they clicked on the Anchor tag, let it handle the window redirection
    if (element.tagName == "A") 
        return;

    // Only IE has element.all
    var docLinks = typeof element.all!='undefined' ? element.all.tags("A") : element.getElementsByTagName("A");
    //
    // If element contains anchor, display its target
    if (docLinks.length > 0) 
        top.location = docLinks[0].href;
}

/*
   *** ATTENTION ***
   In order to make this work on the external internet, you MUST uncomment PART B and comment out PART A.
   PART A is to allow for local viewing.
*/
// Formats the links to give them the correct address of the server they are on.
function make_address(address, dont_write) {
    var new_address = g_HostPrefix;
    new_address += address;
    if (dont_write == null || dont_write == 0) 
    {
        return new_address;
    }
    else 
    {
        document.write(new_address);
    }
}


// Prints out the header menu.
function hmenu() {
    document.write('<table>');
    document.write('<tr>');
    document.write('<td>');
    document.write('<a href="' + make_address("/") + '" >');
    document.write('<img src="' + make_address("/images/logo.gif") + '" border="0">');
    document.write('</a>');
    document.write('</td>');
    document.write('<td align="right">');
    document.write('<a href="' + make_address("/") + '">');
    document.write('<img src="' + make_address("/images/menu_home.gif") + '" border="0" width="46" height="31">');
    document.write('</a>');
    document.write('<img src="' + make_address("/images/menu_line.gif") + '" border="0" width="12" height="31">');
    document.write('<a href="' + make_address("/company/directions.html") + '">');
    document.write('<img src="' + make_address("/images/menu_contact.gif") + '" border="0" width="72" height="31">');
    document.write('</a>');
    document.write('</td>');
    document.write('</tr>');
    document.write('<tr>');
    document.write('<td colSpan="2"><img src="' + make_address("/images/homepage_tagline.gif") + '" border="0" width="325" height="18">');
    document.write('</td>');
    document.write('</tr>');
    document.write('<tr>'); 
    document.write('<td colSpan="2" style="white-space: nowrap;"><img src="' + make_address("/images/menu_left.gif") + '" width="5" height="35">');
    document.write('<img src="' + make_address("/images/menu_filler.gif") + '" border="0" width="300" height="35">');
    document.write('<a href="' + make_address("/products/") + '" title="Learn more about Netron\'s Development Tools">');
    document.write('<img src="' + make_address("/images/menu_our_products.gif") + '" border="0">');
    document.write('</a>');
    document.write('<img src="' + make_address("/images/menu_filler.gif") + '" border="0" width="30" height="35">');
    document.write('<a href="' + make_address("/company/partial_customer_list.html") + '" title="Netron\'s customers are some of the largest organizations of their kind.">');
    document.write('<img src="' + make_address("/images/menu_our_customers.gif") + '" border="0">');
    document.write('</a>');
    document.write('<img src="' + make_address("/images/menu_filler.gif") + '" border="0" width="30" height="35">');
    document.write('<a href="' + make_address("/customer/") + '"  title="Are you a Netron customer? Check out Netron\'s Customer Support Portal!">');
    document.write('<img src="' + make_address("/images/menu_support.gif") + '" border="0">');
    document.write('</a>');
    document.write('<img src="' + make_address("/images/menu_filler.gif") + '" border="0" width="30" height="35">');
    document.write('<a href="' + make_address("/company/") + '" title="Netron\'s Company Bio, Contact info, Directions to our office, etc.">');
    document.write('<img src="' + make_address("/images/menu_about_us.gif") + '" border="0">');
    document.write('</a>');    
    document.write('<img src="' + make_address("/images/menu_filler.gif") + '" border="0" width="45" height="35">');
    document.write('<img src="' + make_address("/images/menu_right.gif") + '" border="0" width="7" height="35">');
    document.write('</td>');
    document.write('</tr>');
    document.write('</table>');
}

// Prints out the left menu for the home page.
function lmenu_home() {
    document.write('<table cellspacing="1" cellpadding="0" border="0" width="169" >');
    document.write('<tr>' + col_desc("title", "/") + 'Home</a></td></tr>');   
    document.write('<tr>' + col_desc("imnav", "/products/") + 'Our Products</a></td></tr>');
    document.write('<tr>' + col_desc("imnav", "/company/partial_customer_list.html") + 'Our Customers</a></td></tr>');
    document.write('<tr>' + col_desc("imnav", "/customer/") + 'Support</a></td></tr>');
    document.write('<tr>' + col_desc("imnav", "/company/") + 'About Us</a></td></tr>');
    document.write('<tr>' + col_desc("title", "/") + 'NEW!</td></tr>');   
    document.write('<tr>' + col_desc("imnav", "/products/fusion/fusionwindows.html") + 'Microsoft Windows Compatibility Chart</a></td></tr>');
    document.write('<tr>' + col_desc("imnav", "/customer/WindowsVistaInstall34.html") + 'Installing Fusion 3.4 under Windows Vista</a></td></tr>');
    document.write('</table>');            
}


// Prints out the left menu for miscellaneous pages that don't hang off subcategory.
function lmenu_generic() {
    document.write('<table cellspacing="1" cellpadding="0" border="0" width="169" >');
    document.write('<tr>' + col_desc("imnav", "/") + 'Home</a></td></tr>');   
    document.write('<tr>' + col_desc("imnav", "/products/") + 'Our Products</a></td></tr>');
    document.write('<tr>' + col_desc("imnav", "/company/partial_customer_list.html") + 'Our Customers</a></td></tr>');
    document.write('<tr>' + col_desc("imnav", "/customer/") + 'Support</a></td></tr>');
    document.write('<tr>' + col_desc("imnav", "/company/") + 'About Us</a></td></tr>');
    document.write('<tr>' + col_desc("title", "/") + 'NEW!</td></tr>');   
    document.write('<tr>' + col_desc("imnav", "/products/fusion/fusionwindows.html") + 'Microsoft Windows Compatibility Chart</a></td></tr>');
    document.write('<tr>' + col_desc("imnav", "/customer/WindowsVistaInstall34.html") + 'Installing Fusion 3.4 under Windows Vista</a></td></tr>');
    document.write('</table>');            
}



// Prints out the left menu for the 'about us' page.
function lmenu_about_us() {
    document.write('<table cellspacing="1" cellpadding="0" border="0" width="169" >');
    document.write('<tr><td class="title">About Us</a></td></tr>');
    document.write('<tr>' + col_desc("imnav", "/company/careers.html") + 'Careers</a></td></tr>');
    document.write('<tr>' + col_desc("imnav", "/company/directions.html") + 'Contact Us</a></td></tr>');
    document.write('<tr>' + col_desc("imnav_sub1", "/company/toronto.html") + 'Directions</a></td></tr>');
    document.write('<tr>' + col_desc("imnav_sub1", "http://www.mapquest.com/maps/map.adp?countryid=41&addtohistory=&country=CA&address=&city=&state=&zipcode=M5R+3H8&submit=Get+Map\" target=\"_blank", 1) + 'Map</a></td></tr>');
    document.write('</table>');
}


// Prints out the left menu for the 'our services' page.
function lmenu_our_services() {
    document.write('<table cellspacing="1" cellpadding="0" border="0" width="169" >');
    document.write('<tr>' + col_desc("title", "/services/our_people.html") + 'Our Consultants</a></td></tr>');
    document.write('</table>');
}


// Prints out the left menu for the 'our products' page.
function lmenu_our_products(product) {
    document.write('<table cellspacing="1" cellpadding="0" border="0" width="169" >');
    document.write('<tr>' + col_desc("title") + 'Our Products</a></td></tr>');
    document.write('<tr>' + col_desc("imnav", "/products/fusion/overview.html") + 'Netron Fusion&trade;</a></td></tr>');
    lmenu_fusion();
    document.write('</table>');
}

// Prints out the items for the 'fusion' menu.
function lmenu_fusion() {
    document.write('<tr>' + col_desc("imnav_sub1", "/products/fusion/frame_technology.html") + 'Frame Technology</a></td></tr>');
    document.write('<tr>' + col_desc("imnav_sub2", "/products/fusion/overview_construction_tools.html") + 'Construction Tools</a></td></tr></span>');
    document.write('<tr>' + col_desc("imnav_sub2", "/products/fusion/overview_app_components.html") + 'Components</a></td></tr>');
    document.write('<tr>' + col_desc("imnav_sub2", "/products/fusion/overview_pm_and_ot_tools.html") + 'Project Management & Organization Tools</a></td></tr>');
    document.write('<tr>' + col_desc("imnav_sub2", "/products/fusion/overview_analysis_tools.html") + 'Analysis Tools</a></td></tr>');
    document.write('<tr>' + col_desc("imnav_sub1", "/company/qsm_study.html") + 'Independent QSM Study</a></td></tr>');  
    document.write('<tr>' + col_desc("imnav_sub1") + 'Case Studies</td></tr>');
    document.write('<tr>' + col_desc("imnav_sub2", "/products/fusion/barclays_case_study.html") + 'Barclaycard</a></td></tr>');
    document.write('<tr>' + col_desc("imnav_sub2", "/products/fusion/rsl_case_study.html") + 'RSL COM (Motorola)</a></td></tr>');
    document.write('<tr>' + col_desc("imnav_sub2", "/products/fusion/rsl_case_study_sidebar.html") + 'Meshing Java &amp; Cobol</a></td></tr>');  
}


// Prints out the left menu for the 'software reuse' page.
function lmenu_software_reuse() {
    document.write('<table cellspacing="1" cellpadding="0" border="0" width="169" >');
    document.write('<tr><td class="title">Software Reuse</td></tr>');
    document.write('<tr>' + col_desc("imnav", "/company/paul_bassett.html") + 'Paul Bassett</a><br></td></tr>');
    document.write('<tr>' + col_desc("imnav_sub1", "/company/interview_with_pbassett.html") + 'Interview</a></td></tr>');
    document.write('<tr>' + col_desc("imnav", "/company/framing_software_reuse.html") + 'Framing Software Reuse</a></td></tr>');
    document.write('<tr>' + col_desc("imnav_sub1", "/company/book_foreword.html") + 'Book Foreword</a></td></tr>');
    document.write('<tr>' + col_desc("imnav_sub1", "/company/sample_chapter.html") + 'Sample Chapter</a></td></tr>');
    document.write('<tr>' + col_desc("imnav", "/company/qsm_study.html") + 'QSM Study</a></td></tr>');
    document.write('</table>');
}


// Prints out the left menu for the 'our customers' page.
function lmenu_our_customers() {
    document.write('<table cellspacing="1" cellpadding="0" border="0" width="169" >');
    document.write('<tr><td class="title">Our Customers</td></tr>');
    document.write('<tr>' + col_desc("imnav") + 'Press Releases</td></tr>');
    document.write('<tr>' + col_desc("imnav_sub1", "/company/press_releases/UofTAuthenticationSystem.html") + 'University of Toronto</a></td></tr>');
    document.write('</table>');
}


// Prints out the left menu for the 'support' page.
function lmenu_support() {
    document.write('<table cellspacing="1" cellpadding="0" border="0" width="169" >');
    document.write('<tr><td class="title">Support</td></tr>');
    document.write('<tr>' + col_desc("imnav", "/customer/securecustomer_signup.html") + 'Register On-Line</a></td></tr>');
    document.write('<tr>' + col_desc("imnav", "/customer/securecustomer/") + 'Customer Login</a></td></tr>');
    document.write('<tr>' + col_desc("imnav", "/customer/benefits.html") + 'Product Support Benefits</a></td></tr>');
    document.write('<tr>' + col_desc("title", "/") + 'TECHNICAL NOTES</td></tr>');   
    document.write('<tr>' + col_desc("imnav", "/products/fusion/fusionwindows.html") + 'Microsoft Windows Compatibility Chart</a></td></tr>');
    document.write('<tr>' + col_desc("imnav", "/customer/WindowsVistaInstall34.html") + 'Installing Fusion 3.4 under Windows Vista</a></td></tr>');
    document.write('<tr>' + col_desc("imnav", "/customer/dst2007.html") + 'Daylight Savings Time and Netron Products</a></td></tr>');
    document.write('</table>');
}


// Prints out the left menu for the 'customer support' page.
function lmenu_customer_support() {
    document.write('<table cellspacing="1" cellpadding="0" border="0" width="169" >');
    document.write('<tr><td class="title">Customer Support</td></tr>');
    document.write('<tr>' + col_desc("imnav") + 'Netron Fusion&trade;</td></tr>');
    document.write('<tr>' + col_desc("imnav_sub1", "/products/fusion/fusion34.html") + 'Netron Fusion&trade; 3.4</a></td></tr>');
    document.write('<tr>' + col_desc("imnav_sub1", "/customer/securecustomer/fusion/FusionFixPacks.html") + 'Final 3.3 Fix Pack</a></td></tr>');
    document.write('<tr>' + col_desc("imnav_sub1", "/customer/securecustomer/tips/tips.html") + 'Tips & Techniques</a></td></tr>');
    document.write('<tr>' + col_desc("imnav_sub1", "/customer/securecustomer/fwguide/") + 'Frame Writing Guidlines</a></td></tr>');
    document.write('<tr>' + col_desc("imnav") + 'Netron Hotrod&trade;</td></tr>');
    document.write('<tr>' + col_desc("imnav_sub1", "/customer/securecustomer/hotrod/WebSync/") + 'WebSync Updates</a></td></tr>');
    document.write('<tr>' + col_desc("imnav_sub2", "/customer/securecustomer/hotrod/WebSync/HotRodEE31WS3.html") + 'Edition 3.1.1 WebSync 3</a></td></tr>');
    document.write('<tr>' + col_desc("imnav_sub2", "/customer/securecustomer/hotrod/WebSync/HotRodEE31WS2.html") + 'Edition 3.1 WebSync 2</a></td></tr>');
    document.write('<tr>' + col_desc("imnav_sub2", "/customer/securecustomer/hotrod/WebSync/HotRodEE30WS4.html") + 'Edition 3.0 WebSync 4</a></td></tr>');
    document.write('<tr>' + col_desc("imnav_sub2", "/customer/securecustomer/hotrod/WebSync/HotRodEE30WS3.html") + 'Edition 3.0 WebSync 3</a></td></tr>');
    document.write('<tr>' + col_desc("imnav_sub2", "/customer/securecustomer/hotrod/WebSync/HotRodEE26WS2.html") + 'Edition 2.6 WebSync 2</a></td></tr>');
    document.write('<tr>' + col_desc("imnav") + 'Netron/Cap</td></tr>');
    document.write('<tr>' + col_desc("imnav_sub1", "/download-s/cap/") + 'Documentation</a></td></tr>');
    document.write('</table>');
}


// Prints out the footer menu.
function fmenu(modified_date){
    var d_today = new Date();
    var d_moddate = new Date(modified_date);
    var str_moddate = (d_moddate.getMonth()+1) + '/' + d_moddate.getDate() + '/' + d_moddate.getFullYear();
    document.write('<table  border="0" cellpadding="3" cellspacing="0" width="722">');
    document.write('  <tr>');
    document.write('    <td colspan="2" width="100%">');
    document.write('      <hr width="100%">');
    document.write('    </td>');
    document.write('  </tr>');
    document.write('  <tr>');
    document.write('    <td width="107">');
    document.write('      <img src="' + make_address("/images/foot_logo.gif") + '" border="0">');
    document.write('    </td>');
    document.write('    <td>');
    document.write('      <span class="footnote"><center>');
    document.write('&nbsp;&nbsp;Copyright &copy; Netron Inc. 1981-' + d_today.getFullYear() + '. All rights reserved.&nbsp;&nbsp;');
    document.write('<a href ="' + make_address("/privacy.html") + '" target="_top">Privacy</a> / ');
    document.write('<a href="' + make_address("/privacy.html#legal") + '" target="_top">Legal</a> Information<br>');
    document.write('        Page Last Updated on '+ str_moddate + '<br>');
    document.write('</center></span></td>');
    document.write('</tr>');
    document.write('</table>');
}

