/* header navigation */
var scrollerwidth="450px"
var scrollerheight="100px"
var scrollerspeed=1
var pauseit=1
scrollerspeed=(document.all)? scrollerspeed : Math.max(1, scrollerspeed-1) //slow speed down by 1 for NS
var copyspeed=scrollerspeed
var iedom=document.all||document.getElementById
var actualheight=''
var cross_scroller, ns_scroller
var pausespeed=(pauseit==0)? copyspeed: 0
var lefttime;

function MM_swapImgRestore() { //v3.0
	var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
	var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
	var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
	if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
	var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
	var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
	if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function cookieExists(ck){
	var cookies = document.cookie;
	var	re = new RegExp(ck+"=\\w+");
	return re.test(cookies);
}

function DeleteCookie (name,path,domain) {
  if (GetCookie(name)) {
    document.cookie = name + "=" +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      "; expires=Thu, 01-Jan-70 00:00:01 GMT";
  }
}

function SetOVTabMonthlyCookie(cookieDomain)
{
    SetCookie("selected_ov_tab",0+'',"/",cookieDomain);
    return true;
}

function readCookie(nam) {
var tC = document.cookie.split('; ');
for (var i = tC.length - 1; i >= 0; i--) {
var x = tC[i].split('=');
if (nam == x[0]) return unescape(x[1]);}
return null;}


function SetCookie (cookie_name, cookie_value,  cookie_path, cookie_domain, secure) {
	var expires = new Date();
	expires.setTime(expires.getTime() + (24 * 60 * 60 * 1000) * 180 ); // 6 months from now
    var cookieVal = escape (cookie_value);
	document.cookie =  cookie_name + "=" + cookieVal +
    	((expires) ? "; expires=" + expires.toGMTString() : "") +
    	((cookie_path) ? "; path=" + cookie_path : "") +
    	((cookie_domain) ? "; domain=" + cookie_domain : "") +
    	((secure) ? "; secure" : "");
}

/* site menu */
function showLowerTab(topTabId){
	hideAllLowerTabs();
	if(topTabId == gTopTabs[0])
		return;

	var tab = document.getElementById("lower_" + topTabId);
	tab.style.display = "block";

}

function hideAllLowerTabs(){
	for(var i=1; i<gTopTabs.length; i++){
		document.getElementById("lower_" + gTopTabs[i]).style.display = "none";
	}
}

function menuClick(tabId, url){
	if(isTopTab(tabId)){
		if(tabId == gTopTabs[0]){
			window.location = url;
			return;
		}

		var currentClass = document.getElementById(tabId).className;
		if(currentClass == "topTabSelected")
			return;

		var newUrl = gTopTabUrls[tabId];
		window.location = newUrl;
	}else{
		if(tabId == gSelectedLowerTab)
			return;

		window.location = url;
	}
}


function isTopTab(id){
	var re = /^top\d+$/;
	return re.test(id);
}


/* quick logon */
// Handle the enter key for a section of a form, binding it to the provided submit buton
function HandleEnterKey(event) {
	var nav = window.Event ? true : false;
	if (nav) {
		return NetscapeEventHandler_KeyDown(event);
	} else {
		return MicrosoftEventHandler_KeyDown();
	}
}

function NetscapeEventHandler_KeyDown(e) {
    var obj = e.target;
    if ((obj.id == "username" || obj.id == "password" || obj.Id == "imgBtnGo") && e.which == 13) {
		e.returnValue = false;
		e.cancel = true;
		e.preventDefault();
		return OnLoginClicked();
    }
    return true;
}

function MicrosoftEventHandler_KeyDown() {
    var obj = event.srcElement;
    if ((obj.id == "username" || obj.id == "password" || obj.Id == "imgBtnGo") && event.keyCode == 13) {
		event.returnValue = false;
		event.cancel = true;
		return OnLoginClicked();
	}
	return true;
}

if(document.addEventListener) {
	document.addEventListener("keypress", HandleEnterKey, true);
}
else {
	document.attachEvent("onkeypress", HandleEnterKey);
}

function ClearLogin() {
	var qlogin = document.getElementById("QLogin");
	var uname = document.getElementById("username");
	var pwd = document.getElementById("password");
	qlogin.value = "";
	uname.value = "";
	pwd.value = "";
}

function getCookie(name) {
var dc = document.cookie;
var prefix = name + "=";
var begin = dc.indexOf("; " + prefix);
if (begin == -1) {
	begin = dc.indexOf(prefix);
	if (begin != 0) return null;
} else
	begin += 2;
var end = document.cookie.indexOf(";", begin);
if (end == -1)
	end = dc.length;
return unescape(dc.substring(begin + prefix.length, end));
}

function PrintUserName() {
var dc = document.cookie;
	var user = getCookie("user");
	if (user == null || user.length == 0) return;
	var  namearray = new Array();
	namearray = user.split("|");
	document.write("Welcome " + namearray[0] +"!");
}

// put the functions into sitescript.js
function openMenuPicker(event, lobj) {

  var el, x, y, lef, id;
  //lobj = this.id;
  x = getPageOffsetLeft(lobj);
  y = getPageOffsetTop(lobj) + 13;
  z = getPageOffsetBottom(lobj);
  
  el = document.getElementById('curMenuPicker');
  
  el.style.left = x + "px";
  el.style.top  = y + "px";
  el.style.visibility = "visible";
}

function closeMenuPicker(event) {
  var current, related;
  if (window.event) {
    current = this;
    related = window.event.toElement.value;
  }
  else {
    current = event.currentTarget;
    related = event.relatedTarget;
  }

  if ((window.event.toElement.id != 'curMenuPicker') && (window.event.toElement.parentNode != null) && (window.event.toElement.parentNode.id != 'curMenuPicker'))
  	 curMenuPicker.style.visibility = 'hidden';
  else
  if (current != related && !contains(current, related))
    current.style.visibility = "hidden";
}


function contains(a, b) {

  // Return true if node a contains node b.
  if (b == undefined)
     return true;
     
  while ((b.parentNode != null) )  //&& (b.parentNode)
  {
    if ((b.parentNode != null) && (b = b.parentNode) == a)
      return true;
   }
  return false;
}

function getPageOffsetLeft(el) {

  var x;

  // Return the x coordinate of an element relative to the page.
  x = el.offsetLeft;
  if (el.offsetParent != null)
    x += getPageOffsetLeft(el.offsetParent);

  return x;
}

function getPageOffsetTop(el) {

  var y;

  // Return the x coordinate of an element relative to the page.
  y = el.offsetTop;
  if (el.offsetParent != null)
    y += getPageOffsetTop(el.offsetParent);

  return y;
}

function getPageOffsetBottom(el) {

  var z;

  // Return the x coordinate of an element relative to the page.
  z = el.offsetBottom;
  return z;
}
function ToggleTabVisibility(firstLink,  numberToBeVisible,  delimiTabNames)
{
    //firstLink.className = "perfDetLink";
	var TabNames = delimiTabNames.split(";");
	var i;
	for(i=0;i<TabNames.length;i++)
	{
	    var obj1 = document.getElementById(TabNames[i]);
	    var obj2 = document.getElementById(PerfDet_LinkArray[i]);
	    if(i==numberToBeVisible)
	    {
    	    obj1.style.display ="block";
    	    obj2.removeAttribute("href");
    	    //obj2.removeAttribute("className");
    	    obj2.className= "SecondSubMenu_2";
    	    obj2.disabled = true;
    	}
    	else
    	{
    	    obj1.style.display="none";
   	        obj2.setAttribute("href","javascript:void(0);");
   	        obj2.className="SecondSubMenu_1";
    	    obj2.disabled = false;
    	}
	}
	return false  ;
}


function ToggleContactUsTabVisibility(numberToBeVisible)
{
    HideErrorDiv();
    var DivNames = delimitedDivNames.split(";");
	var i;
	
	// for custom validation and email attachment functionality
	if(numberToBeVisible == 4)
	{ 
	    var ct = DivNames[numberToBeVisible];
	    ShowDivInclusion(ct);
	    DisableotherDivforBroadIndex(numberToBeVisible);
    }
    else
    {
      EnableAllDivs();
    }
	
	
	for(i=0;i<DivNames.length;i++)
	{
	    var obj1 = document.getElementById(DivNames[i]);
	    var delimitedValNames = ContactUs_ValidatorsArray[i];
	    var ValNames = null;
	    if(delimitedValNames != null)
	        ValNames  = delimitedValNames.split(";");

	    if(i==numberToBeVisible)
	    {
    	    obj1.style.display ="block";
    	    if(ValNames != null)
    	    {
    	        for(i1=0;i1<(ValNames.length-1);i1++)
	            {
	                var obj1 = document.getElementById(ValNames[i1]);
	                ValidatorEnable(obj1,true);
	                obj1.style.visibility = "hidden";
	            }
	            var summaryControl = document.getElementById(ValNames[ValNames.length-1]);
	            if(summaryControl != null)
	                summaryControl.style.display = "none";
	        }
    	}
    	else
    	{
    	    obj1.style.display="none";
    	    if(ValNames != null)
    	    {
    	        for(i2=0;i2<(ValNames.length-1);i2++)
	            {
	                var obj1 = document.getElementById(ValNames[i2]);
	                ValidatorEnable(obj1,false);
	                obj1.style.visibility = "hidden";
	            }
	            var summaryControl1 = document.getElementById(ValNames[ValNames.length-1]);
	            if(summaryControl != null)
	                summaryControl1.style.display = "none";
	        }

    	}
	}
	
    var lblMsg ; // if at all the old contact us message is present - clear it.
    lblMsg =  document.getElementById(OutputLabel);
    lblMsg.innerHTML = "";

	return false  ;
}

function DisableotherDivforBroadIndex(numberToBeVisible)
  {
    var DivNames = delimitedDivNames.split(";");
	var i;
	
	// for custom validation and email attachment functionality
	   for(i=0;i<DivNames.length;i++)
	    {
	     var objDiv  = document.getElementById(DivNames[i]);
	        if(i != numberToBeVisible)
	        {
	            objDiv.disabled = true;
	        }
	    }
}

function EnableAllDivs()
{
  var DivNames = delimitedDivNames.split(";");
  var i;
  
  // for custom validation and email attachment functionality
    for(i=0;i<DivNames.length;i++)
    { 
        var objDiv  = document.getElementById(DivNames[i]);
        objDiv.disabled = false;
    }
}


function ToggleOverviewTabVisibility(firstLinkText, firstLink, numberToBeVisible, delimiTabNames, cookieDomain, divDaily,divMonthly)
{
    SetCookie("selected_ov_tab",numberToBeVisible+'',"/",cookieDomain);

    if (document.getElementById(divMonthly) != null) {
        document.getElementById(divMonthly).style.background = "#BEBEBE";
        document.getElementById(divDaily).style.background = "white";
    }
	var TabNames = delimiTabNames.split(";");
	var i;
	for(i=0;i<TabNames.length;i++)
	{
	    var obj1 = document.getElementById(TabNames[i]);
	    var obj2 = document.getElementById(PerfOverview_LinkArray[i]);
	    if(i==numberToBeVisible)
	    {
    	    obj1.style.display ="block";
    	    obj2.removeAttribute("href");
    	}
    	else
    	{
    	    obj1.style.display="none";
    	    obj2.setAttribute("href","javascript:void(0);");
    	}
	}
	return false  ;
}

function ToggleOverviewTabVisibility2(firstLinkText, firstLink, numberToBeVisible, delimiTabNames, cookieDomain, divDaily, divMonthly) {
    SetCookie("selected_ov_tab", numberToBeVisible + '', "/", cookieDomain);

    if (document.getElementById(divDaily) != null) {
        document.getElementById(divDaily).style.background = "#BEBEBE";
        document.getElementById(divMonthly).style.background = "white";
    }
    var TabNames = delimiTabNames.split(";");
    var i;
    for (i = 0; i < TabNames.length; i++) {
        var obj1 = document.getElementById(TabNames[i]);
        var obj2 = document.getElementById(PerfOverview_LinkArray[i]);
        if (i == numberToBeVisible) {
            obj1.style.display = "block";
            obj2.removeAttribute("href");
        }
        else {
            obj1.style.display = "none";
            obj2.setAttribute("href", "javascript:void(0);");
        }
    }
    return false;
}

function OpennewUrl(url)
{
    window.location = url;

}

function DisplayUserLogin(loginHyperLink,divUserLogin)
{
    //set the position where the login pop-up should be dislpayed
    divUserLogin.style.display="block";
   return 3;
}

function HideMe(controlToHide)
{
    controlToHide.style.display="none";
}



function GetCookie(sName)
{
  // cookies are separated by semicolons
  var aCookie = document.cookie.split("; ");
  for (var i=0; i < aCookie.length; i++)
  {
    // a name/value pair (a crumb) is separated by an equal sign
    var aCrumb = aCookie[i].split("=");
    //alert(aCrumb[0]);
    if (sName == aCrumb[0]) 
      return unescape(aCrumb[1]);
  }

  // a cookie with the requested name does not exist
  return null;
}

/*
function GetCookie (name) {
var arg = name + "=";
var alen = arg.length;
alert(document.cookie);
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
alert(document.cookie.substring(i, j));
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
*/

/* start :scripts for contact us page */
function ContactUsIC()
{
    /*
    Order of arguments to the function-
     txtName, txtUserName , txtEmailAddr,txtSubject, txtRequest
     */
     
    if(Page_ClientValidate())
    {
    PageMethods.ContactRequestIC(
    arguments[0].value,
    arguments[1].value,
    arguments[2].value,
    arguments[3].value,
    arguments[4].value,
    OnSucceeded,
    OnFailed
    );
    }

}

function ContactUsIC1()
{
    /*
    Order of arguments to the function-
     txtName, txtUserName , txtEmailAddr,txtSubject, txtRequest
     */
     
    if(Page_ClientValidate())
    {
    PageMethods.ContactRequestIC1(
    arguments[0].value,
    arguments[1].value,
    arguments[2].value,
    arguments[3].value,
    arguments[4].value,
    OnSucceeded,
    OnFailed
    );
    }

}


/* start :scripts for contact us page */



function ContactUsOE()
{
    /*
    Order of arguments to the function-
     txtName, txtUserName , txtEmailAddr,txtSubject, txtRequest
     */
     
    if(Page_ClientValidate())
    {
    PageMethods.ContactRequestOE(
    arguments[0].value,
    arguments[1].value,
    arguments[2].value,
    arguments[3].value,
    arguments[4].value,
    OnSucceeded,
    OnFailed
    );
    }

}



function ContactUsII()
{
    /*
    Order of arguments to the function-
     txtName, txtUserName , txtEmailAddr,txtSubject, txtRequest
     */
     
   /* if(Page_ClientValidate())
    {
        PageMethods.ContactRequestII(
        arguments[0].value,
        arguments[1].value,
        arguments[2].value,
        arguments[3].value,
        arguments[4].value,
        OnSucceeded,
        OnFailed
        );
    }
  */
  
   // customized javascript validation.
   
}


function ContactUsIP()
{
/*
order of arguments to the function-
 txtName, txtUserName , txtEmailAddr, txtTelephone, ddlRole, ddlInvestor, ddlCountry, ddlRegion,
rblistQ1[0], rbListQ2[0], rbListQ3[0], txtMessage, ContactUsDiv, ContactUsMsgDiv, MsgLabel

 ContactRequestIP(
            string name, string userName, string emailAddr, string telephone,
            string role, string investor, string countryOfDomicile, string regionOfDomicile,
            bool hasAccount, bool hasNonUSProds, bool isTaxableUSInvestor,
            string userMessage
            )
  */          
    if(Page_ClientValidate())
    {
    PageMethods.ContactRequestIP(
    arguments[0].value,
    arguments[1].value,
    arguments[2].value,
    arguments[3].value,
    arguments[4].options[arguments[4].selectedIndex].value,
    arguments[5].options[arguments[5].selectedIndex].value,
    arguments[6].options[arguments[6].selectedIndex].value,
    arguments[7].options[arguments[7].selectedIndex].value,
    getYesNo(arguments[8]),
    getYesNo(arguments[9]),
    getYesNo(arguments[10]),
    arguments[11].value,
    OnSucceeded,
    OnFailed
    );
    }
    
}

function ShowContactUsResponse( msg)
{
    var DivNames = delimitedDivNames.split(";");
	var i;


	for(i=0;i<DivNames.length;i++)
	{
		var div1;
        div1 = document.getElementById(DivNames[i]);
	
	    if(i==6)
	    {
	        div1.style.display = "block";
	    }
	    else
	    {
	        div1.style.display = "none";
	    }
	}

    var lblMsg ;
    lblMsg =  document.getElementById(OutputLabel);
    lblMsg.innerHTML = msg;
    lblMsg.focus();
    return;
}

function OnSucceeded(sucData)
{
    ShowContactUsResponse(sucData);
}

function OnFailed(failData)
{
    ShowContactUsResponse(failData);  
}

function WriteUserName(userWelcomeLink) { 
var dc = document.cookie;   
var uwlink = document.getElementById(userWelcomeLink); 
var user = getCookie("user"); 
if (user == null || user.length == 0) return; 
var  namearray = new Array(); 
namearray = user.split("|"); 
var text = uwlink.innerHTML; 
text = text.replace("%name%", encodeURI(namearray[0]));
uwlink.innerHTML = text; 
} 

function getYesNo(buttonGroupNoButton) {
    if(buttonGroupNoButton.checked)
    {
        return "false"; // no selected
    }
    else
    {
        return "true"; // yes selected
    }
   // if we get to this point, no radio button is selected
   return -1;
} // Ends the "getSelectedRadio" function

/* end :scripts for contact us page */

/* Mail attachment related functionlity  */

function addArea() 
	{
		var newArea = addElement();
		var area = "<input type='file' name='attachment[]' onkeydown='this.blur();'/>";
		var link= "&nbsp;<a onclick='removeElement(" + '"' +  newArea + '"' + ")' href='#'>Remove</a>";
		document.getElementById(newArea).innerHTML = area + link;
	}
	function addElement() 
	{
		  var ni = document.getElementById('area');
		  var numi = document.getElementById('intVal');
		  var num = (document.getElementById('intVal').value -1)+ 2;
		  numi.value = num;
		  var newdiv = document.createElement('div');
		  var divIdName = 'my'+num+'Div';
		  newdiv.setAttribute('id',divIdName);
		  ni.appendChild(newdiv);
		  return divIdName;
	}
	
	function removeElement(divid)
	{
	 
	 var div = document.getElementById(divid);
	 document.getElementById("area").removeChild(div); 
	}
	
	function validateFiles()
	{
	    var node_list = document.getElementsByTagName('input');
        for (var i = 0; i < node_list.length; i++)
        {
            var node = node_list[i];
            if (node.getAttribute('type') == 'file') 
            {
                if (node.value == '') 
                {  
                    return false;
                }
            }
       }
	}

	

function validateContactUs_II(jsname,jsemail)
{
 
  var name = document.getElementById(jsname);
  var email = document.getElementById(jsemail); 
  var emailRegex = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
  var emailvalid=true;
  var isvalid=true;
  
 HideDiv();
 
 if(name.value == "") 
 {
    validateName_ContactUsII(name);
    isvalid=false;
 }
 
 if(email.value == "")
 {
    validateEmail_ContactUsII(email,"Email is required"); // blank email
    emailvalid = false;
    isvalid = false;
 }
 
 if(!emailRegex.test(email.value))
 {
    if(emailvalid)
    {
        validateEmail_ContactUsII(email,"Please provide a valid email address"); // valid email
        isvalid = false;
    }
    
 }
  
 if(!verifyFiles())
 {
    isvalid=false;
 }
 
    if(isvalid)
    {
       DisableotherDivforBroadIndex(4);
       var fm = document.forms[0];
       fm.submit();
    } 
    else
    {
        return isvalid;
    }
}



function HideDiv()
{
    var divname = document.getElementById("validatename_II");
    var divemail = document.getElementById("validateemail_II");
    var filediv = document.getElementById("filediv");
    
    divname.style.visibility = "hidden"; 
    divemail.style.visibility = "hidden"; 
    filediv.style.visibility = "hidden"; 
    
}

function topPosition(target) {
  var top = 0;
  if(target.offsetParent) {
    while(1) {
      top += target.offsetTop;
      if(!target.offsetParent) {
        break;
      }
      target = target.offsetParent;
    }
  } else if(target.y) {
    top += target.y;
  }
  return top;
}

function leftPosition(target) {
  var left = 0;
  if(target.offsetParent) {
    while(1) {
      left += target.offsetLeft;
      if(!target.offsetParent) {
        break;
      }
      target = target.offsetParent;
    }
  } else if(target.x) {
    left += target.x;
  }
  return left;
}


function validateName_ContactUsII(name)
{   
    var div = document.getElementById("validatename_II");
    var targetwidth = div.offsetWidth;
    var leftp = leftPosition(name);
    div.style.left= leftp + targetwidth + 80;
    div.style.top = topPosition(name) + 2;
    div.style.visibility = "visible";   
}

function validateEmail_ContactUsII(email,text)
{   
    var div = document.getElementById("validateemail_II");
    var targetwidth = div.offsetWidth;
    var leftp = leftPosition(email);
    div.style.left= leftp + targetwidth + 80;
    div.style.top = topPosition(email) + 2;
    div.style.visibility = "visible";   
    div.innerHTML = text;
}

function ShowDivInclusion(div)
{
    var divinclusion = document.getElementById(div);
    divinclusion.style.visibility ="visible";
    divinclusion.disabled = false;
}

function verifyFiles() 
{
    var nodes = document.getElementsByTagName('input');
    for (var i = 0; i < nodes.length; i++)
      {
         var node = nodes[i];
         if (node.getAttribute('type') == 'file') 
          {
            if (node.value == '') 
             {  
                var filediv = document.getElementById("filediv");
                filediv.style.visibility = "visible";   
                return false;
             }
           }
       }
       
       return true;
  }

function scrollscroller()
{
    if (parseInt(cross_scroller.style.top)>(actualheight*(-1)+8))
    {
    cross_scroller.style.top=parseInt(cross_scroller.style.top)-copyspeed+"px"
    }
    else
    {
        cross_scroller.style.top=parseInt(scrollerheight)+8+"px"
    }
}    

function togglePannelStatus(content)
{
    var expand = (content.style.display=="none");
    content.style.display = (expand ? "block" : "none");
    toggleChevronIcon(content);
}

var currentContent = null;

function togglePannelAnimatedStatus(content, interval, step)
{
    if (currentContent==null)
    {
        currentContent = content;
        var expand = (content.style.display=="none");
        if (expand)
            content.style.display = "block";
        var max_height = content.offsetHeight;

        var step_height = step + (expand ? 0 : -max_height);
        toggleChevronIcon(content);
                
        content.style.height = Math.abs(step_height) + "px";
        setTimeout("togglePannelAnimatingStatus(" + interval + "," + step
            + "," + max_height + "," + step_height + ")", interval);
    }
}

function togglePannelAnimatingStatus(interval, step, max_height, step_height)
{
    var step_height_abs = Math.abs(step_height);


    if (step_height_abs>=step && step_height_abs<=(max_height-step))
    {
        step_height += step;
        currentContent.style.height = Math.abs(step_height) + "px";
        setTimeout("togglePannelAnimatingStatus(" + interval + "," + step
            + "," + max_height + "," + step_height + ")", interval);
    }
    else
    {
        if (step_height_abs<step)
            currentContent.style.display = "none";
        currentContent.style.height = "";
        currentContent = null;
    }
}

function toggleChevronIcon(content)
{
    //var chevron = content.parentNode.firstChild.childNodes[1].childNodes[0];
    var chevron = document.getElementById('imgsrc');
    var expand = (chevron.src.indexOf("expand.gif")>0);
    chevron.src = chevron.src
        .split(expand ? "expand.gif" : "collapse.gif")
        .join(expand ? "collapse.gif" : "expand.gif");
}


function TriggerBannerCount()
{
  window.open("../en/counter.aspx?indexname=NONE"); 
    
}

var i = 1;
var j = 1;
ie5 = (document.all && document.getElementById);
ns6 = (!document.all && document.getElementById);
opac = 0;

function fadeIn() {

    if (opac != 100) {
        opac2 = 100;
        opac += 1;
        if (document.getElementById('fade' + i) != null) {
            document.getElementById('fade' + i).style.display = '';
            if (ie5) document.getElementById('fade' + i).filters.alpha.opacity = opac;
            if (ns6) document.getElementById('fade' + i).style.MozOpacity = opac / 100;

            for (j = 1; j <= 5; j++) {
                if (j != i)
                    document.getElementById('fade' + j).style.display = 'none';
            }
            setTimeout('fadeIn()', 0);
        }
        //fadeIn();
    }
    else {

        //fadeOut();
        setTimeout('fadeOut()', 3000);
    }
}

//fades layer out
ie5 = (document.all && document.getElementById);
ns6 = (!document.all && document.getElementById);
opac2 = 100;

function fadeOut() {

    if (opac2 > 0) {
        opac = 0;
        opac2 -= 1;
        if (document.getElementById('fade' + i) != null) {
            document.getElementById('fade' + i).style.display = '';
            if (ie5) document.getElementById('fade' + i).filters.alpha.opacity = opac2;
            if (ns6) document.getElementById('fade' + i).style.MozOpacity = opac2 / 100;
            for (j = 1; j <= 5; j++) {
                if (j != i)
                    document.getElementById('fade' + j).style.display = 'none';
            }
            setTimeout('fadeOut()', 0);
        }
    }
    else {
        i = i + 1;
        if (i > 5)
            i = 1;
        setTimeout('fadeIn()', 0);
    }
}



//dropdown

//// USE WORDWRAP AND MAXIMIZE THE WINDOW TO SEE THIS FILE
//c_styles = {}; c_menus = {}; // do not remove this line

//// You can remove most comments from this file to reduce the size if you like.




///******************************************************
//(1) GLOBAL SETTINGS
//*******************************************************/

//c_hideTimeout = 500; // 1000==1 second
//c_subShowTimeout = 250;
//c_keepHighlighted = true;
//c_findCURRENT = false; // find the item linking to the current page and apply it the CURRENT style class
//c_findCURRENTTree = true;
//c_overlapControlsInIE = true;
//c_rightToLeft = false; // if the menu text should have "rtl" direction (e.g. Hebrew, Arabic)




///******************************************************
//(2) MENU STYLES (CSS CLASSES)
//*******************************************************/

//// You can define different style classes here and then assign them globally to the menu tree(s)
//// in section 3 below or set them to any UL element from your menu tree(s) in the page source


//c_imagesPath = "../images/"; // path to the directory containing the menu images


//c_styles['MM'] = [ // MainMenu (the shorter the class name the better)
//[
//// MENU BOX STYLE
//0, 	// BorderWidth
//'solid', // BorderStyle (CSS valid values except 'none')
//'#8F90C4', // BorderColor ('color')
//0, 	// Padding
//'#CBCBEF', // Background ('color','transparent','[image_source]')
//'', 	// IEfilter (only transition filters work well - not static filters)
//''		// Custom additional CSS for the menu box (valid CSS)
//], [
//// MENU ITEMS STYLE
//1, 	// BorderWidth
//'solid', // BorderStyle (CSS valid values except 'none')
//'solid', // OVER BorderStyle
//'#DBDBDB', // BorderColor ('color')
//'#4d4c76', // OVER BorderColor
//4, 	// Padding
//'#DBDBDB', // Background ('color','transparent','[image_source]')
//'#CBCBEF', // OVER Background
//'#252455', // Color
//'#000000', // OVER Color
//'11px', 	// FontSize (values in CSS valid units - %,em,ex,px,pt)
//'verdana,arial,helvetica,sans-serif', // FontFamily
//'', 	// FontWeight (CSS valid values - 'bold','normal','bolder','lighter','100',...,'900')
//'none', 	// TextDecoration (CSS valid values - 'none','underline','overline','line-through')
//'none', 	// OVER TextDecoration
//'left', 	// TextAlign ('left','center','right','justify')
//1, 	// ItemsSeparatorSize
//'solid', // ItemsSeparatorStyle (border-style valid values)
//'#CBCBEF', // ItemsSeparatorColor ('color','transparent')
//0, 	// ItemsSeparatorSpacing
//true, 		// UseSubMenuImage (true,false)
//'[h_arrow.gif]', // SubMenuImageSource ('[image_source]')
//'[h_arrow_over.gif]', // OverSubMenuImageSource
//7, 		// SubMenuImageWidth
//4, 		// SubMenuImageHeight
//'10', 		// SubMenuImageVAlign ('pixels from item top','middle')
//'solid', 	// VISITED BorderStyle
//'#DBDBDB', 	// VISITED BorderColor
//'#DBDBDB', 	// VISITED Background
//'#252455', 	// VISITED Color
//'none', 		// VISITED TextDecoration
//'[h_arrow.gif]', // VISITED SubMenuImageSource
//'solid', 	// CURRENT BorderStyle
//'#CBCBEF', 	// CURRENT BorderColor
//'#FFFBF0', 	// CURRENT Background
//'#252455', 	// CURRENT Color
//'none', 		// CURRENT TextDecoration
//'[h_arrow.gif]', // CURRENT SubMenuImageSource
//'', 	// Custom additional CSS for the items (valid CSS)
//'', 	// OVER Custom additional CSS for the items (valid CSS)
//'', 	// CURRENT Custom additional CSS for the items (valid CSS)
//''		// VISITED Custom additional CSS for the items (valid CSS)
//]];


//c_styles['SM'] = [ // SubMenus
//[
//// MENU BOX STYLE
//1, 	// BorderWidth
//'solid', // BorderStyle (CSS valid values except 'none')
//'#4D4C76', // BorderColor ('color')
//3, 	// Padding
//'#DBDBDB', // Background ('color','transparent','[image_source]')
//'', 	// IEfilter (only transition filters work well - not static filters)
//''		// Custom additional CSS for the menu box (valid CSS)
//], [
//// MENU ITEMS STYLE
//1, 	// BorderWidth
//'solid', // BorderStyle (CSS valid values except 'none')
//'solid', // OVER BorderStyle
//'#DBDBDB', // BorderColor ('color')
//'#4D4C76', // OVER BorderColor
//3, 	// Padding
//'#DBDBDB', // Background ('color','transparent','[image_source]')
//'#CBCBEF', // OVER Background
//'#252455', // Color
//'#000000', // OVER Color
//'11px', 	// FontSize (values in CSS valid units - %,em,ex,px,pt)
//'verdana,arial,helvetica,sans-serif', // FontFamily
//'normal', // FontWeight (CSS valid values - 'bold','normal','bolder','lighter','100',...,'900')
//'none', 	// TextDecoration (CSS valid values - 'none','underline','overline','line-through')
//'none', 	// OVER TextDecoration
//'left', 	// TextAlign ('left','center','right','justify')
//0, 	// ItemsSeparatorSize
//'solid', // ItemsSeparatorStyle (border-style valid values)
//'#CBCBEF', // ItemsSeparatorColor ('color','transparent')
//2, 	// ItemsSeparatorSpacing
//true, 		// UseSubMenuImage (true,false)
//'[v_arrow.gif]', // SubMenuImageSource ('[image_source]')
//'[v_arrow_over.gif]', // OverSubMenuImageSource
//7, 		// SubMenuImageWidth
//7, 		// SubMenuImageHeight
//'7', 		// SubMenuImageVAlign ('pixels from item top','middle')
//'solid', 	// VISITED BorderStyle
//'#DBDBDB', 	// VISITED BorderColor
//'#DBDBDB', 	// VISITED Background
//'#252455', 	// VISITED Color
//'none', 		// VISITED TextDecoration
//'[v_arrow.gif]', // VISITED SubMenuImageSource
//'solid', 	// CURRENT BorderStyle
//'#CBCBEF', 	// CURRENT BorderColor
//'#FFFBF0', 	// CURRENT Background
//'#252455', 	// CURRENT Color
//'none', 		// CURRENT TextDecoration
//'[v_arrow.gif]', // CURRENT SubMenuImageSource
//'', 	// Custom additional CSS for the items (valid CSS)
//'', 	// OVER Custom additional CSS for the items (valid CSS)
//'', 	// CURRENT Custom additional CSS for the items (valid CSS)
//''		// VISITED Custom additional CSS for the items (valid CSS)
//]];




///******************************************************
//(3) MENU TREE FEATURES
//*******************************************************/

//// Normally you would probably have just one menu tree (i.e. one main menu with sub menus).
//// But you are actually not limited to just one and you can have as many menu trees as you like.
//// Just copy/paste a config block below and configure it for another UL element if you like.


//c_menus['Menu1'] = [ // the UL element with id="Menu1"
//[
//// MAIN-MENU FEATURES
//'horizontal', // ItemsArrangement ('vertical','horizontal')
//'absolute', // Position ('relative','absolute','fixed')
//'0em', 	// X Position (values in CSS valid units- px,em,ex)
//'0em', 	// Y Position (values in CSS valid units- px,em,ex)
//false, 	// RightToLeft display of the sub menus
//false, 	// BottomToTop display of the sub menus
//0, 	// X SubMenuOffset (pixels)
//0, 	// Y SubMenuOffset
//'10em', 	// Width (values in CSS valid units - px,em,ex) (matters for main menu with 'vertical' ItemsArrangement only)
//'MM', 	// CSS Class (one of the defined in section 2)
//true		// Open sub-menus onclick (default is onmouseover)
//], [
//// SUB-MENUS FEATURES
//5, 	// X SubMenuOffset (pixels)
//1, 	// Y SubMenuOffset
//'auto', 	// Width ('auto',values in CSS valid units - px,em,ex)
//'100', 	// MinWidth ('pixels') (matters/useful if Width is set 'auto')
//'300', 	// MaxWidth ('pixels') (matters/useful if Width is set 'auto')
//'SM', 	// CSS Class (one of the defined in section 2)
//false		// Open sub-menus onclick (default is onmouseover)
//]];



///*
//========================================
//SmartMenus v6.0.4 Script Core
//Commercial License No.: UN-LICENSED
//========================================
//Please note: THIS IS NOT FREE SOFTWARE.
//Licensing information:
//http://www.smartmenus.org/license/
//========================================
//(c)2011 Vadikom Web Ltd.
//========================================
//*/


//// ===
//c_d = document; c_u = "undefined"; c_n = navigator; c_w = window; c_a = c_n.userAgent.toLowerCase(); c_dl = c_d.getElementsByTagName && !!c_d.createElement; c_dE = c_d.documentElement || ""; c_dV = c_d.defaultView; c_gS = c_dV && c_dV.getComputedStyle; c_qM = c_d.compatMode != "CSS1Compat"; c_mC = /mac/.test(c_a); c_iE = c_dl && !c_w.innerWidth && /msie/.test(c_a); c_iEM = c_mC && c_iE; c_iEMo = c_iEM && /msie 5\.0/.test(c_a); c_iEMn = c_iEM && /msie 6/.test(c_a); c_iE9 = c_d.documentMode && !!c_gS; c_iE8 = c_iE && !!c_d.querySelector; c_iE7 = c_iE && typeof c_dE.currentStyle.minWidth != c_u && !c_qM && !c_iE8; c_iEW = c_iE && !c_mC; c_iEWo = c_iEW && !c_iE7 && !c_iE8; c_iEW5 = c_iEWo && !c_d.createEventObject; c_iEW5x = c_iEWo && !c_d.compatMode; c_oPv = /opera/.test(c_a) ? parseFloat(c_a.replace(/.*(version|opera)[ \/]/, "")) : 0; c_oP = c_oPv >= 5; c_oP7 = c_oPv >= 7; c_oP7m = c_oP && !c_oP7; c_oPo2 = c_oP7 && c_oPv < 7.2; c_oP9 = c_oPv >= 9; c_oP11 = c_oPv >= 11; c_kNv = /konqueror/.test(c_a) ? parseFloat(c_a.replace(/.*eror\//, "")) : 0; c_kN = c_kNv >= 3.2; c_kN4 = c_kNv >= 4; c_sFv = /webkit/.test(c_a) ? parseFloat(c_a.replace(/.*bkit\//, "")) : 0; c_sF = c_sFv > 0; c_sF3 = c_sFv >= 420; c_iC = /icab/.test(c_a); c_gC = c_n.product == "Gecko" && !c_sF && !c_kNv; c_pS = c_n.productSub; c_gCo = c_gC && c_pS < 20031007; c_gC13 = c_gC && c_pS >= 20030312; c_nS = !c_iE && (!c_kN || c_kN4) && (!c_sF || c_sFv < 125 || c_sF3); c_oM = (c_iEWo || c_oP7 && !c_oP9 || c_iEMn) && c_qM || c_iEM && !c_iEMn && (!c_d.doctype || !/\.dtd/.test(c_d.doctype.name)); c_x = /xml/i.test(c_d.contentType); c_r = typeof c_rightToLeft != c_u ? c_rightToLeft : 0; c_ = ["", ""]; c_h = c_s = c_T = c_M = 0; c_c = null; c_o = [""]; c_O = [""]; c_S = [""]; c_I = {}; c_F = c_overlapControlsInIE ? [c_iEW && !c_iEW5 || c_iE9, c_iEW5] : [0, 0]; c_iA = [""]; function c_gO(i) { return c_d.getElementById(i) }; function c_gT(o, t) { return o.getElementsByTagName(t) }; function c_nN(o) { return o.nodeName.replace(/.*:/, "").toUpperCase() }; function c_cE(t, o) { var n = o.namespaceURI; return n ? c_d.createElementNS(n, t) : c_d.createElement(t) }; function c_gD(o, h) { var c = c_gS && c_gS(o, null), d = c && c[h ? "height" : "width"]; if (d && d.indexOf(".") > -1) { d = parseFloat(d) + parseInt(c[h ? "paddingTop" : "paddingLeft"]) + parseInt(c[h ? "paddingBottom" : "paddingRight"]) + parseInt(c[h ? "borderTopWidth" : "borderLeftWidth"]) + parseInt(c[h ? "borderBottomWidth" : "borderRightWidth"]) } else { d = h ? o.offsetHeight : o.offsetWidth } return d }; function c_gA(l) { var a = l.firstChild; while (a) { if (c_nN(a) == "A") return a; a = a.nextSibling } return c_gT(l, "a")[0] }; function c_gL(a) { a = a.parentNode; while (c_nN(a) != "LI") a = a.parentNode; return a }; function c_sC(o, c) { var n = o.className; o.className = n ? n.indexOf(c) < 0 ? n + " " + c : n : c }; function c_aE(o, e, f) { if (typeof o[e] != "function") { o[e] = f; } else if (o[e] != f && o[e] != c_fE) { o["O" + e] = o[e]; o["N" + e] = f; o[e] = c_fE } }; function c_fE(e) { if (!e) e = event; var t = e.type; this["Oon" + t](e); this["Non" + t](e) }; function c_cT(p, c) { while (c) { if (c == p) return 1; try { c = c.parentNode } catch (e) { break } } return 0 }; function c_cI(s, i) { var b = "background-image:", c = "background-color:"; if (!i) i = ";"; if (s.charAt(0) == "[") { s = c_imagesPath + s.substring(1, s.length - 1); if (!c_I[s]) { c_I[s] = new Image; c_I[s].src = s } return b + "url('" + s + "')" + i + c + "transparent" + i } return b + "none" + i + c + s + i }; function c_fC(r) { var l, a, as, d, n, h, H, i; d = /(index|default)\.[^#\?\/]*/i; n = /#.*/; h = location.href.replace(d, ""); as = c_gT(r, "a"); for (i = 0; i < as.length; i++) { a = as[i]; H = a.href.replace(d, ""); if (H != "javascript:;" && (H == h || H == h.replace(n, ""))) { c_sC(a, "CURRENT"); if (c_findCURRENTTree) { l = c_gL(a).parentNode.parentNode; while (c_nN(l) == "LI") { c_sC(c_gA(l), "CURRENT"); l = l.parentNode.parentNode } } } } }; function c_hS() { if (c_h) return; var i, s = c_gT(c_d, "select"); for (i = 0; i < s.length; i++) { s[i].VS = s[i].currentStyle.visibility; s[i].style.visibility = "hidden" } c_h = 1 }; function c_sS() { if (!c_h) return; var i, s = c_gT(c_d, "select"); for (i = 0; i < s.length; i++) s[i].style.visibility = s[i].VS; c_h = 0 }; function c_iF(u, w, h, x, y) { if (!u.IF) u.IF = c_iA.length; var i = u.IF, f, p; p = (u.PP && u.LV == 1); f = c_cE("iframe", u); f.src = "javascript:0"; f.tabindex = -9; f.style.cssText = "position:absolute;z-index:9000;filter:alpha(opacity=0);border:0;width:" + w + "px;height:" + h + "px;" + (c_iE9 && !p ? "margin-left:" + x + "px;margin-top:" + y + "px;" : "left:" + x + "px;top:" + y + "px;"); c_iA[i] = f; u.parentNode.insertBefore(f, u) }; function c_hI(i) { var g = c_iA[i].removeNode(1) }; function c_pA(a, C, r, h, l) { var s, c, X = -C[0], Y = X; s = a.firstChild; if (c_iEW && !c_iE8 && h || c_iEM) { X = l && h ? r ? c_iEWo && !c_iEW5 && !c_r ? -C[0] - C[5] * 2 - C[23] : 0 : C[16] > 0 && !/NOSEPA/.test(c_gL(a).className) ? C[18] == "transparent" ? C[16] + C[19] * 2 : C[19] : 0 : 0; Y = 0 } c = "top:" + (Y + parseInt(C[25] == "middle" ? (a.offsetHeight - C[24]) / 2 : C[25])) + "px;" + (r ? "left" : "right") + ":" + (X + C[0] + C[5]) + "px;display:block;"; c_iE ? s.style.cssText = c : s.setAttribute("style", c); if (c_iEM) Y = s.offsetWidth }; function c_fW(u) { var l, a, S, w = 0, W, C = c_styles[u.className][0], M = c_menus[u.MM][1], b = C[0] * 2 + C[3] * 2, n, x; n = parseInt(M[3]) || 0; x = parseInt(M[4]) || 0; l = u.firstChild; while (l) { if (c_nN(l) == "LI") { a = c_gA(l); S = a.style; if (u.AW == 1) { if (c_iEW5x) a.innerHTML = "<nobr>" + a.innerHTML + "</nobr>"; W = a.offsetWidth; if (w < W) w = W; if (c_iEW5x) a.innerHTML = a.firstChild.innerHTML } if (!c_iEW5x) { S.whiteSpace = "normal"; S.display = "block" } } l = l.nextSibling } if (u.AW == 1) { w += b; if (w < n) w = n; if (x && w > x) w = x; u.style.width = w - (!c_oM ? b : 0) + 0.49 + "px" } }; function c_fA(u) { var C = c_styles[u.className][1]; if (C[20]) { var l = u.firstChild; while (l) { if (l.SH) c_pA(c_gA(l), C, u.RL, u.HR); l = l.nextSibling } } u.FM = 1 }; function c_iL(u) { var l, a, f, c; f = u.LV == 1; c = c_menus[u.MM][f ? 0 : 1][f ? 10 : 6]; l = u.firstChild; while (l) { if (c_nN(l) == "LI") { a = c_gA(l); if (f && !u.PP) a.VU = 1; c_aE(a, "onfocus", c_oF); c_aE(a, "onblur", c_oB); c_aE(a, "onmousedown", c_oD); if (c) { a.OC = 1; c_aE(a, "onclick", c_oC); } c_aE(a, "onmouseover", c_oV); c_aE(a, "onmouseout", c_oU); if (a.className && /NOLINK/.test(a.className)) a.href = "javascript:;" } l = l.nextSibling } if (!f || !u.HR || !c_r) c_sC(c_gL(a), "NOSEPARATOR") }; function c_oD() { this.MD = 1 }; function c_oB() { if (!this.MD) c_mU(); this.MD = 0; }; function c_oF() { c_mV(); c_c = this; c_sM(1) }; function c_oC() { c_c = this; if (!c_gL(c_c).SH) return; c_sM(1); if (c_c.blur) c_c.blur(); return false }; function c_oV(e) { if (!e) e = event; if (this.VU) c_mV(); if (c_cT(this, e.relatedTarget || e.fromElement) && (!c_oP || e.offsetX != 0 || e.offsetY != 0)) return; if (c_s) { clearTimeout(c_s); c_s = 0 } c_c = this; c_s = setTimeout("c_sM()", c_subShowTimeout) }; function c_oU(e) { if (!e) e = event; if (this.VU) c_mU(); if (c_cT(this, e.relatedTarget || e.toElement)) return; if (this.blur) this.blur(); if (c_s) { clearTimeout(c_s); c_s = 0 } }; function c_mV() { clearTimeout(c_T) }; function c_mU() { clearTimeout(c_T); c_T = setTimeout("c_hD()", c_hideTimeout) }; function c_hM(o, f) { var S = o.style; S.display = "none"; S.visibility = "hidden"; if (f) o.parentNode.style.zIndex = 1; if (c_F[0] && o.IF) c_hI(o.IF) }; function c_hD() { var i, o; if (c_s) { clearTimeout(c_s); c_s = 0 } for (i = c_S.length - 1; i > 0; i--) { o = c_S[i]; if (i != 1 || o.PP) c_hM(o, (i != 1 && (c_iE || c_gCo))); o = c_O[i]; if (o && c_keepHighlighted) o.className = o.CN } c_S = [""]; c_O = [""]; c_c = null; if (c_F[1]) c_sS() }; function c_rL() { if (c_iEW && !c_iEW5) { var o = c_dB; while (o) { if (o.dir == "rtl" || o.currentStyle && o.currentStyle.direction == "rtl") return 1; o = o.parentNode } } return 0 }; function c_cA(o, f) { var c = { x: 0, y: 0 }; while (o && (!f || o != c_dB)) { c.x += o.offsetLeft; c.y += o.offsetTop; o = o.offsetParent } return c }; function c_gW() { var c, f, d, b, i, w = "clientWidth", h = "clientHeight", A, B, D; f = c_gC ? 15 : 0; d = c_dE[h]; b = c_dB[h]; i = c_w.innerHeight; A = { h: b, w: c_dB[w] }; B = { h: d, w: c_dE[w] }; D = c_qM ? c_dB : c_dE; c = !i ? c_qM ? A : B : d && b && (!c_kN || c_kN4) && (!c_sF || c_sF3) ? d > b ? d > i ? A : B : b > i ? B : A : b && c_gC ? A : { h: i - f, w: innerWidth - f }; c.x = c_w.pageXOffset || D.scrollLeft * (c_rL() && c_iE8 ? -1 : 1) - (c_rL() && !c_iE8 ? D.scrollWidth - c.w : 0) || 0; c.y = c_w.pageYOffset || D.scrollTop || 0; return c }; function c_kW(x, y, w, h, c, r, f) { if (f) { c.x = 0; c.y = 0 } var k = { y: 0 }; if (r && x < c.x || !r && x + w > c.x + c.w) k.x = 1; if (h < c.h && y + h > c.y + c.h) k.y = c.y + c.h - h - y; else if (h >= c.h || y < c.y) k.y = c.y - y; return k }; function c_pM(u) { var x, y, sX, sY, aX, aY, w, h, M, S, p, l, a, f, C, W, H, c, k, b; S = u.style; w = c_gD(u); h = c_gD(u, 1); M = c_menus[u.MM]; l = u.parentNode; p = l.parentNode; a = c_gA(l); f = u.LV == 2; C = c_cA(l, c_sF && !c_sF3 && M[0][1] != "relative"); W = c_gD(a); H = c_gD(a, 1); c = c_gW(); sX = f ? M[0][6] : M[1][0]; sY = f ? M[0][7] : M[1][1]; if (f && u.HR) { x = u.RL ? W - w - sX : sX; y = u.BT ? -h - sY : H + sY } else { x = u.RL ? sX - w : W - sX; y = u.BT ? H - sY - h : sY } aX = C.x + x; aY = C.y + y; if (c_gC && c_pS >= 20010801 || c_iEW && !c_iE8 || c_iE9 || c_oP && !c_oP9 || c_sF3 || c_kN4) while (p.LV && (p.LV > 1 || p.PP)) { b = c_styles[p.className][0][0]; aX += b; aY += b; if (c_gC13 && M[0][1] == "fixed") break; p = p.parentNode.parentNode } k = c_kW(aX, aY, w, h, c, u.RL, M[0][1] == "fixed" && !c_iEWo && !c_iEM && (!c_gCo || c_gC13)); if (k.x) x = f && u.HR ? u.RL ? c.x - aX + x : c.x + c.w - w - aX + x : u.RL ? W - sX : sX - w; y += k.y; S.right = "auto"; if (c_nS) { S.left = "auto"; S.top = "auto"; S.marginLeft = x + "px"; S.marginTop = y - H + "px" } else { S.left = x + "px"; S.top = y + "px" } if (c_F[0]) c_iF(u, w, h, x, c_iE9 ? y - H : y); if (c_F[1]) c_hS() }; function c_sM(c) { var a, l, u, U, S, v, k, i, o; a = c_c; if (!a) return; l = c_gL(a); if (c_dV && c_dV.getComputedStyle && c_dV.getComputedStyle(a, "").getPropertyValue("display") == "inline" || l.currentStyle && l.currentStyle.listStyleType && l.currentStyle.listStyleType != "none") return; u = l.parentNode; v = u.LV; if (c_S.length > v + 1 && c_S[v + 1].style.display != "none") { k = c_o[v] != a ? v : v + 1; for (i = c_S.length - 1; i > k; ) c_hM(c_S[i--]) } if (v == 1) { o = c_S[1]; if (o && o != u && o.PP) c_hM(o) } if (c_keepHighlighted) for (i = v + 1; i >= v; i--) { o = c_O[i]; if (o && o.className.indexOf(c_gL(o).parentNode.className + "O") > -1 && (i > v || c_O[v] != a)) o.className = o.CN } c_o[v] = a; c_S[v] = u; if (a.OC && !c || !l.SH) return; U = c_gT(l, "ul")[0]; S = U.style; if (S.display == "block") return; if (c_keepHighlighted) { a.CN = a.className || ""; a.className = (a.CN ? a.CN + " " : "") + u.className + "O" } if (c_iE || c_gCo) { if (c_O[v]) c_gL(c_O[v]).style.zIndex = 1; l.style.zIndex = 10000 } c_O[v] = a; c_S[v + 1] = U; if (c_iEW5) c_nF(u); if (!U.FM) { S.display = "none"; S.visibility = "hidden"; S.overflow = "visible"; if (c_iEW) { if (!c_iEW5) c_fL(U); S.height = "auto" } } S.display = "block"; if (!U.FM && U.AW) c_fW(U); c_pM(U); if (!U.FM) c_fA(U); if (c_iEW5) c_nF(u, 1); if (c_oPo2 || c_oP && U.RL || c_kN4 || c_sF3) { S.display = "none"; i = U.offsetHeight; S.display = "block" } c_sH(U) }; function c_sH(u) { var f = (!c_iEW5 && typeof u.filters != "unknown" && (u.filters || "").length != 0 && typeof u.filters[0].apply != c_u); if (f) u.filters[0].apply(); u.style.visibility = "visible"; if (f) u.filters[0].play() }; function c_fL(u) { u = u.children; for (var i = 0; i < u.length; ) u[i++].style.styleFloat = "left" }; function c_nF(u, f) { u = c_gT(u, "li")[0]; if (f) { u.style.styleFloat = u.FT } else { u.FT = u.currentStyle.styleFloat; u.style.styleFloat = "none" } }; function c_iM(m, r) { var M, N, u, us, U, p, l, a, i, j, s, c, S, C; M = c_menus[m][0]; N = c_menus[m][1]; r.MM = m; r.PP = M[1] == "popup"; r.HR = M[0] == "horizontal" && !r.PP; r.RL = M[4] || c_r; r.BT = M[5]; if (c_iEM && c_r && r.HR) return; r.className = M[9]; r.LV = 1; us = c_gT(r, "ul"); U = []; for (i = 0; i < us.length; ) U[i] = us[i++]; if (!c_iEM) { var L, P; s = c_cE("span", r); if ((!c_iE || c_iE8) && (!c_oP || c_oP9) && (!c_sF || c_sF3) && (!c_gC || c_pS >= 20061010) && !c_kN && !c_oP11) { L = c_cE("span", s); P = c_cE("span", L); P.appendChild(c_d.createTextNode("+ ")); L.appendChild(P); } else { L = c_d.createTextNode("\u00a0") } s.appendChild(L) } for (i = 0; i < U.length; ) { u = U[i++]; u.MM = m; u.PP = r.PP; u.HR = r.HR; u.RL = r.RL; u.BT = r.BT; u.AW = N[2] == "auto" ? u.style.width ? 2 : 1 : 0; p = u.parentNode.parentNode; if (!u.className) u.className = p == r ? N[5] : p.className; u.LV = 2; while (p != r) { u.LV++; p = p.parentNode.parentNode } l = u.parentNode; l.SH = 1; p = l.parentNode; S = p.className; C = c_styles[S][1]; if (C[20]) { a = c_gA(l); a.style[r.RL ? "paddingLeft" : "paddingRight"] = (C[5] * 2 + C[23]) + "px"; if (c_iEM) { s = '<span class="' + S + 'S"></span>' + a.innerHTML; a.innerHTML = ""; a.innerHTML = s } else { c = s.cloneNode(true); c.className = S + "S"; if (P) c.firstChild.className = S + "SL"; a.insertBefore(c, a.firstChild) } if (u.LV == 2) c_pA(a, C, r.RL, r.HR, 1) } c_iL(u); u.onmouseover = c_mV; u.onmouseout = c_mU; if ((c_iEWo || c_iEMn) && r.HR) { C = c_styles[u.className][1]; S = "border-width:0 0 " + (C[18] == "transparent" ? 0 : C[16]) + "px 0;padding:0 0 " + (C[16] > 0 ? C[18] == "transparent" ? C[19] * 2 + C[16] : C[19] : 0) + "px 0;margin:0 0 " + (C[16] > 0 && C[18] != "transparent" ? C[19] : 0) + "px 0;"; for (j = 0; j < u.children.length - 1; ) u.children[j++].runtimeStyle.cssText = S } } c_iL(r); if (r.PP) { r.onmouseover = c_mV; r.onmouseout = c_mU } if (c_iEWo) r.style.backgroundImage = "url(https://)"; if (c_findCURRENT) c_fC(r); r.IN = 2 }; function c_mN() { if (c_oP7m || c_kNv && !c_kN || c_iC || c_iEMo || c_M) return; if (typeof c_L != c_u) c_M = 1; var m, r, h, u, U, c, l; for (m in c_menus) { r = (c_iEM || c_gC && c_pS < 20040113 && c_x) && !c_M ? 0 : c_gO(m); if (!r) { c = 1 } else if (!r.IN) { if (c_iEW) { h = r.outerHTML || ""; u = (h.match(/<UL/ig) || "").length; U = (h.match(/<\/UL/ig) || "").length } if (u && u == U || r.nextSibling || c_M) { l = r.lastChild; while (c_nN(l) != "LI") l = l.previousSibling; if (c_gA(l).offsetHeight) { if (typeof c_dB == c_u) c_dB = c_gT(c_d, "body")[0]; r.IN = 1; c_iM(m, r) } else { c = 1 } } else { c = 1 } } } if (c) setTimeout("c_mN()", 100) }; function c_cS() { var A = [], c, C, m, M, N, p, f, r, h, t, i, a, P, x, y, Q = c_r ? "right" : "left", s, E = "/", F = "*", D = E + F + F + E, H, T, L, R; s = { b: "background-image:", d: "display:block;", f: "float:left;", g: "float:" + Q + ";", h: "* html>body ", i: " !important;", l: "float:none;", m: "margin:0", p: "padding:0", r: "margin-left:", s: "screen,projection,print", t: "transparent", w: "white-space:", x: "px 0 0;", y: ":visited", z: ">li{left:0;}", A: "position:absolute;", B: "background", C: " li a.CURRENT", D: "{position:fixed;}* html ul#", F: ":first-child", H: "height:1%;", I: "display:inline;", N: " li a.NOROLL", R: "position:relative;", S: "position:static;", T: "text-decoration:", W: "width:100%;", X: "border-color:", Y: "border-style:", Z: "border-width:" }; for (c in c_styles) A[A.length] = "." + c; c_[0] += A.join(",") + "," + A.join(" li,") + " li{" + s.d + "list-style:none;" + s.p + ";" + s.m + ";line-height:normal;direction:ltr;}" + A.join(" li,") + " li{" + s.R + s.B + ":none;" + s.W + "}" + A.join(" a,") + " a{" + s.d + s.R + (c_r ? "direction:rtl;" : "") + "}" + s.h + A.join(" a," + s.h) + " a{" + s.S + "}* html " + A.join(" li,* html ") + " li{" + s.I + "display" + D + ":block;float" + D + ":left;}*" + s.F + "+html " + A.join(" li,*" + s.F + "+html ") + " li{" + s.f + "}" + s.h + A.join(" li," + s.h) + " li{" + s.d + "}" + A.join(" ul,") + " ul{display:none;" + s.A + "top:-9999px;width:11px;overflow:hidden;z-index:11111;}ul" + D + A.join(" ul,ul" + D) + " ul{" + s.d + "}* html " + A.join(" ul,* html ") + " ul{" + s.d + "}.NOSEPARATOR{" + s.Z + "0" + s.i + s.p + s.i + s.m + s.i + "}.NOLINK{cursor:default" + s.i + "}"; for (m in c_menus) { M = c_menus[m][0]; N = c_menus[m][1]; C = c_styles[M[9]]; p = M[1] == "popup"; f = M[1] == "fixed"; r = M[1] == "relative"; h = M[0] == "horizontal"; a = N[2] == "auto"; P = M[5] && !p ? "bottom" : "top"; x = "#" + m; if (!p) C[3] = 1; c_[0] += x + "{" + (!p ? s.Z + "0;" + s.p + ";" + s.B + "-color:" + s.t + ";" + s.b + "none;" : "") + "z-index:" + (p ? 10900 : 9999) + ";position:" + (p ? "absolute" : h && r ? "static" : M[1]) + ";height:auto;}" + x + " ul{" + (M[4] && !h || c_r ? "right:0;" : "left:-800px;") + "}" + (f ? "ul" + x + "{" + s.A + "}ul" + D + x + s.D + m + "{" + s.A + "}ul" + D + x + " ul" + s.D + m + " ul{" + s.A + "}" : ""); if (!c_gC) c_[1] += "ul" + x + " ul{" + s.A + "}"; c_[c_r ? 0 : 1] += "* html " + x + " a{" + (!h || p ? s.H : c_r ? s.S : "") + "}*" + s.F + "+html " + x + " a{" + (!h || p ? "min-" + s.H : s.S) + "}" + (!h || p ? s.h + x + " a{height:auto;}" : ""); if (!h || p) { c_[0] += x + "{" + P + ":" + (p ? "-9999px" : M[3]) + ";" + (M[4] && !p ? "right" : Q) + ":" + (p ? "0" : M[2]) + ";width:" + M[8] + ";}"; if (r) c_[0] += s.h + x + ">li{" + s.r + (M[4] ? "" : "-") + M[2] + s.i + s.W + "}" + s.h + x + ">li" + s.F + "{" + s.r + "0" + s.i + "}" } else { c_[0] += x + "{" + P + ":0;" + Q + ":0;" + s.W + (r ? "padding-" + P + ":" + M[3] + ";" + s.g : "margin-" + P + ":" + M[3] + ";") + "}" + x + " li{" + s.g + "width:auto;left:" + (c_r ? "-" : "") + M[2] + ";}"; C = C[1]; if (C[16] > 0) { t = C[18] == s.t; y = "li{" + s.Z + "0 " + (t ? 0 : C[16]) + s.x + s.p + " " + (t ? C[19] * 2 + C[16] : C[19]) + s.x + s.m + " " + (t ? 0 : C[19]) + s.x + "}"; c_[0] += x + ">" + y + "@media " + s.s + "{* html " + x + " " + y + "}" } c_[0] += x + " a{" + s.w + " " + D + "nowrap;}head" + s.F + "+body " + x + s.z + "*>*>html:lang(en)," + x + s.z + x + ">li" + s.F + "{margin-" + Q + ":" + M[2] + s.i + "}" + x + ">li>a{" + E + F + E + F + E + E + F + E + s.f + E + F + " " + F + E + "}" + s.h + x + ">li>a{" + s.g + "}" + (r ? "* html " + x + "{" + s.l + "}" : "") + s.h + x + ">li{" + s.l + "}" + (c_r ? "" : "* html>bo\\64 y " + x + ">li{" + s.g + "}"); c_[1] += x + " ul li{left:0;" + s.W + "}" } c_[0] += x + " ul li{" + s.l + "}"; c_[1] += x + " ul a{" + (c_iEW ? s.H : "") + (c_iEWo && h && !p && !c_r ? s.S : "") + (!c_iEWo && a ? c_iE7 || c_iE8 ? "display:inline-block;" : s.I : "") + s.w + (a && !c_iEW5x ? "nowrap" : "normal") + ";}" + x + " ul{" + (c_iEW ? "overflow:scroll;height:11px;" : "") + (a ? "" : "width:" + N[2] + ";") + "}" + (c_nS ? x + " li{" + s.S + "}" : "") } for (c in c_styles) { m = c_styles[c][0]; i = c_styles[c][1]; x = "." + c; y = x + " li a"; c_[c_styles[c][3] ? 0 : 1] += x + "{" + s.Z + m[0] + "px;" + s.Y + m[1] + ";" + s.X + m[2] + ";padding:" + m[3] + "px;" + c_cI(m[4]) + (m[5] != "" ? "filter:" + m[5] + ";" : "") + (m[6] + (m[6] != "" && m[6].charAt(m[6].length - 1) != ";" ? ";" : "")) + "}" + x + " li{" + s.Y + i[17] + ";" + s.X + i[18] + ";" + s.Z + "0 0 " + (i[18] == s.t ? 0 : i[16]) + "px 0;" + s.p + " 0 " + (i[16] > 0 ? i[18] == s.t ? i[19] * 2 + i[16] : i[19] : 0) + "px 0;" + s.m + " 0 " + (i[16] > 0 && i[18] != s.t ? i[19] : 0) + "px 0;}" + x + s.C + "," + x + s.C + ":link," + x + s.C + s.y + "{" + s.Z + i[0] + "px;" + s.Y + i[32] + ";" + s.X + i[33] + ";" + c_cI(i[34]) + "color:" + i[35] + ";" + s.T + i[36] + ";" + (i[40] + (i[40] != "" && i[40].charAt(i[40].length - 1) != ";" ? ";" : "")) + "}" + y + "," + y + ":link{cursor:pointer;" + s.Z + i[0] + "px;" + s.Y + i[1] + ";" + s.X + i[3] + ";padding:" + i[5] + "px;" + c_cI(i[6]) + "color:" + i[8] + ";font-size:" + i[10] + ";font-family:" + i[11] + ";font-weight:" + i[12] + ";" + s.T + i[13] + ";text-align:" + i[15] + ";" + (i[38] + (i[38] != "" && i[38].charAt(i[38].length - 1) != ";" ? ";" : "")) + "}" + y + s.y + "{" + s.Z + i[0] + "px;" + s.Y + i[26] + ";" + s.X + i[27] + ";" + c_cI(i[28]) + "color:" + i[29] + ";" + s.T + i[30] + ";" + (i[41] + (i[41] != "" && i[41].charAt(i[41].length - 1) != ";" ? ";" : "")) + "}" + y + ":hover," + y + ":focus," + y + ":active," + y + x + "O," + y + x + "O:link," + y + x + "O" + s.y + "," + x + s.C + ":hover," + x + s.C + ":focus," + x + s.C + ":active{" + s.Z + i[0] + "px;" + s.Y + i[2] + ";" + s.X + i[4] + ";" + c_cI(i[7]) + "color:" + i[9] + ";" + s.T + i[14] + ";" + (i[39] + (i[39] != "" && i[39].charAt(i[39].length - 1) != ";" ? ";" : "")) + "}" + x + s.N + "{" + s.Y + i[1] + s.i + s.X + i[3] + s.i + c_cI(i[6], s.i) + "color:" + i[8] + s.i + s.T + i[13] + s.i + "}"; if (i[20]) c_[1] += x + s.C + " " + x + "S," + x + s.C + ":link " + x + "S," + x + s.C + s.y + " " + x + "S{" + c_cI(i[37]) + "}" + y + " " + x + "S," + y + ":link " + x + "S{" + s.A + c_cI(i[21]) + s.B + "-repeat:no-repeat;width:" + i[23] + "px;height:" + i[24] + "px;display:none;overflow:hidden;font:10px/" + i[24] + "px sans-serif;" + s.m + ";" + s.p + ";}" + y + s.y + " " + x + "S{" + c_cI(i[31]) + "}" + y + ":hover " + x + "S," + y + ":focus " + x + "S," + y + ":active " + x + "S," + y + x + "O " + x + "S," + y + x + "O:link " + x + "S," + y + x + "O" + s.y + " " + x + "S," + x + s.C + ":hover " + x + "S," + x + s.C + ":focus " + x + "S," + x + s.C + ":active " + x + "S{" + c_cI(i[22]) + "}" + x + s.N + " " + x + "S{" + c_cI(i[21], s.i) + "}" + y + " " + x + "SL{display:list-item;width:300px;list-style:none inside url('" + c_imagesPath + i[21].substring(1, i[21].length - 1) + "');visibility:hidden;" + (c_r ? "text-align:right;" : "") + "}" + y + " " + x + "SL span{visibility:visible;" + (c_iE8 ? s.A : "") + "}" } R = c_[0] + (!c_oP7m && (!c_kNv || c_kN) && !c_iC && !c_iEMo ? c_[1] : ""); if (!c_oP7m) H = c_gT(c_d, "head")[0]; T = c_d.styleSheets; L = T ? T.length : 0; if (H && (T || c_oPv >= 7.5) && !c_iEM && (!c_gC || c_x) && (!c_kNv || c_kN) && (!c_sF || c_sFv >= 400)) { var S = c_cE("style", H); S.setAttribute("type", "text/css"); S.setAttribute("media", s.s); H.appendChild(S); if (T && T.length > L && T[L].insertRule) { T = T[L]; R = R.replace(/}([^}])/g, "}|$1").split("|"); for (i = 0; i < R.length; ) try { T.insertRule(R[i++], T.cssRules.length) } catch (e) { } } else { c_iE ? T[L].cssText = R : S.appendChild(c_d.createTextNode(R)) } } else { c_d.write('<style type="text/css" media="' + s.s + '">' + R + '</style>') } c_mN() }; if (c_dl || c_oP) { c_wL = c_w.onload || 0; c_w.onload = function() { c_L = 1; if (c_wL) c_wL() }; c_cS() }

var timeout = 500;
var closetimer = 0;
var ddmenuitem = 0;

// open hidden layer
function mopen(id) {
    // cancel close timer
    mcancelclosetime();

    // close old layer
    if (ddmenuitem) ddmenuitem.style.display = 'none';

    // get new layer and show it
    ddmenuitem = document.getElementById(id);

    ddmenuitem.style.display = 'block';

}
// close showed layer
function mclose() {
    if (ddmenuitem) ddmenuitem.style.display = 'none';
}


// go close timer
function mclosetime() {
    closetimer = window.setTimeout(mclose, timeout);
}

// cancel close timer
function mcancelclosetime() {
    if (closetimer) {
        window.clearTimeout(closetimer);
        closetimer = null;
    }
}

