navHover = function() {
	var navul = document.getElementById("navmenu")
	if(navul)
	{
	var lis = document.getElementById("navmenu").getElementsByTagName("LI");
	for (var i=0; i<lis.length; i++) {
		lis[i].onmouseover=function() {
			this.className+=" iehover";
		}
		lis[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" iehover\\b"), "");
		}
	}
	}
}
if (window.attachEvent) window.attachEvent("onload", navHover);

navHover = function() {
	var globalnavul = document.getElementById("globalnavdropnew")
	if(globalnavul)
	{
	var lis = document.getElementById("globalnavdropnew").getElementsByTagName("LI");
	for (var i=0; i<lis.length; i++) {
		lis[i].onmouseover=function() {
			this.className+=" iehover";
		}
		lis[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" iehover\\b"), "");
		}
	}
	}
}
if (window.attachEvent) window.attachEvent("onload", navHover);

navHover = function() {
	var assetul = document.getElementById("eyAssetManagement")
	if(assetul)
	{
	var lis = document.getElementById("eyAssetManagement").getElementsByTagName("li");
	for (var i=0; i<lis.length; i++) {
		lis[i].onmouseover=function() {
			this.className+=" iehover";
		}
		lis[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" iehover\\b"), "");
		}
	}
	}
}
if (window.attachEvent) window.attachEvent("onload", navHover);
// Functions for Asset Dropdown in Homepage
function showMoreAsset(carry)
	{
		if (document.getElementById) {
			var visId = document.getElementById(carry);
			var vis = visId.style;
			if (vis.display == "block"){
				return false;
				vis.display = "none";
			} else {
				vis.display = "block";
				selectLastTag(carry)
				var lsttag = document.getElementById("lastoption");
				if(lsttag)
					lsttag.focus();
			}
			return false;
		} else {
			return true;
		} 
	}
function hideMoreAsset(carry)
	{
		if (document.getElementById) {
			var visId = document.getElementById(carry);
			var vis = visId.style;
			if (vis.display == "block"){
				vis.display = "none";
			} 
			return true;
		} else {
			return true;
		} 
	}

function showsites(carry){
	if (document.getElementById) {
		var visId = document.getElementById(carry);
		var vis = visId.style;
		if (vis.display == "none" || vis.display == ""){
			vis.display = "block";
		}else{
			vis.display = "none"
		}
	} 
}

function showmore(eleId){
var showitem = document.getElementById(eleId)
alert(showitem)
	if(showitem)
	{
		if(showitem.style.display=="none" || showitem.style.display==""){
			showitem.style.display="block"
			}else{
			showitem.style.display="none"
		}
	}
}


/**
 *      This is the Javascript function from ey.js is 
 *	now integrated with eyonlineintegration.js to reduce the    
 *	javascript handling burden.
 *	and ey.js no longer exist
 */

function showDiv(carry)
	{ document.getElementById(carry).style.display = "block"; }
function hideDiv(carry)
	{ document.getElementById(carry).style.display = "block"; }
function showMore(carry)
	{
		if (document.getElementById) {
			var visId = document.getElementById(carry);
			var vis = visId.style;
			if (vis.display == "block"){
				vis.display = "none";
			} else {
				vis.display = "block";
			}
			return false;
		} else {
			return true;
		} 
	}

function hideIndustryDiv() { 
		document.getElementById('Industry1').style.display = "none";             
}

var theWidth = getBrowserWidth();

function getBrowserWidth()
{
	if (window.innerWidth)
	{
		return window.innerWidth;
	}
	else if (document.documentElement && document.documentElement.clientWidth != 0)
	{
		return document.documentElement.clientWidth;
	}
	else if (document.body)
	{
		return document.body.clientWidth;
	}
	
	return 0;
};

	function write800CSS()
	{
		cssPath = "css/eyMain800.css"
		if (theWidth <= 796)
		{
			document.write("<link rel='stylesheet' type='text/css' href="+ cssPath+" />");
		}
		else
		{
		 
		}
	} 

//This function added on 20080220 - for Slant Callout images...
function correctPNG() // correctly handle PNG transparency in Win IE 5.5 & 6.
{
   var arVersion = navigator.appVersion.split("MSIE")
   var version = parseFloat(arVersion[1])
   if ((version >= 5.5) && (document.body.filters)) 
   {
      for(var i=0; i<document.images.length; i++)
      {
         var img = document.images[i]
         var imgName = img.src.toUpperCase()
         if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
         {
            var imgID = (img.id) ? "id='" + img.id + "' " : ""
            var imgClass = (img.className) ? "class='" + img.className + "' " : ""
            var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
            var imgStyle = "display:inline-block;" + img.style.cssText 
            if (img.align == "left") imgStyle = "float:left;" + imgStyle
            if (img.align == "right") imgStyle = "float:right;" + imgStyle
            if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
            var strNewHTML = "<span " + imgID + imgClass + imgTitle
            + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
            + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
            + "(src=\'" + img.src + "\', sizingMethod='scale');\"><img title='"+ img.alt+"' alt='"+ img.alt+"' src=\"images/Slant-Triangle-Mask216x180.gif\"/></span>" 
            img.outerHTML = strNewHTML
            i = i-1
         }
      }
   }    
}
if (window.attachEvent) window.attachEvent("onload", correctPNG);

function pageLauncher(launchUrl, launchTarget) 

{
        if ((launchTarget == "_blank") || (launchTarget="undefined"))
	{
               window.location = launchUrl;
        } 
	else 
	{
               window.open(launchUrl,"mywindow","location=0,status=0,scrollbars=1,width=780px,height=580px,left=10px,top=10px");
        }
}

function contactUs(Sender)
{
temp=Sender.split("_");
Indx="";
if (temp[2])
	{	
		if (temp[1].length ==1 && temp[2].length ==3 ) 
		{	
			Sender = temp[0];
		
			Indx = "_" + temp[1] + "_" + temp[2];
		}
		
	}
var Site="Turkey_T";
//window.open('http://199.52.216.119/global/content.nsf/DContactus_New?Openform&EmailId='+Sender+'&Indx='+Indx+'&Site='+Site+'&URL='+location.href,"sWin",'width=770,height=700,screenX=0,screenY=0,alwaysRaised=yes,toolbar=no,scrollbars=yes,status=no');
window.location = 'https://forms.ey.com/global/content.nsf/DContactus_New?Openform&EmailId='+Sender+'&Indx='+Indx+'&Site='+Site+'&URL='+location.href;
}