//--------------------------------------------------------------------------------
//
//    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 customoize)
// Server - http://www.honeywell.com
// Note: For testing, we have given staging server URL in the below.
//--------------------------------------------------------------------------------

var dtServer = "http://www51.honeywell.com";

//--------------------------------------------------------------------------------



/*  Secured pages (https) redirect code below  */

// Set the variable is to "Yes" if site is COMPLETELY secure and "No" if site is partially secure
var siteSecure="No";

// Set the Path of the Pages without any parameters
// For example:
// URL http://www.honeywell.com/sample/sample.html?c=41 should be entered into the array as
// /sample/sample.html

var secureList=[
'/aero/kcp/partnering-sub/request-info.html'
];

if(siteSecure=="Yes") {
	// Site is completely secure
	if(window.location.protocol!="https:") {
		// Change the protocol from http -> https
	   	var secure_url = location.href;
	    	secure_url = "https://" + secure_url.substring(secure_url.indexOf('http://')+7, secure_url.length);
	    	window.location = secure_url;
  	}
} else {
	// Site may be completely insecure or partially secure
	var currURL = location.href;
	var currURLPath = location.pathname;
	var currURLProtocol = location.protocol;

	doesURLExist = false;
	for(index=0;index<secureList.length;index++) {
		if(currURLPath==secureList[index])	{
			doesURLExist = true;
			if(window.location.protocol!="https:") {
				// Redirect http to https protocol
			   	var secure_url = location.href;
			    secure_url = "https://" + secure_url.substring(secure_url.indexOf('http://')+7, secure_url.length);
	    		window.location = secure_url;
	  		}
	  		break;
		}
	}

	if(!doesURLExist) {
		if(window.location.protocol!="http:") {
			// Redirect https to http protocol
			var secure_url = location.href;
		  	secure_url = "http://" + secure_url.substring(secure_url.indexOf('https://')+8, secure_url.length);
    		window.location = secure_url;
    	}
	}
}

if (window.location.protocol!="http:") {
	dtServer = "https://www51.honeywell.com";
} else {
	dtServer = "http://www51.honeywell.com";
}


//----------------------------------------------------------------------------------

//--------------------------------------------------------------------------------
//
//  Color palettes are defined in the UWS Style Guide and different colors 
//  are typically aligned with different business units.
//   
//  Possible colours
//       - green
//       - navy
//       - indigo
//       - brightblue
//       - red
//       - darktan
//--------------------------------------------------------------------------------

var uws_palette = 'brightblue';

//--------------------------------------------------------------------------------
var site = 'mysite';
//--------------------------------------------------------------------------------

//--------------------------------------------------------------------------------
//   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 'own' 
//-------------------------------------------------------------------------------------
 
var n1n2filepath = '/aero/kcp/common/scripts/N1N2_menu.js';   

//--------------------------------------------------------------------------------
//  N1N2 Menu site id: Based on this value menus will be displayed.
//    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 = 'honeywell';  


//--------------------------------------------------------------------------------
//
//  Breadcrumb type. 
//        -  uws (Breadcrumb will be loaded from the uws server.uws_breadcrumb must needed)
//        -  custom (Breadcrumb will be loaded from the n1n2filepath value) 
//
//--------------------------------------------------------------------------------

var breadcrumbType = 'uws';

//--------------------------------------------------------------------------------
//
//  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 = 'kcp';

//--------------------------------------------------------------------------------
//
//  Custom Breadcrumb 
//
//  custom_taxonomy_bc = { 'siteID' : ['ParentSiteID','mySiteURL','ImageFileWithSiteName'] };
//
//--------------------------------------------------------------------------------

var custom_taxonomy_bc = { 
          
          'parent' : ['honeywell','http://www.myserver.com','images/txt_mySite.gif'] ,
          'mysite' : ['parent','http://www.myserver.com/mysite/','images/txt_mySite.gif'] 
          
          };


//--------------------------------------------------------------------------------
// eMetrics enabling field.value can be true or false.(can be customize)
//--------------------------------------------------------------------------------

var use_eMetrics = true;

function hideDropDown(val){
	if(document.getElementById("sm") != null)
	document.getElementById("sm").style.visibility="hidden";
	if(document.getElementById("sy") != null)
	document.getElementById("sy").style.visibility="hidden";
	if(document.getElementById("em") != null)
	document.getElementById("em").style.visibility="hidden";
	if(document.getElementById("ey") != null)
	document.getElementById("ey").style.visibility="hidden";
}

function showDropDown(val){
	if(document.getElementById("sm") != null)
	document.getElementById("sm").style.visibility="visible";
	if(document.getElementById("sy") != null)
	document.getElementById("sy").style.visibility="visible";
	if(document.getElementById("em") != null)
	document.getElementById("em").style.visibility="visible";
	if(document.getElementById("ey") != null)
	document.getElementById("ey").style.visibility="visible";
}
//--------------------------------------------------------------------------------
// loading N1N2 menu code  (Do not customoiz)
//--------------------------------------------------------------------------------

document.write("<script language='JavaScript' src='"+dtServer+"/common/scripts/serverprops.js'></script>");
/* inculde of the omnitue file */
//document.write("<script language='JavaScript' src='"+dtServer+"/sm/common/scripts/s_code.js'></script>");
//document.write("<script language='JavaScript' src='"+dtServer+"/sm/common/scripts/omniture_sm_common.js'/></script>");
/* inculde of the omnitue file ends*/

if(menuType == "uws")
document.write("<script language='JavaScript' src='"+dtServer+"/aero/common/scripts/"+n1n2MenuSiteID+"_N1N2.js'></script>");
else
document.write("<script language='JavaScript' src='"+dtServer+n1n2filepath+"'></script>");
document.write("<script language='JavaScript' src='"+dtServer+"/common/scripts/uws_main.js'></script>");
document.write("<script language='JavaScript' src='"+dtServer+"/common/scripts/hw_bc_taxonomy.js'></script>");

//--------------------------------------------------------------------------------

//--------------------------------------------------------------------------------
// loading tools code (Path can be customize)
//--------------------------------------------------------------------------------

function uws_tools(Login,Search,Download)
{   
    
  // if(Login)                                                                                            
   //	document.write('<script language="JavaScript" src="/hser/common/scripts/login.js"></script>');                
   if(Search)
   	document.write('<script language="JavaScript" src="/aero/kcp/common/scripts/search.js"></script>'); 
   if(Download)
   	document.write('<script language="JavaScript" src="/aero/kcp/common/scripts/MSDS_kcp.js"></script>');      
}

//--------------------------------------------------------------------------------
// Region selector (can be customized)
//--------------------------------------------------------------------------------

// No ofRegions 
var noOfRegions = 14;

// Based on this value drop list will display.(If noOfRegions less than 7 this value is needed)
var region_name_url = [
	['United States','http://www.honeywell.com'] ,
	['India', 'http://www.honeywell.com/sites/htsl'],
	['Austria', 'http://www.honeywell.at/'],
	['China', 'http://www.honeywell.com/sites/china'],
	['Finland', 'http://www.honeywell.com/sites/fi'],
	['Germany', 'http://www.honeywell.com/sites/de'],
	['France', 'http://www.honeywell.com/sites/fr'],
	['Poland', 'http://www.honeywell.com.pl/'],
	['South Africa', 'http://www.honeywell.com/sites/za'],
	['United Kingdom ', 'http://www.honeywell.com/sites/uk'],
	['Denmark', 'http://www.honeywell.dk/'],
	['Canada', 'http://www.honeywell.ca/'],
	['Belgium', 'http://www.honeywell.be/'],
	['Czech Republic', 'http://www.honeywell.com/sites/cz']
];
if(noOfRegions < 8)
noOfRegions = region_name_url.length;

// Region selector page url (if noOfRegions greater than 7 this value is needed)
var region_selector_url = 'http://www.honeywell.com/sites/portal?smap=honeywell&page=honeywellglobal&theme=T8';

//--------------------------------------------------------------------------------

//--------------------------------------------------------------------------------
// Region selector (can be customized)
//--------------------------------------------------------------------------------

// Based on this value language drop down list will display.
var language_url = [
	['English','http://www.honeywell.com?ln=en'] ,
	['German','http://www.honeywell.com?ln=gr'] 
];

//--------------------------------------------------------------------------------



//--------------------------------------------------------------------------------
// Footer code (can be customized)
//--------------------------------------------------------------------------------

// For providing the sitemap link in the footer
var sitemapURL = '/aero/kcp/sitemap.html';
var privacyURL = '/aero/kcp/privacy-statement.html';
var termsconditionsURL = '';
var imprintURL = '';
// For providing the advance search in the footer

var advanceSearchURL = 'http://search.honeywell.com/search?site=kcp&q=&output=xml_no_dtd&client=ecm_en_frontend&proxystylesheet=ecm_en_frontend&proxycustom=<ADVANCED/>&baseSite=kcp';

var myAerospace='http://portal.honeywell.com/wps/portal/aero';
function uws_getFooterAndGlobalLinks(showRegion, showTranslate) {
	var sOut = '';

	sOut += '<form name="footerForm"><div id="footer">';
	sOut += '<table border="0" cellpadding="0" cellspacing="0" width="760" id="footrule">';
	sOut += '<tr class="footrule">';
	sOut += '<td><img src="/common/images/c.gif" width="1" height="4" border="0"></td>';
	sOut += '</tr><tr>';
	sOut += '<td><img src="/common/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="500" class="footer" height="20" colspan="7">';
	sOut += '<div class="marg16">';
	
	if(termsconditionsURL != '')
 	sOut += '<a target="_blank" href="'+dtServer+termsconditionsURL+'"><font color="#333333">Terms & Conditions</font></a>';
	
	if(privacyURL != '')
	sOut += '  <a href="'+dtServer+privacyURL+'"><font color="#333333">Privacy Statement</font></a>';

	if(imprintURL != '')
 	sOut += ' | <a href="'+imprintURL+'"><font color="#333333">Imprint</font></a>';


	// sOut += ' | <a href="http://www.honeywell.com/sites/portal?smap=honeywell&page=copyright&theme=T8" target=""><font color="#333333">Impressum</font></a>';
	//sOut += '<a href="http://www.honeywell.com/privacy/" target=""><font color="#333333">Privacy Statement</font></a>';	

	if(sitemapURL != '')
	sOut += ' | <a href="'+dtServer+sitemapURL+'"><font color="#333333">Site Map</font></a>';
	
	if(advanceSearchURL != '')
	sOut += ' | <a href="'+advanceSearchURL+'"><font color="#333333">Advanced Search</font></a>';
	//sOut += ' | <a href="'+myAerospace+'" target="_blank"><font color="#333333">myAerospace</font></a>';
	sOut += '</div></td>';
	
	sOut += '<TD width="260" align="right"><table border="0" cellpadding="0" cellspacing="0"><tr><td></td>';
			 

	if (showRegion) {	
		sOut += '<TD class="bgwhite" width="3"><IMG src="/common/images/c.gif" width="3" height="24" border="0"></TD>';		
		if(parseInt(noOfRegions) > 7)
		{		    
		    sOut += '<TD width="40"><DIV class="marg16" id="flag"><A';
		    sOut += ' href="'+region_selector_url+'"><IMG height=14 src="/common/images/icon_flag_usa.gif" width="20" border="0"></A></DIV></TD><TD class="footer" width="150"><A';
		    sOut += ' class="region" href="'+region_selector_url+'">Choose Your Region/Country</A></div>';	 	    
	        } else
	        {	        
	    	    sOut += '<td width="5"><IMG src="/common/images/c.gif" height="1" width="5"></td><TD class="footer" width="170">';
	    	    sOut += '<select size="1" name="showRegion" class="footerRegion" onChange="javascript:openWindow(document.footerForm.showRegion);">';
	    	    sOut += '<option value="#"> Choose Your Region/Country ';    
		    for(var i=0;i<noOfRegions;i++)
		    {
			sOut += '<option value="'+region_name_url[i][1]+'">'+region_name_url[i][0];    
		    }
	            sOut += '</select>';
	        }	        		
      	        sOut += '</TD><td width="5"><IMG src="/common/images/c.gif" height="1" width="5"></td>';
         }                                         
        
	 if (showTranslate) {	 
	     sOut += '<TD class=bgwhite width="3"><IMG src="/common/images/c.gif" width="3" height="1" border="0"></TD>';
	     sOut += '<td width="5"><IMG src="/common/images/c.gif" height="1" width="5"></td>';
	     sOut +='<td class="footer" width="135"><select class="lang" name="language" onChange="javascript:openWindow(document.footerForm.language);">';
	     sOut += '<option value="">Select Your Language';
	     for(var i=0;i<language_url.length;i++)
	     {
	     sOut += '<option value="'+language_url[i][1]+'">'+language_url[i][0];
	     }
	     sOut += '</select></td>';
	     sOut += '<td width="15"><IMG src="/common/images/c.gif" height="1" width="15"></td>';
	 } 	

	sOut += '</tr></table><IMG src="/aero/kcp/common/images/Logo.jpg" alt="The Kansas City Plant is operated and managed by Honeywell FM&T for NNSA" vspace="2">  </td></tr></table>';
	
	sOut += '<table border="0" cellpadding="0" cellspacing="0" width="760">';
	sOut += '<tr><td height="3"><img src="/common/images/c.gif" height="3"></td></tr>';
	sOut += '<tr><td align="center">';
	sOut += '&#169; Copyright 2004-2012 Honeywell Federal Manufacturing &#38; Technologies, LLC, pursuant to Prime Contract DE-NA0000622';
	sOut += '</td></tr>';
	sOut += '<tr><td height="3"><img src="/common/images/c.gif" height="3"></td></tr>';
	sOut += '</table>';	
	
	sOut += '</div></form>';

	document.write(sOut);
}

function openWindow(opt)
{
	if(opt.options.selectedIndex != -1 && opt.options.selectedIndex != 0)
	{
		window.open(opt.options[opt.options.selectedIndex].value);		
	}
}
//--------------------------------------------------------------------------------

// added to fix n2 drop down spacing issue//

// added to fix n2 drop down spacing issue//

function getLeftSpace(preLeftSpace,charLength)
{

        var emptySpace = (preLeftSpace + (eval(parseInt(charLength)*fontWidth)));

	var emptySpace = (preLeftSpace + (eval(parseInt(charLength)*fontWidth)));
	if(is_nav4)
	{
	emptySpace = emptySpace - nav4Buff;	
	}
	
if(emptySpace == 28) // For about us drop down
emptySpace = emptySpace + 21;

if(emptySpace == 105) // For technologies drop down
emptySpace = emptySpace + 19;

if(emptySpace == 208) // For partnering drop down
emptySpace = emptySpace + 29;

if(emptySpace == 307) // For scm drop down
emptySpace = emptySpace + 23;

if(emptySpace == 449) // For news & events drop down
emptySpace = emptySpace + 14;

if(emptySpace == 554) // For careers drop down
emptySpace = emptySpace + 21;

	return emptySpace;		
}



function loadN2()
{	
	if(n1_popup_menus[currsection] != undefined && (n1_popup_menus.length == undefined || n1_popup_menus.length > 0))
	{	
		for(var i=1;i<n1_popup_menus[currsection].length;i++)
			
 		menulist2[i-1] = n1_popup_menus[currsection][i];
 		
 		if(currsection == 1){
 			n2_empty_pixels =20;
 		}else if(currsection == 2){
 			n2_empty_pixels =20;
 		}else if(currsection == 3){
 			n2_empty_pixels =180;
 		}else if(currsection == 4){
 			n2_empty_pixels =50;
 		}else if(currsection == 5){
 			n2_empty_pixels =240;
 		}else if(currsection == 6){
 			n2_empty_pixels =535;
 		}else{
 			n2_empty_pixels =10;
 		}
 		//calN2emptySpace(i);
 	
 		//calN2emptySpace();
	}
	
}

function calculateN1_empty()
{
  var totalLength = 0;
  var tp = 0;
  var j = 0;
  for(var i=0;i<menulist.length;i++)
  {
	   j = menulist[i][0].search('&');
       if(j!=-1)
      	  tp = tp + 2;
      totalLength = totalLength + 20 + eval(parseInt(menulist[i][0].length)*fontWidth)+2;
  }   
  if(totalLength < 760)
     n1_empty_pixels = 760 - totalLength;
 n1_empty_pixels = n1_empty_pixels - tp;

}

function calN2emptySpace()

{

            var n2LeftSpace = 0;

            for(var i=0;i<menulist2.length;i++)

            {
			 //n2LeftSpace = eval(parseInt(n2LeftSpace) - ) + eval(parseInt(menulist2[i][0].length)*fontWidth);
			 
			  n2LeftSpace =700; 
			 
             }
            //if(n2LeftSpace < 760)
           // n2_empty_pixels = 760 - n2LeftSpace;  
          
           n2_empty_pixels =200;
}


function setCurrsection()
{
	
	var strURL = new String(location.href);
	var splitStr = strURL.split('/');
	var len = splitStr.length;
	len = len - 1;
	var link = splitStr[len];
	var strn = link.substring(0,4);
	strn = strn.toLowerCase();
	var menulen = menulist.length;
	var sturl = location.search;
	lc1 = sturl.indexOf("c=");
	var j;
	if(lc1>0){
		lc1 = lc1 + 2;
		lc2 = lc1 + 2;
		stc = sturl.substring(lc1,lc2);
		c1 = stc.substring(0,1);
		c2 = stc.substring(1,2);
		if(stc!=''){
			currsection=c1;
			currsection2=c2;
		}
	}
	else{
	k = location.href;
	k = k.substring(0,k.indexOf(".html"));
	for(i=0;i<menulen;i++)
	{
		if(menulist[i][1]!='.html'){
			k = k + '.html';
			j = k.search(menulist[i][1]);
		}
		else
			j = k.search(menulist[i][1]);
		if(j!=-1){
			currsection = menulist[i][2];
			break;
		}
		else
		{	
			 // currsection = 'home';
		}
	}
}
}

function setCurrsection2()
{
	if(currsection!=''){
		if(n1_popup_menus[currsection]==undefined)
			currsection2='';
		else{
			var sturl = location.search;
			lc1 = sturl.indexOf("c=");
			if(lc1>0){
				lc1 = lc1 + 2;
				lc2 = lc1 + 2;
				stc = sturl.substring(lc1,lc2);
				c1 = stc.substring(0,1);
				c2 = stc.substring(1,2);
				if(stc!=''){
					currsection=c1;
					currsection2=c2;
				}
			}
			else
				currsection2='-11';
		}
	}
	else {
	var strURL = new String(location.href);
	//strURL = strURL.substring(0,strURL.indexOf(".html"));
	var splitStr = strURL.split('/');
	var len = splitStr.length;
	len = len - 1;
	var link = splitStr[len];
	len = len - 1;
	var str_news = splitStr[len];
	var strn = link.substring(0,4);
	str_news = str_news.toLowerCase();
	var menulen = menulist.length;
	var keylen = n1_keys.length;
	if(str_news=='news')
	{
		for(i=0;i<menulen;i++){
			tmp = menulist[i][0].toLowerCase();
			j = tmp.search(str_news);
			if(j!=-1){
				currsection = menulist[i][2];			
				if(n1_popup_menus[currsection]!=undefined)
					currsection2 = '1';
			}
		}
		
	}
	else {
	outer_loop:
	for(var m=1;m<keylen;m++){
		if(n1_popup_menus[m]==undefined){
		currsection2='';
	}
	else {
	if(n1_popup_menus[m] != undefined && (n1_popup_menus.length == undefined || n1_popup_menus.length > 0))
		{	
			for(var i=1;i<n1_popup_menus[m].length;i++){
				menu2 = new String(n1_popup_menus[m][i]);
				dr = menu2.split(',');
				tp_dr = dr[1].split('/');
				len = tp_dr.length;
				len = len - 1;
				if(tp_dr[len]==link){
					currsection = m;
					currsection2 = dr[2];
					break outer_loop;
				}
				else{
					currsection2='';
				}
			}
 		}	
	     }
           }
          }
       }
}


function setCurrsection3()
{

	/*	if(menulist3==undefined)
	alert("in curSec3 - menulist value")
	if(menulist3!=undefined){
	alert("in curSec3 -  length="+menulist3.length); }
	
	if(menulist3!=undefined){ */
	var sturl = location.search;
	//var mlen =menulist3.length;
	lc1 = sturl.indexOf("c=");
	lc1 = lc1 + 2;
	lc2 = lc1 + 2;
	lc3=lc2+2;
	
	
	stc = sturl.substring(lc1,lc2);
	stc1= sturl.substring(lc1,lc3);
	
	
	c1 = stc.substring(0,1);
	c2 = stc.substring(1,2);
	c3= stc1.substring(2,3);
	
	if(stc!=''){
		currsection=c1;
		currsection2=c2;
		sturl = location.href;
		if(c3 !='a')
		{
		out_loop:
		for(i=0;i<menulist3.length;i++)
		{	
			j = sturl.search(menulist3[i][1]);
			if(c3 !='')
				{

					currsection3 = c3;	
				}
				if(j!=-1)
			{
				currsection3 = menulist3[i][2];
				break out_loop;
			}
		
			
				
			
			if(n4_menus[menulist3[i][2]]!=undefined)
			{
				m4 = n4_menus[menulist3[i][2]];
				out_loop1:
				for(k=0;k<m4.length;k++){
					j = sturl.search(m4[k][1]);
					if(j!=-1){
						currsection3 = menulist3[i][2];
						currsection4 = m4[k][2];
						break out_loop1;
					}
				}
			}
		}//upper for ending
		
	}else
		{
			
			currsection3=0;
		}
		
	} 
	
}
	
//
// MSDS Drop downs //

// ----------------------------------------------------------------------------------
// contains the html and style code for the download box.  
//                 
//   Note:
//      Business logic is not implemented. Please implement it before using.       
// ----------------------------------------------------------------------------------
function showDoc(){
	var selObj = document.search.pdflistbox;
	if(selObj.selectedIndex==0){
		alert("Please select a Document you wish to download.");
		return;
	}
	//Opening a new window where the document gets downloaded.
	window.open(selObj.options[selObj.selectedIndex].value, "win1", "width=700, height=600, location=no, menubar=no, status=no, toolbar=yes, scrollbars=yes, resizable=yes");
}	

function populate(){
	if(MSDS!=undefined && MSDS.length>0){
document.write('<table cellpadding="0" cellspacing="0" border="0" width="161" class="bgwhite" id="searchmod3">');
document.write('<tr><td rowspan="5" width="1" class="search_outerrule"><img src="/common/images/c.gif" alt="" width="1" height="1" border="0"></td>');
document.write('<td rowspan="4" width="1"><img src="/common/images/c.gif" alt="" width="1" height="1" border="0"></td>');
document.write('<td colspan="4"><img src="/common/images/c.gif" alt="" width="1" height="1" border="0"></td>');
document.write('<td rowspan="4" width="1"><img src="/common/images/c.gif" alt="" width="1" height="1" border="0"></td>');
document.write('<td rowspan="4" width="1" class="search_innerrule"><img src="/common/images/c.gif" alt="" width="1" height="1" border="0"></td>');
document.write('<td rowspan="5" width="1" class="search_outerrule"><img src="/common/images/c.gif" alt="" width="1" height="1" border="0"></td>');
document.write('</tr><tr><td colspan="4" style="vertical-align :top;" class="search_innerrule">');
document.write('<table cellpadding="0" cellspacing="0" border="1" width="158" bordercolor="#606060" class="searchbg" id="searchmod3a">');
document.write('<tr><td><div class="searchhdr1"><img vpsace="2" src="/aero/kcp/common/images/auction-site-txt.gif" alt="Auction Site" title="Auction Site" height="8" border="0"></div></td>');
document.write('<td width="15"><div id="docplus"><a onClick=\'showMod("doc","downloadCookie");\'><img src="/common/images/but_plus_gray.gif" alt="+" width="15" height="15" border="0"></a></div><div id="docminus"><a onClick=\'hideMod("doc","downloadCookie");\'><img src="/common/images/but_minus_gray.gif" alt="-" width="15" height="15" border="0"></a></div></td>');
document.write('</tr></table>');
document.write('<table cellpadding="0" cellspacing="0" border="0" width="158" id="searchmod3b">');
document.write('<tr class="bgwhite"><td><img src="/common/images/c.gif" alt="" width="1" height="2" border="0"></td></tr>');
document.write('<tr><td class="search"><form name="search"><div class="search" id="doc">');
document.write('<table cellpadding="0" cellspacing="0" border="0"><tr><td>');
document.write('<select name="pdflistbox" class="search"><option value=""> --Select a Document-- </option>');
for(i=0;i<MSDS.length;i++){
	document.write('<option value="'+MSDS[i][0]+'">');
	document.write(MSDS[i][1]);
	document.write('</option>');
}
document.write('</select></td><td rowspan="2"></td>');
document.write('<td class="search"><a href="javascript:showDoc();"><img src="/common/images/icon_arrow_circ.gif" width="14" height="14" alt="Download Technical Docs" title="Download Technical Docs" border="0"/></a></td></tr>');
document.write('</table></div></form></td></tr></table></td></tr>');
document.write('<tr><td colspan="8"><img src="/common/images/c.gif" alt="" width="1" height="1" border="0"></td></tr>');
document.write('<tr><td colspan="8" class="search_innerrule"><img src="/common/images/c.gif" alt="" width="1" height="1" border="0"></td></tr>');
document.write('<tr><td colspan="8" class="search_outerrule"><img src="/common/images/c.gif" alt="" width="1" height="1" border="0"></td></tr>');
document.write('</table>');
}
}

//      *************** dcs_tag code added to implement the webtrens functionlity for the documents ******************

var gImages=new Array;
var gIndex=0;
var DCS=new Object();
var WT=new Object();
var DCSext=new Object();

// var gDomain line Edited on 11-10-2004
var gDomain="sdc.honeywell.com"

var gDcsId="";

function dcsVar(){
	var dCurrent=new Date();
	WT.tz=dCurrent.getTimezoneOffset()/60*-1;
	if (WT.tz==0){
		WT.tz="0";
	}
	WT.bh=dCurrent.getHours();
	WT.ul=navigator.appName=="Netscape"?navigator.language:navigator.userLanguage;
	if (typeof(screen)=="object"){
		WT.cd=screen.colorDepth;
		WT.sr=screen.width+"x"+screen.height;
	}
	if (typeof(navigator.javaEnabled())=="boolean"){
		WT.jo=navigator.javaEnabled()?"Yes":"No";
	}
	if (document.title){
		WT.ti=document.title;
	}
	WT.js="Yes";
	if (typeof(gVersion)!="undefined"){
		WT.jv=gVersion;
	}
	DCS.dcsdat=dCurrent.getTime();
	DCS.dcssip=window.location.hostname;
	DCS.dcsuri=window.location.pathname;
	if (window.location.search){
		DCS.dcsqry=window.location.search;
	}
	if ((window.document.referrer!="")&&(window.document.referrer!="-")){
		if (!(navigator.appName=="Microsoft Internet Explorer"&&parseInt(navigator.appVersion)<4)){
			DCS.dcsref=window.document.referrer;
		}
	}
}

function A(N,V){
	return "&"+N+"="+dcsEscape(V);
}

function dcsEscape(S){
	if (typeof(RE)!="undefined"){
		var retStr = new String(S);
		for (R in RE){
			retStr = retStr.replace(RE[R],R);
		}
		return retStr;
	}
	else{
		return escape(S);
	}
}

function dcsCreateImage(dcsSrc){
	if (document.images){
		gImages[gIndex]=new Image;
		gImages[gIndex].src=dcsSrc;
		gIndex++;
	}
	else{
		document.write('<IMG BORDER="0" NAME="DCSIMG" WIDTH="1" HEIGHT="1" SRC="'+dcsSrc+'">');
	}
}

function dcsMeta(){
	var myDocumentElements;
	if (document.all){
		myDocumentElements=document.all.tags("meta");
	}
	else if (document.documentElement){
		myDocumentElements=document.getElementsByTagName("meta");
	}
	if (typeof(myDocumentElements)!="undefined"){
		for (var i=1;i<=myDocumentElements.length;i++){
			myMeta=myDocumentElements.item(i-1);
			if (myMeta.name){
				if (myMeta.name.indexOf('WT.')==0){
					WT[myMeta.name.substring(3)]=myMeta.content;
				}
				else if (myMeta.name.indexOf('DCSext.')==0){
					DCSext[myMeta.name.substring(7)]=myMeta.content;
				}
				else if (myMeta.name.indexOf('DCS.')==0){
					DCS[myMeta.name.substring(4)]=myMeta.content;
				}
			}
		}
	}
}

function dcsTag(){
	//var P="http"+(window.location.protocol.indexOf('https:')==0?'s':'')+"://"+gDomain+(gDcsId==""?'':'/'+gDcsId)+"/dcs.gif?";
	
	// var P Code Edited on 11-10-2004
	var P="http"+(window.location.protocol.indexOf('https:')==0?'s':'')+"://"+gDomain +(gDcsId==""?'':'/'+gDcsId)+"/dcs.gif?";
	
	// old code
	//var P="http"+(window.location.protocol.indexOf('https:')==0?'s':'')+"://"+gDomain+(window.location.protocol.indexOf('https:')==0?':7443':':7080')+(gDcsId==""?'':'/'+gDcsId)+"/dcs.gif?";
	for (N in DCS){
		if (DCS[N]) {
			P+=A(N,DCS[N]);
		}
	}
	for (N in WT){
		if (WT[N]) {
			P+=A("WT."+N,WT[N]);
		}
	}
	for (N in DCSext){
		if (DCSext[N]) {
			P+=A(N,DCSext[N]);
		}
	}
	if (P.length>2048&&navigator.userAgent.indexOf('MSIE')>=0){
		P=P.substring(0,2040)+"&WT.tu=1";
	}
	dcsCreateImage(P);
	//alert(P);
}

// Copyright 2003 NetIQ Corporation
// $DateTime: 2003/07/15 09:41:01 $
// $Revision: 1.4 $
function dcsMultiTrack(){
        for (var i=0;i<arguments.length;i++){
                if (arguments[i].indexOf('WT.')==0){
                                WT[arguments[i].substring(3)]=arguments[i+1];
                                i++;
                }
                if (arguments[i].indexOf('DCS.')==0){
                                DCS[arguments[i].substring(4)]=arguments[i+1];
                                i++;
                }
                if (arguments[i].indexOf('DCSext.')==0){
                                DCSext[arguments[i].substring(7)]=arguments[i+1]
;
                                i++;
                }
        }
        var dCurrent=new Date();
        DCS.dcsdat=dCurrent.getTime();
        dcsTag();
}

dcsVar();
dcsMeta();
dcsTag();



//      *************** dcs_tag code end here to implement the webtrens functionlity for the documents ******************
