//--------------------------------------------------------------------------------
//
//    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";

//--------------------------------------------------------------------------------
//
//  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/common/scripts/aerospace_N1N2.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 = 'aerospace';  


//--------------------------------------------------------------------------------
//
//  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 = 'aero';

//--------------------------------------------------------------------------------
//
//  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;

//--------------------------------------------------------------------------------
// loading N1N2 menu code  (Do not customoiz)
//--------------------------------------------------------------------------------

document.write("<script language='JavaScript' src='"+dtServer+"/common/scripts/serverprops.js'></script>");

if(menuType == "uws")
document.write("<script language='JavaScript' src='"+dtServer+"/aero/common/scripts/"+n1n2MenuSiteID+"_N1N2.js'></script>");
else
document.write("<script language='JavaScript' src='"+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="/aero/technology/common/scripts/login.js"></script>');                
   if(Search)
   	document.write('<script language="JavaScript" src="/aero/common/scripts/search.js"></script>'); 
   if(Download)
   	document.write('<script language="JavaScript" src="/aero/technology/common/scripts/download.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 and Privacy statement link in the footer
var sitemapURL = '/aero/sitemap.html';
var privacyURL = '/privacy/en.html';
var termsconditionsURL = '/terms-conditions/termsconditions.html';
// For providing the advance search in the footer
//var advanceSearchURL = 'http://search.honeywell.com/search?restrict=genesolv&q=&site=wwwhony&output=xml_no_dtd&client=wwwhony&proxystylesheet=http://ie10-amrit%2FGenesolv%2Fcommon%2FDocuments%2FGENESOLV.xsl&proxycustom=<ADVANCED/>';
//var advanceSearchURL = 'http://search.honeywell.com/search?site=aero&q=&output=xml_no_dtd&client=www_en_frontend&proxystylesheet=www_en_frontend&proxycustom=<ADVANCED/>&baseSite=aero';
var advanceSearchURL = 'http://search.honeywell.com/search?site=aerospace&q=&output=xml_no_dtd&client=ecm_en_frontend&proxystylesheet=ecm_en_frontend&proxycustom=<ADVANCED/>&baseSite=aerospace';
//var advanceSearchURL = 'http://search.honeywell.com/search?site=aerospace&q=&output=xml_no_dtd&client=decm_en_frontend&proxystylesheet=decm_en_frontend&proxycustom=<ADVANCED/>&baseSite=aerospace';
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 target="_blank" href="'+dtServer+privacyURL+'"><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></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 Honeywell International Inc 2004-2009';
	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);		
	}
}
//--------------------------------------------------------------------------------


function getLeftSpace(preLeftSpace,charLength)
{
	var emptySpace = (preLeftSpace + (eval(parseInt(charLength)*fontWidth)+19));
	if(is_nav4)
	emptySpace = emptySpace - nav4Buff;	
	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 =200;
 		}else if(currsection == 3)
 		{
 		n2_empty_pixels =200;
 		}else if(currsection == 5)
 		{
 		n2_empty_pixels =350;
 		}else if(currsection == 2)
 		{
 		n2_empty_pixels =475;
 		}else
 		{
 		n2_empty_pixels =300;
 		}
 		//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;
		}
	}
}
}

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/common/images/Download_Tech_Docs.gif" alt="Download Technical Docs" title="Download Technical Docs" 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>');
}
}

function hideDropdown(menuId)
{
   if(document.getElementById("sm") != null && menuId == 1 )	
   {
       document.getElementById("sm").style.visibility="hidden";
       document.getElementById("sy").style.visibility="hidden";
   }
   
   if(document.getElementById("sm") != null && menuId == 2 )	
   {
       document.getElementById("sm").style.visibility="hidden";
       document.getElementById("sy").style.visibility="hidden";
       document.getElementById("em").style.visibility="hidden";
       document.getElementById("ey").style.visibility="hidden";
         
   }
   
    
   if(document.getElementById("sm") != null && menuId == 3 )	
   {
       document.getElementById("em").style.visibility="hidden";
       document.getElementById("ey").style.visibility="hidden";
       document.getElementById("selcat").style.visibility="hidden";
       
   }
   
             

}
function showDropdown(menuId)
{
     if(document.getElementById("sm") != null && menuId == 1 )
     {	
       document.getElementById("sm").style.visibility="visible";
       document.getElementById("sy").style.visibility="visible";
     }
     
     if(document.getElementById("sm") != null && menuId == 2 )
     {	
       document.getElementById("sm").style.visibility="visible";
       document.getElementById("sy").style.visibility="visible";
       document.getElementById("em").style.visibility="visible";
       document.getElementById("ey").style.visibility="visible";
     }
     
     if(document.getElementById("sm") != null && menuId == 3 )
     {	
       document.getElementById("em").style.visibility="visible";
       document.getElementById("ey").style.visibility="visible";
       document.getElementById("selcat").style.visibility="visible";
     }
     
    
}