//--------------------------------------------------------------------------------
//
//    File name   : dynamicTemplate.js
//    Project     : UWS Dynamic Template
//    Description : This js file used to display the Dynamic template menus 
//                  ,footer and tools js file loading process.
//    version     : 1.0 
//--------------------------------------------------------------------------------


//--------------------------------------------------------------------------------
// Dynamic Template server (Do not customize)
// Dev - http://staging.honeywell.com:5064
// QA  - http://qwww.honeywell.com
// Production - http://www.honeywell.com
//--------------------------------------------------------------------------------

// var dtServer = "http://honeywell.com";

//--------------------------------------------------------------------------------
//
//  Color palettes are defined in the UWS Style Guide and various colors 
//  are typically aligned with different business units.
//   
//  Possible colours
//       - green
//       - navy
//       - indigo
//       - brightblue
//       - red
//       - darktan
//--------------------------------------------------------------------------------

var uws_palette = 'navy';

//--------------------------------------------------------------------------------
//   N1N2 Menu controlling variable   
//        -  uws (menus will be loaded from the uws server)
//        -  custom (menus will be loaded from the n1n2filepath value) 
//---------------------------------------------------------------------------------

var menuType = 'custom';  

//--------------------------------------------------------------------------------
//  File path of the N1N2 menu variable. This value is needed if menuType set as custom
//--------------------------------------------------------------------------------

var n1n2filepath = 'scripts/menu_N1N2.js';   

//--------------------------------------------------------------------------------
//  N1N2 Menu site id.Based on this value menus will be dispolayed.
//    Possible values
//          - honeywell (Honeywell)
//          - sm        (Specialty Material)
//          - em        (Electronic Material)
//          - rlss      (Research and Life science solutions)
//          - bandj     (Burdick & Jackson)
//          - gen       (Genetron® Refrigerants)
//          - genesolv  (Genesolv® Solvents)
//          - acs       (Automation and Control Solutions)
//          - aero      (Aerospace)
//          - turbo     (Turbo Technologies)       
//          - enovate   (Enovate® 3000)       
//--------------------------------------------------------------------------------

var n1n2MenuSiteID = 'cim';  


//--------------------------------------------------------------------------------
//
//  Breadcrumb type. 
//        -  uws (Breadcrumb will be loaded from the uws server.)
//        -  custom (Breadcrumb will be loaded from the n1n2filepath value) 
//
//--------------------------------------------------------------------------------

var breadcrumbType = 'custom'; //must be defined

//--------------------------------------------------------------------------------
//
//  UWS Breadcrumb
//          - honeywell (Honeywell)
//          - sm        (Specialty Material)
//          - em        (Electronic Material)
//          - rlss      (Research and Life science solutions)
//          - bandj     (Burdick & Jackson)
//          - gen       (Genetron® Refrigerants)
//          - genesolv  (Genesolv® Solvents)
//          - acs       (Automation and Control Solutions)
//          - aero      (Aerospace)
//          - turbo     (Turbo Technologies)       
//          - enovate   (Enovate® 3000)       
//  Custom Breadcrumb
//          - siteID ( Site id of your website)
//--------------------------------------------------------------------------------

var uws_breadcrumb = 'cim';

//--------------------------------------------------------------------------------
//
//  Custom Breadcrumb 
//
//  custom_taxonomy_bc = { 'siteID' : ['ParentSiteID','mySiteURL','ImageFileWithSiteName'] };
//
//--------------------------------------------------------------------------------

var custom_taxonomy_bc = { 
          
          'hon' : ['honeywell','http://honeywell.com','images/txt_honeywell.gif'] ,
          'acs' : ['honeywell','http://www.honeywell.com/sites/acs/','images/txt_asc_sm.gif'],
          'sec' : ['acs','http://www.security.honeywell.com/','images/txt_sec.gif'],
          'hsce' : ['sec','http://www.security.honeywell.com/hsce','images/txt_hsce.gif'],
          'cim' : ['sec','http://www.hascim.com/cim','images/txt_hsce.gif'],
          'mwt' : ['hsce','http://library.ademconet.com/MyWebTech','images/txt_hsce.gif']
         };


//--------------------------------------------------------------------------------
// eMetrix enabling field.value can be true or false.(can be customize)
//--------------------------------------------------------------------------------

var use_eMetrics = false;

//--------------------------------------------------------------------------------
// loading tools code (Path can be customized)
//--------------------------------------------------------------------------------

function uws_tools(Search,Login,Download)
{   
   if(Search)
   	document.write('<script language="JavaScript" src="scripts/search.js"></script>');   
   if(Login)                                                                                            
   	document.write('<script language="JavaScript" src="scripts/login.js"></script>');                
   if(Download)
   	document.write('<script language="JavaScript" src="scripts/download.js"></script>');      
}
//--------------------------------------------------------------------------------
// loading N1N2 menu code  (Do not customize)
//--------------------------------------------------------------------------------

document.write("<script language='JavaScript' src='scripts/serverprops.js'></script>");

if(menuType == "uws")
document.write("<script language='JavaScript' src='"+dtServer+"/sites/scripts/dt/"+n1n2MenuSiteID+"_N1N2.js'></script>");
else
document.write("<script language='JavaScript' src='"+n1n2filepath+"'></script>");

document.write("<script language='JavaScript' src='scripts/uws_main.js'></script>");
document.write("<script language='JavaScript' src='scripts/hw_bc_taxonomy.js'></script>");

//--------------------------------------------------------------------------------

//--------------------------------------------------------------------------------
// Footer code (can be customized)
//--------------------------------------------------------------------------------

// For providing the sitemap link in the footer
var sitemapURL = '';

// For providing the advance search in the footer
var advanceSearchURL = '';

function uws_getFooterAndGlobalLinks(showRegion, showTranslate) {
	var sOut = '';

	sOut += '<form name="choose_lang"><div id="footer">';
	sOut += '<table border="0" cellpadding="0" cellspacing="0" width="760" id="footrule">';
	sOut += '<tr class="footrule">';
	sOut += '<td><img src="images/c.gif" width="1" height="4" border="0"></td>';
	sOut += '</tr><tr>';
	sOut += '<td><img src="images/c.gif" width="1" height="4" border="0"></td>';
	sOut += '</tr></table>';
	sOut += '<table border="0" cellpadding="0" cellspacing="0" width="760" id="footnav">';
	sOut += '<tr class="footer" height="25">';
	sOut += '<td width="400" class="footer" height="20" colspan="7">';
	sOut += '<div class="marg16">';
	sOut += '<a href="http://www.honeywell.com/sites/portal?smap=honeywell&page=copyright&theme=T8" target="_blank">Terms & Conditions</a> | ';
	sOut += '<a href="http://www.honeywell.com/sites/portal?smap=honeywell&page=privacy&theme=T8" target="_blank">Privacy Statement</a>';	
	if(sitemapURL != '')
	sOut += ' | <a href="'+sitemapURL+'">Site Map</a>';
	if(advanceSearchURL != '')
	sOut += ' | <a href="'+advanceSearchURL+'">Advanced Search</a>';
	sOut += '</div></td>';

	if (showRegion) {
	    sOut += '<TD class="bgwhite" width="3"><IMG src="images/c.gif" width="3" height="24" border="0"></TD>';
	    sOut += '<TD width="40"><DIV class="marg16" id="flag"><A';
	    sOut += ' href=""><IMG height=14 src="images/icon_flag_usa.gif" width="20" border="0"></A></DIV></TD><TD class="footer" width="100"><A';
	    sOut += ' class="region" href="">Choose Your Region</A></div></TD>';
 	    sOut += '<TD width="3"><IMG src="images/c.gif" width="3" height="24" border="0"></TD><TD class=bgwhite width="3"><IMG alt="" src="images/c.gif" width="3" height="1" border="0"></TD>';	    
         } else {
	    sOut += '<TD width="40"></TD><TD class="footer" width="100">';
	    sOut += '</TD>';         	
         }                          
        
        if(!showRegion && showTranslate)
         sOut += '<TD class=bgwhite width="3"><IMG src="images/c.gif" width="3" height="1" border="0"></TD>';
        
	 if (showTranslate) {	    
	     sOut += '<td><IMG src="images/c.gif" height="1" width="4"></td>';
	     sOut += '<td><div class="marg16" id="transimg"><img src="images/txt_translate.gif" width="100" height="12" title="Translate this Page" alt="Translate this Page" border="0"></div></td>';
	     sOut +='<td class="footer"><select class="lang" name="language">';
	     sOut += '<option value="EN" >English</option></select></td>';
	     sOut += '<td class="footer" width="18"><a href="#"><img src="images/icon_arrow_circ.gif" width="14" height="14" hspace="4" title="Translate this Page" alt="Translate this Page" border="0"></a></td>';
	 } else {
	     sOut += '<td><IMG src="images/c.gif" height="1" width="220"></td>';
	 }	

	sOut += '</tr></table>';
	sOut += '</div></form>';

	document.write(sOut);
}



