﻿﻿var resizeTimer=null;var intWindowWidth;var intWindowHeight;var intLangID=0;var strOpen="Open";var strClose="Close";var strPrint="Print";var astrLangSupported=["en","es"]
$(document).ready(function()
{if((document.getElementById)&&(document.getElementById('mtaLanguage')!=null)&&(document.getElementById('mtaLanguage').getAttribute('content')!=null))
{intLangID=astrLangSupported.indexOf(document.getElementById('mtaLanguage').getAttribute('content'));}
else if(($('meta[http-equiv*=Content-Language]').length > 0)&&($('meta[http-equiv*=Content-Language]').attr('content').length>0))
{intLangID=astrLangSupported.indexOf($('meta[http-equiv*=Content-Language]').attr('content'));}
if(intLangID==1)
{strOpen="Abrir";strClose="Cerrar";strPrint="Imprimir";}
initTopMenu();initLeftMenu();if($('h2.results').length>0)
{window.location.hash="#Results";}
if($('.imageRotate').length>0)
{$('.imageRotate').cycle
({timeout:10000,delay:0,speed:1000});$('.imageRotate img.hidden').removeClass('hidden');}
if($('img[usemap]').length>0)
{$('img[usemap]').maphilight();}
if(($.browser.msie)&&(($.browser.version=="6.0")||($.browser.version=="7.0")))
{$(window).resize
(function()
{if(resizeTimer)
{clearTimeout(resizeTimer);}
resizeTimer=setTimeout(initTopMenu,100);});}
else
{$(window).resize(initTopMenu);}
if($('#divPageTitleBar.print').length>0)
{var strPrintLink="<a href=\"#\" class=\"printPage\" title=\""+strPrint+"\"><span class=\"hide\">"+strPrint+"</span></a>";if($('#divPageTitleBar .pageOptions ul').length>0)
{$('#divPageTitleBar .pageOptions ul:first').prepend("<li>"+strPrintLink+"</li>");}
else
{$('#divPageTitleBar .pageOptions').html(strPrintLink);}}
if($('#divPageBottomTools.print').length>0)
{var strPrintLink="<a href=\"#\" class=\"printPage\">"+strPrint+"</a>";if($('#divPageBottomTools ul').length>0)
{$('#divPageBottomTools ul:first').prepend("<li>"+strPrintLink+"</li>");}
else
{$('#divPageBottomTools').html(strPrintLink);}}
$('a.printPage').click
(function()
{window.print();return false;});});function initTopMenu()
{var strSubMenuTitle="";var strLinkTitle="";intWindowWidth=$(window).width();intWindowHeight=$(window).height();if((intWindowWidth>550)&&(intWindowHeight>200))
{if(!$('.topNav').hasClass('topNavDynamic'))
{$('.topNav').addClass('topNavDynamic');}
$('.topNav .subMenuHeader').each
(function()
{strSubMenuTitle=$(this).text().replace('&', '\&amp;');if(intLangID==1)
{strLinkTitle=strSubMenuTitle+" submenú";}
else
{strLinkTitle=strSubMenuTitle+" submenu";}
if(($(this).parent().find('li').find('.currentPage').length==0)&&(!$(this).hasClass('menuOpenByDefault')))
{$(this).replaceWith('<a href="#" title="'+strLinkTitle+'">'+strSubMenuTitle+'</a>');}
else
{$(this).replaceWith('<a href="#" title="'+strLinkTitle+'" class="subMenuSection">'+strSubMenuTitle+'</a>');}});if(($.browser.msie)&&($.browser.version=="6.0"))
{fixTopNavIE6();}
makeTopNavAccessible();}
else if($('.topNav').hasClass('topNavDynamic'))
{if(($.browser.msie)&&($.browser.version=="6.0"))
{$('.topNavDynamic li ul').css('width','auto');}
$('.topNav').removeClass('topNavDynamic');}}
fixTopNavIE6=function()
{$('.topNavDynamic li').hover
(function()
{$(this).addClass("sfhover");},function()
{$(this).removeClass("sfhover");});var cssClassFullWidth={width:(intWindowWidth-13)};$('.topNavDynamic li ul').css(cssClassFullWidth);}
makeTopNavAccessible=function()
{$('.topNavDynamic li ul').hover
(function()
{$(this).parent().find("a:first").addClass("sffocus");},function()
{$(this).parent().find("a:first").removeClass("sffocus");});$('.topNavDynamic a').focus
(function()
{$(this).addClass("sffocus");$(this).parent().addClass("sfhover");if($(this).parent().parent().parent().get(0).tagName.toLowerCase()=='li')
{$(this).parent().parent().parent().addClass("sfhover");$(this).parent().parent().parent().find("a:first").addClass("sffocus");}});$('.topNavDynamic a').blur
(function()
{$(this).removeClass("sffocus");$(this).parent().removeClass("sfhover");if($(this).parent().parent().parent().get(0).tagName.toLowerCase()=='li')
{$(this).parent().parent().parent().removeClass("sfhover");$(this).parent().parent().parent().find("a:first").removeClass("sffocus");}});}
function initLeftMenu()
{var strSubMenuTitle="";var strLinkTitle="";$('#divLeftColumn div.subMenuHeader').each
(function()
{strSubMenuTitle=$(this).text().replace('&', '\&amp;');if(intLangID==1)
{strLinkTitle=" "+strSubMenuTitle+" submenú";}
else
{strLinkTitle=" "+strSubMenuTitle+" submenu";}
if(($(this).parent().find('li').find('.currentPage').length==0)&&(!$(this).hasClass('subMenuOpenByDefault')))
{$(this).parent().find('ul').hide();$(this).replaceWith('<a href="#" title="'+strOpen+strLinkTitle+'" class="subMenuClosed">'+strSubMenuTitle+'</a>');}
else
{$(this).replaceWith('<a href="#" title="'+strClose+strLinkTitle+'" class="subMenuOpened">'+strSubMenuTitle+'</a>');}});$('#divLeftColumn a.subMenuClosed').toggle
(function()
{$(this).addClass("subMenuOpened");$(this).removeClass('subMenuClosed');$(this).attr('title',$(this).attr('title').replace(strOpen,strClose));},function()
{$(this).addClass("subMenuClosed");$(this).removeClass("subMenuOpened");$(this).attr('title',$(this).attr('title').replace(strClose,strOpen));});$("#divLeftColumn a.subMenuClosed").click
(function()
{$(this).next().slideToggle('normal');});$('#divLeftColumn a.subMenuOpened').toggle
(function()
{$(this).addClass("subMenuClosed");$(this).removeClass('subMenuOpened');$(this).attr('title',$(this).attr('title').replace(strClose,strOpen));},function()
{$(this).removeClass("subMenuClosed");$(this).addClass('subMenuOpened');$(this).attr('title',$(this).attr('title').replace(strOpen,strClose));});$('#divLeftColumn a.subMenuOpened').click
(function()
{$(this).next().slideToggle('normal');});}
String.prototype.trim=function()
{return this.replace(/^\s+|\s+$/,"");}
Array.prototype.indexOf=function(vntValue)
{for(var i=0;i<this.length;i++)
{if(this[i]==vntValue)
{return i;}}
return-1;}
function querystring(parameterName)
{parameterName=parameterName.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");var regex=new RegExp("[\\?&]"+parameterName+"=([^&#]*)");var results=regex.exec(window.location.href);if(results!=null)
{return results[1];}
else
{return"";}}
function cookieCutter(strCookieName)
{var strCookieValue="";var strCookies=""+document.cookie;var intCookieStartIdx=strCookies.indexOf(strCookieName);if(intCookieStartIdx>-1)
{var intCookieEndIdx=strCookies.indexOf(';',intCookieStartIdx);if(intCookieEndIdx==-1)
{intCookieEndIdx=2;}
strCookieValue=strCookieValue.substring(intCookieStartIdx+strCookieName.length,intCookieEndIdx);alert(strCookieValue);}
return unescape(strCookieValue);}