// Fix background image flickering in IE
try {
  document.execCommand('BackgroundImageCache', false, true);
} catch(e) { }

/* begin - Navigation Primary */
var NavigationPrimary = {
  init: function() {    
		var c = this;
		var n = $('ul#NavigationPrimary');
		
		// Use bgiframe to fix dropdowns over selects if it's available.
		$.fn.bgiframe && $('li', n).bgiframe();

		// Mark parent elements so that we can style them with CSS
		$('> li', n).each(function() { c.markParents(this); });
  	
  	// Use the hoverintent plugin if it's available
  	if ($.fn.hoverIntent)
    {
  	  $('li', n).hoverIntent( {
  	    sensitivity: 1,
  	    over: this.mouseenter,
  	    out: this.mouseleave,
  	    timeout: 100
  	  });
    }
  	else
  	  $('li', n).hover(this.mouseenter, this.mouseleave);
  },
  markParents: function(li) {
    var c = this;
    if ($('> ul', li).size() > 0)
	    $(li).addClass('parent').find('> a').addClass('parent').end().find('> ul li').each( function() { c.markParents(this); });
	},
	mouseenter: function() { $(this).addClass('over').children('a').addClass('over'); },
	mouseleave: function() { $(this).removeClass('over').children('a').removeClass('over'); }
	
};
$(function() { NavigationPrimary.init(); });
/* end - Primary Navigation */


function toggledivs() {
  var inc, endInc=arguments.length;
  for (inc=0; inc<endInc; inc+=2) {
    var id = arguments[inc];
    if (arguments[inc+1] == 'none') param = "none";
    else if(arguments[inc+1]=='block') param = "block";
    if (document.layers) document.layers['container'].layers[id].visibility = param;
    else if (document.all) eval("document.all." + id + ".style.display = \"" + param + "\"");
    else if (document.getElementById) eval("document.getElementById(id).style.display = \"" + param + "\"");
  }
}



/* begin - open new window for external links and pdfs
 
	$(function() {
		$('#Wrapper a[@href^=http://]')
			.not($('#Wrapper a[@href^=http://www.exalead.com/software]'))
			.not($('a.noPopup'))
			.popupwindow(); // Fully qualified links
		$('#Wrapper a[@href^=https://]').popupwindow(); // Secure HTTP connection links
		$('#Wrapper a[@href$=.pdf]').popupwindow(); // PDFs by URL
		$('#Wrapper a.popup').popupwindow(); // specific internal links
		
	});
 end - open new window for external links and pdfs
 */

/* email obfuscation */

function eminfo () {  // <a href="mailto:info at">info at...</a>
document.write(String.fromCharCode(60,97,32,104,114,101,102,61,34,109,97,105,108,116,111,58,105,110,102,111,64,69,110,107,97,116,97,46,99,111,109,34,62,73,110,102,111,64,69,110,107,97,116,97,46,99,111,109,60,47,97,62))
}
function empartners () {  // <a href="mailto:partners at">partners at...</a>
document.write(String.fromCharCode(60,97,32,104,114,101,102,61,34,109,97,105,108,116,111,58,80,97,114,116,110,101,114,115,64,101,110,107,97,116,97,46,99,111,109,32,34,62,80,97,114,116,110,101,114,115,64,69,110,107,97,116,97,46,99,111,109,60,47,97,62))
}
function emsales () {  // <a href="mailto:sales at">sales at...</a>
document.write(String.fromCharCode(60,97,32,104,114,101,102,61,34,109,97,105,108,116,111,58,83,97,108,101,115,64,69,110,107,97,116,97,46,99,111,109,34,62,83,97,108,101,115,64,69,110,107,97,116,97,46,99,111,109,60,47,97,62))
}
function emjobs () {  // <a href="mailto:jobs at">jobs at...</a>
document.write(String.fromCharCode(60,97,32,104,114,101,102,61,34,109,97,105,108,116,111,58,106,111,98,115,64,101,110,107,97,116,97,46,99,111,109,34,62,74,111,98,115,64,69,110,107,97,116,97,46,99,111,109,60,47,97,62))
}


function rnemsalesopen () {  // for the opening of sales email address in right channel: <a href="mai...sales at enkata dot com">
document.write(String.fromCharCode(60,97,32,104,114,101,102,61,34,109,97,105,108,116,111,58,115,97,108,101,115,64,101,110,107,97,116,97,46,99,111,109,34,62))
}
function rnemsalesclose () { // for the closing: </a>
document.write(String.fromCharCode(60,47,97,62))
}


