function browserBarDisplayOrNot(){
	/*check the browser */
	var ua = navigator.userAgent.toLowerCase();
	
	if(ua.indexOf('firefox/2.0') != -1 || ua.indexOf('firefox/3.0') != -1 || ua.indexOf('msie 7.0') != -1 || ua.indexOf('msie 8.0') != -1 )
	{
	/*check the installation */
		var installed = 0;
		try{
			installed = window.external.IsSearchProviderInstalled('http://www.verizon.net');
			
		} catch(error){}
		if(ua.indexOf('firefox/2.0') != -1 || ua.indexOf('firefox/3.0') != -1 ){
		if (document.cookie !=null && document.cookie.length>0) {
				var c_start=document.cookie.indexOf("search_plugin_installed=");
					if (c_start!=-1) { 
						installed = 1;
				}
				
			}
		}
		
		if(installed == 0){
		
			/*Not installed check the cookie */
			if (document.cookie !=null && document.cookie.length>0) {
				var c_start=document.cookie.indexOf("search_plugin_cookie=");
					if (c_start==-1) { 
						showBrowserSearchBar();
				}
			}else{	
			showBrowserSearchBar();
		}
	
	}
}
return true;
}

function noThanks(time){
	/*drop the cookie */
	var exdate=new Date();
	exdate.setMonth(exdate.getMonth()+time);
	/*document.cookie = "search_plugin_cookie=true;expires="+exdate.toGMTString()+"path="/"; domain=verizon.net";*/
	document.cookie = "search_plugin_cookie=true;path=/;domain=verizon.net;expires="+exdate.toGMTString();
	hideBrowserSearchBar();
     
}
function  addEngine()
{
 
  if ((typeof window.sidebar == "object") && (typeof window.sidebar.addSearchEngine == "function"))
  {
      window.sidebar.addSearchEngine(
          "http://www.verizon.net/central/resources/search/VerizonSearch.xml",  /* engine URL */
          "http://eweb.verizon.com/favicon.ico",  /* icon URL */
          "Verizon Search",                                         /* engine name */
          "Web" );                                               /* category name */
  } else {
        window.external.AddSearchProvider("http://www.verizon.net/central/resources/search/VerizonSearch.xml");
  }
  var ua = navigator.userAgent.toLowerCase();
	
	if(ua.indexOf('firefox/2.0') != -1 || ua.indexOf('firefox/3.0') != -1 )
	{
	
	document.cookie = "search_plugin_installed=true;path=/;domain=verizon.net;expires=-1";
	}
    
}


function showBrowserSearchBar() {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById("verizonsearchbar").style.display = 'block';
		
	}
	else {
		if (document.layers) { // Netscape 4
			document.verizonsearchbar.display = 'block';
			
		}
		else { // IE 4
			document.all.verizonsearchbar.display = 'block';
		}
	}
}


function hideBrowserSearchBar() {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById("verizonsearchbar").style.display = 'none';
		
	}
	else {
		if (document.layers) { // Netscape 4
			document.verizonsearchbar.display = 'none';
			
		}
		else { // IE 4
			document.all.verizonsearchbar.display = 'none';
		}
	}
}