function outputFlash(flashUrl,width,height){document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"')
document.write('width="'+width+'" height="'+height+'">');document.write('<param name="movie" value="'+flashUrl+'">');document.write('<param name="quality" value="high">');document.write('<param name="wmode" value="transparent">');document.write('<embed src="'+flashUrl+'" width="'+width+'" height="'+height+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed></object>');}
function goToURLbtp(){window.top.location="http://www.ifa.com/btp/";}
function btp(){window.top.location="http://www.ifa.com/btp/";}
function portfolios(){window.top.location="http://www.ifa.com/portfolios/";}
function returnsandstandarddeviation(){window.top.location="http://www.ifa.com/Library/Support/Data/returnsandstandarddeviationsformodelportfolios.asp";}
function efficientportfolios(){window.top.location="http://www.ifa.com/Admin/efficientports.htm";}
function portfoliosimulator(){window.top.location="http://www.ifa.com/Admin/portfoliosimulator.asp";}
function riskreturn(){window.top.location="http://www.ifa.com/portfolios/index.asp#RiskReturnTable";}
function goToUrlRiskTable(){window.top.location="http://www.ifa.com/portfolios/index.asp#RiskReturnTable";}
function goToUrlCharts(){window.top.location="http://www.ifa.com/library/support/data/returnsandstandarddeviationsformodelportfolios.asp";}
function goToUrlMatrix005(){window.top.location="http://www.ifa.com/portfolios/p005/matrix.asp";}
function goToUrlMatrix010(){window.top.location="http://www.ifa.com/portfolios/p010/matrix.asp";}
function goToUrlMatrix015(){window.top.location="http://www.ifa.com/portfolios/p015/matrix.asp";}
function goToUrlMatrix020(){window.top.location="http://www.ifa.com/portfolios/p020/matrix.asp";}
function goToUrlMatrix025(){window.top.location="http://www.ifa.com/portfolios/p025/matrix.asp";}
function goToUrlMatrix030(){window.top.location="http://www.ifa.com/portfolios/p030/matrix.asp";}
function goToUrlMatrix035(){window.top.location="http://www.ifa.com/portfolios/p035/matrix.asp";}
function goToUrlMatrix040(){window.top.location="http://www.ifa.com/portfolios/p040/matrix.asp";}
function goToUrlMatrix045(){window.top.location="http://www.ifa.com/portfolios/p045/matrix.asp";}
function goToUrlMatrix050(){window.top.location="http://www.ifa.com/portfolios/p050/matrix.asp";}
function goToUrlMatrix055(){window.top.location="http://www.ifa.com/portfolios/p055/matrix.asp";}
function goToUrlMatrix060(){window.top.location="http://www.ifa.com/portfolios/p060/matrix.asp";}
function goToUrlMatrix065(){window.top.location="http://www.ifa.com/portfolios/p065/matrix.asp";}
function goToUrlMatrix070(){window.top.location="http://www.ifa.com/portfolios/p070/matrix.asp";}
function goToUrlMatrix075(){window.top.location="http://www.ifa.com/portfolios/p075/matrix.asp";}
function goToUrlMatrix080(){window.top.location="http://www.ifa.com/portfolios/p080/matrix.asp";}
function goToUrlMatrix085(){window.top.location="http://www.ifa.com/portfolios/p085/matrix.asp";}
function goToUrlMatrix090(){window.top.location="http://www.ifa.com/portfolios/p090/matrix.asp";}
function goToUrlMatrix095(){window.top.location="http://www.ifa.com/portfolios/p095/matrix.asp";}
function goToUrlMatrix100(){window.top.location="http://www.ifa.com/portfolios/p100/matrix.asp";}
function MM_swapImgRestore(){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(){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){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(){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];}}
var url1="http://www.ifa.com/library/support/data/IFAindexdata.asp";function go_IFAindexdata(){location.href=url1;}
function MM_popupMsg(msg){alert(msg);}
function MM_openBrWindow(theURL,winName,features){window.open(theURL,winName,features);}
function popUp(){var url="http://hc2.humanclick.com/hc/42353038/?cmd=file&file=visitorWantsToChat&site=42353038&byhref=1";var w="475";var h="325";var menu="no";var scroll="no";var tool="no";var location="no";var resize="no";var winl="475";var wint="325";winprops='width='+w+', height='+h+', top='+wint+', left='+winl+', menubar='+menu+', scrollbars='+scroll+', toolbar='+tool+', location='+location+', resizable='+resize+''
window.open(url,'popup',winprops);}
function toggleLayer(whichLayer)
{if(document.getElementById)
{var style2=document.getElementById(whichLayer).style;if(style2.display=="none"){style2.display="block";}
else{style2.display="";}}
else if(document.all)
{var style2=document.all[whichLayer].style;style2.display=style2.display?"none":"block";}
else if(document.layers)
{var style2=document.layers[whichLayer].style;style2.display=style2.display?"none":"block";}}
function isIE6(){var strBrwsr=navigator.userAgent.toLowerCase();if(strBrwsr.indexOf("msie")>-1&&strBrwsr.indexOf("mac")<0){if(parseInt(strBrwsr.charAt(strBrwsr.indexOf("msie")+5))<6){return false;}
if(strBrwsr.indexOf("win98")>-1||strBrwsr.indexOf("win 9x 4.90")>-1||strBrwsr.indexOf("winnt4.0")>-1||strBrwsr.indexOf("windows nt 5.0")>-1)
{return false;}
return true;}else{return false;}}
function ieupdate(){var strBrowser=navigator.userAgent.toLowerCase();if(isIE6()){var theObjects=document.getElementsByTagName('object');var theObjectsLen=theObjects.length;for(var i=0;i<theObjectsLen;i++){if(theObjects[i].outerHTML){if(theObjects[i].data){theObjects[i].removeAttribute('data');}
var theParams=theObjects[i].getElementsByTagName("param");var theParamsLength=theParams.length;for(var j=0;j<theParamsLength;j++){if(theParams[j].name.toLowerCase()=='flashvars'){var theFlashVars=theParams[j].value;}}
var theOuterHTML=theObjects[i].outerHTML;var re=/<param name="FlashVars" value="">/ig;theOuterHTML=theOuterHTML.replace(re,"<param name='FlashVars' value='"+theFlashVars+"'>");theObjects[i].outerHTML=theOuterHTML;}}}}
window.onunload=function(){if(isIE6()){if(document.getElementsByTagName){var objs=document.getElementsByTagName("object");for(i=0;i<objs.length;i++){objs[i].outerHTML="";}}}}
var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return!a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();jQuery.cookie=function(key,value,options){if(arguments.length>1&&String(value)!=="[object Object]"){options=jQuery.extend({},options);if(value===null||value===undefined){options.expires=-1;}
if(typeof options.expires==='number'){var days=options.expires,t=options.expires=new Date();t.setDate(t.getDate()+days);}
value=String(value);return(document.cookie=[encodeURIComponent(key),'=',options.raw?value:encodeURIComponent(value),options.expires?'; expires='+options.expires.toUTCString():'',options.path?'; path='+options.path:'',options.domain?'; domain='+options.domain:'',options.secure?'; secure':''].join(''));}
options=value||{};var result,decode=options.raw?function(s){return s;}:decodeURIComponent;return(result=new RegExp('(?:^|; )'+encodeURIComponent(key)+'=([^;]*)').exec(document.cookie))?decode(result[1]):null;};



window.___jsl=window.___jsl||{};
window.___jsl.h=window.___jsl.h||'r;gc\/22595239-f24a003b';
window.__GOOGLEAPIS=window.__GOOGLEAPIS||{};
window.__GOOGLEAPIS.gwidget=window.__GOOGLEAPIS.gwidget||{};
window.__GOOGLEAPIS.gwidget.superbatch=false;window.__GOOGLEAPIS.iframes=window.__GOOGLEAPIS.iframes||{};
window.__GOOGLEAPIS.iframes.plusone=window.__GOOGLEAPIS.iframes.plusone_m=window.__GOOGLEAPIS.iframes.plusone||{url:':socialhost:/u/:session_index:/_/+1/fastbutton',params:{count:'',size:'',url:''}};window.___gpq=[];
window.gapi=window.gapi||{};
window.gapi.plusone=window.gapi.plusone||(function(){
  function f(n){return function(){window.___gpq.push(n,arguments)}}
  return{go:f('go'),render:f('render')}})();
function __bsld(){var p=window.gapi.plusone=window.googleapisv0.plusone;var f;while(f=window.___gpq.shift()){
  p[f]&&p[f].apply(p,window.___gpq.shift())}
if (gadgets.config.get("gwidget")["parsetags"]!=="explicit"){gapi.plusone.go();}}
window['___jsl'] = window['___jsl'] || {};window['___jsl']['u'] = 'https:\/\/apis.google.com\/js\/plusone.js';window['___jsl']['f'] = ['googleapis.client','plusone'];window['___lcfg'] = {"gwidget":{"parsetags":"onload","superbatch":false},"iframes":{"sharebox":{"params":{"json":"&"},"url":":socialhost:/u/:session_index:/_/sharebox/dialog"},":socialhost:":"https://apis.google.com","profilecard":{"params":{"style":"#","m":"&"},"url":":socialhost:/u/:session_index:/_/hovercard/appcard"},"plusone_m":{"url":":socialhost:/u/:session_index:/_/+1/fastbutton","params":{"count":"","size":"","url":""}},"plusone":{"url":":socialhost:/u/:session_index:/_/+1/fastbutton","params":{"count":"","size":"","url":""}}},"googleapis.config":{"requestCache":{"enabled":true},"methods":{"chili.people.list":true,"pos.plusones.list":true,"chili.entities.starred.insert":{"cache":{"invalidates":["chili.entities.starred","chili.entitiesDefaultAcl"]}},"chili.people.get":true,"chili.entities.get":true,"pos.plusones.delete":true,"chili.entities.starred.delete":true,"chili.entities.list":true,"pos.plusones.get":true,"chili.groups.list":true,"pos.plusones.getDefaultAcl":{"cache":{"enabled":true}},"chili.entities.starred.get":true,"pos.plusones.insert":true,"chili.activities.list":true,"chili.entitiesDefaultAcl.get":true,"chili.entities.starred.list":true,"chili.activities.get":true,"chili.activities.search":true,"pos.plusones.getSignupState":true},"versions":{"chili":"v1","pos":"v1"},"rpc":"/rpc","transport":{"isProxyShared":true},"sessionCache":{"enabled":true},"proxy":"https://clients6.google.com/static/proxy.html","developerKey":"AIzaSyCKSbrvQasunBoV16zDH9R33D88CeLr9gQ","jsh":"r;gc/22595239-f24a003b","auth":{"useInterimAuth":false}}};var jsloader=window.jsloader||{};
var gapi=window.gapi||{};
(function(){function h(){return window.___jsl=window.___jsl||{}}function m(c,d,b){b=n(b).join(c);i.length>0&&(b+=d+i.join(c));return b}function n(c){c.sort();for(var d=0,b,a;b=c[d];)b==a?c.splice(d,1):(a=b,++d);return c}function s(c){if((o||document.readyState)!="loading")return!1;if(typeof window.___gapisync!="undefined")return window.___gapisync;if(c&&(c=c.sync,typeof c!="undefined"))return c;for(var c=!1,d=document.getElementsByTagName("meta"),b=0,a;a=!c&&d[b];++b)"generator"==a.getAttribute("name")&&
"blogger"==a.getAttribute("content")&&(c=!0);return c}function p(c,d){f="";i=[];j=window.console||window.opera&&window.opera.postError;g=c;o=d;var b,a=g.match(t)||g.match(u);try{b=a?decodeURIComponent(a[2]):h().h}catch(e){}b&&(b=b.split(";"),f=b.shift(),l=(a=f!=="r")?b.shift():"https://ssl.gstatic.com/webclient/js",k=b.shift(),q=(a=f==="d")&&b.shift()||"gcjs-3p",r=a&&b.shift()||"")}var t=/\?([^&#]*&)*jsh=([^&#]*)/,u=/#([^&]*&)*jsh=([^&]*)/,v=/^https:\/\/ssl.gstatic.com\/webclient\/js(\/[a-zA-Z0-9_\-]+)*\/[a-zA-Z0-9_\-\.:!]+\.js$/,
w=/^(https?:)?\/\/([^/:@]*)(:[0-9]+)?\//,f,l,q,r,k,i,j,g,o;p(document.location.href);jsloader.load=function(c,d,b){var a;if(!c||c.length==0)j&&j.warn("Cannot load empty features.");else if(f==="d")a=l+"/"+m(":","!",c),a+=".js?container="+q+"&c=2&jsload=0",k&&(a+="&r="+k),r=="d"&&(a+="&debug=1");else if(f==="r"||f==="f")a=l+"/"+k+"/"+m("__","--",c)+".js";else{var e="Cannot respond for features ["+c.join(",")+"].";j&&j.warn(e)}e=d;d=b;if(a){if(b=e){if(h().c)throw"Cannot continue until a pending callback completes.";
h().c=b;h().o=1}a=b=a;if(f==="r")a=a.match(v);else if(e=a.match(w),(a=h().m)&&e){var e=e[2],g=e.lastIndexOf(a);a=(g==0||a.charAt(0)=="."||e.charAt(g-1)==".")&&e.length-a.length==g}else a=!1;if(!a)throw"Cannot load url "+b+".";s(d)?document.write('<script src="'+b+'"><\/script>'):(d=document.createElement("script"),d.setAttribute("src",b),document.getElementsByTagName("head")[0].appendChild(d));i=n(i.concat(c))}else e&&e()};jsloader.reinitialize_=function(c,d){p(c,d)}})();
gapi.load=function(a,b){jsloader.load(a.split(":"),b)};
gapi.load('googleapis.client:plusone', window['__bsld'], null);





// Simple Set Clipboard System
// Author: Joseph Huckaby
// http://code.google.com/p/zeroclipboard/wiki/Instructions
var ZeroClipboard = {
	
	version: "1.0.4",
	clients: {}, // registered upload clients on page, indexed by id
	moviePath: '/scripts/jquery/ZeroClipboard.swf', // URL to movie
	nextId: 1, // ID of next movie
	
	$: function(thingy) {
		// simple DOM lookup utility function
		if (typeof(thingy) == 'string') thingy = document.getElementById(thingy);
		if (!thingy.addClass) {
			// extend element with a few useful methods
			thingy.hide = function() { this.style.display = 'none'; };
			thingy.show = function() { this.style.display = ''; };
			thingy.addClass = function(name) { this.removeClass(name); this.className += ' ' + name; };
			thingy.removeClass = function(name) {
				this.className = this.className.replace( new RegExp("\\s*" + name + "\\s*"), " ").replace(/^\s+/, '').replace(/\s+$/, '');
			};
			thingy.hasClass = function(name) {
				return !!this.className.match( new RegExp("\\s*" + name + "\\s*") );
			}
		}
		return thingy;
	},
	
	setMoviePath: function(path) {
		// set path to ZeroClipboard.swf
		this.moviePath = path;
	},
	
	dispatch: function(id, eventName, args) {
		// receive event from flash movie, send to client		
		var client = this.clients[id];
		if (client) {
			client.receiveEvent(eventName, args);
		}
	},
	
	register: function(id, client) {
		// register new client to receive events
		this.clients[id] = client;
	},
	
	getDOMObjectPosition: function(obj) {
		// get absolute coordinates for dom element
		var info = {
			left: 0, 
			top: 0, 
			width: obj.width ? obj.width : obj.offsetWidth, 
			height: obj.height ? obj.height : obj.offsetHeight
		};

		while (obj) {
			info.left += obj.offsetLeft;
			info.top += obj.offsetTop;
			obj = obj.offsetParent;
		}

		return info;
	},
	
	Client: function(elem) {
		// constructor for new simple upload client
		this.handlers = {};
		
		// unique ID
		this.id = ZeroClipboard.nextId++;
		this.movieId = 'ZeroClipboardMovie_' + this.id;
		
		// register client with singleton to receive flash events
		ZeroClipboard.register(this.id, this);
		
		// create movie
		if (elem) this.glue(elem);
	}
};

ZeroClipboard.Client.prototype = {
	
	id: 0, // unique ID for us
	ready: false, // whether movie is ready to receive events or not
	movie: null, // reference to movie object
	clipText: '', // text to copy to clipboard
	handCursorEnabled: true, // whether to show hand cursor, or default pointer cursor
	cssEffects: true, // enable CSS mouse effects on dom container
	handlers: null, // user event handlers
	
	glue: function(elem) {
		// glue to DOM element
		// elem can be ID or actual DOM element object
		this.domElement = ZeroClipboard.$(elem);
		
		// float just above object, or zIndex 99 if dom element isn't set
		var zIndex = 99;
		if (this.domElement.style.zIndex) {
			zIndex = parseInt(this.domElement.style.zIndex) + 1;
		}
		
		// find X/Y position of domElement
		var box = ZeroClipboard.getDOMObjectPosition(this.domElement);
		
		// create floating DIV above element
		this.div = document.createElement('div');
		var style = this.div.style;
		style.position = 'absolute';
		style.left = '' + box.left + 'px';
		style.top = '' + box.top + 'px';
		style.width = '' + box.width + 'px';
		style.height = '' + box.height + 'px';
		style.zIndex = zIndex;
		
		// style.backgroundColor = '#f00'; // debug
		
		var body = document.getElementsByTagName('body')[0];
		body.appendChild(this.div);
		
		this.div.innerHTML = this.getHTML( box.width, box.height );
	},
	
	getHTML: function(width, height) {
		// return HTML for movie
		var html = '';
		var flashvars = 'id=' + this.id + 
			'&width=' + width + 
			'&height=' + height;
			
		if (navigator.userAgent.match(/MSIE/)) {
			// IE gets an OBJECT tag
			var protocol = location.href.match(/^https/i) ? 'https://' : 'http://';
			html += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+protocol+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+width+'" height="'+height+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+ZeroClipboard.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+flashvars+'"/><param name="wmode" value="transparent"/></object>';
		}
		else {
			// all other browsers get an EMBED tag
			html += '<embed id="'+this.movieId+'" src="'+ZeroClipboard.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+width+'" height="'+height+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+flashvars+'" wmode="transparent" />';
		}
		return html;
	},
	
	hide: function() {
		// temporarily hide floater offscreen
		if (this.div) {
			this.div.style.left = '-2000px';
		}
	},
	
	show: function() {
		// show ourselves after a call to hide()
		this.reposition();
	},
	
	destroy: function() {
		// destroy control and floater
		if (this.domElement && this.div) {
			this.hide();
			this.div.innerHTML = '';
			
			var body = document.getElementsByTagName('body')[0];
			try { body.removeChild( this.div ); } catch(e) {;}
			
			this.domElement = null;
			this.div = null;
		}
	},
	
	reposition: function(elem) {
		// reposition our floating div, optionally to new container
		// warning: container CANNOT change size, only position
		if (elem) {
			this.domElement = ZeroClipboard.$(elem);
			if (!this.domElement) this.hide();
		}
		
		if (this.domElement && this.div) {
			var box = ZeroClipboard.getDOMObjectPosition(this.domElement);
			var style = this.div.style;
			style.left = '' + box.left + 'px';
			style.top = '' + box.top + 'px';
		}
	},
	
	setText: function(newText) {
		// set text to be copied to clipboard
		this.clipText = newText;
		if (this.ready) this.movie.setText(newText);
	},
	
	addEventListener: function(eventName, func) {
		// add user event listener for event
		// event types: load, queueStart, fileStart, fileComplete, queueComplete, progress, error, cancel
		eventName = eventName.toString().toLowerCase().replace(/^on/, '');
		if (!this.handlers[eventName]) this.handlers[eventName] = [];
		this.handlers[eventName].push(func);
	},
	
	setHandCursor: function(enabled) {
		// enable hand cursor (true), or default arrow cursor (false)
		this.handCursorEnabled = enabled;
		if (this.ready) this.movie.setHandCursor(enabled);
	},
	
	setCSSEffects: function(enabled) {
		// enable or disable CSS effects on DOM container
		this.cssEffects = !!enabled;
	},
	
	receiveEvent: function(eventName, args) {
		// receive event from flash
		eventName = eventName.toString().toLowerCase().replace(/^on/, '');
				
		// special behavior for certain events
		switch (eventName) {
			case 'load':
				// movie claims it is ready, but in IE this isn't always the case...
				// bug fix: Cannot extend EMBED DOM elements in Firefox, must use traditional function
				this.movie = document.getElementById(this.movieId);
				if (!this.movie) {
					var self = this;
					setTimeout( function() { self.receiveEvent('load', null); }, 1 );
					return;
				}
				
				// firefox on pc needs a "kick" in order to set these in certain cases
				if (!this.ready && navigator.userAgent.match(/Firefox/) && navigator.userAgent.match(/Windows/)) {
					var self = this;
					setTimeout( function() { self.receiveEvent('load', null); }, 100 );
					this.ready = true;
					return;
				}
				
				this.ready = true;
				this.movie.setText( this.clipText );
				this.movie.setHandCursor( this.handCursorEnabled );
				break;
			
			case 'mouseover':
				if (this.domElement && this.cssEffects) {
					this.domElement.addClass('hover');
					if (this.recoverActive) this.domElement.addClass('active');
				}
				break;
			
			case 'mouseout':
				if (this.domElement && this.cssEffects) {
					this.recoverActive = false;
					if (this.domElement.hasClass('active')) {
						this.domElement.removeClass('active');
						this.recoverActive = true;
					}
					this.domElement.removeClass('hover');
				}
				break;
			
			case 'mousedown':
				if (this.domElement && this.cssEffects) {
					this.domElement.addClass('active');
				}
				break;
			
			case 'mouseup':
				if (this.domElement && this.cssEffects) {
					this.domElement.removeClass('active');
					this.recoverActive = false;
				}
				break;
		} // switch eventName
		
		if (this.handlers[eventName]) {
			for (var idx = 0, len = this.handlers[eventName].length; idx < len; idx++) {
				var func = this.handlers[eventName][idx];
			
				if (typeof(func) == 'function') {
					// actual function reference
					func(this, args);
				}
				else if ((typeof(func) == 'object') && (func.length == 2)) {
					// PHP style object + method, i.e. [myObject, 'myMethod']
					func[0][ func[1] ](this, args);
				}
				else if (typeof(func) == 'string') {
					// name of function
					window[func](this, args);
				}
			} // foreach event handler defined
		} // user defined handler for event
	}
	
};






$(document).ready(function(){

   function addShareButtons(DOMelement,useIconsOnly,url){
            //var url =  DOMelement.children('a').attr('href');
		    if(url==null){
			    url=document.location.toString();	
		    }
		    else if(url.indexOf('http://www.ifa.com')==-1){
			    url=document.location.toString().split('#')[0]+url;
		    }
            //DEFAULT VALUES FOR ICONS AND SIZES
            var globeIcon = "/images/icons/linkglobe24.png";
            var copyIcon = "copyclipboard24l.png";
            var giw = 53; 
			var gih = 24;	//globeicon height
			var gstyle = "";
            var ciw = 93;
			var cbciw = 93; //initial width of container

            //IF ONLY USING ICONS, CHANGE SIZES AND URLS OF ICONS
            if(useIconsOnly){
				//CHANGE globeIcon to linkglobeonly.png if you need to change back to icon only. and giw = 24;
                globeIcon = "/images/icons/linkglobe24.png";//"/images/icons/arrow-right-grey-24.png";
                copyIcon = "copyclipboard24_single.png";
                giw = 53;	//globeicon width
				gih = 24;	//globeicon height
				gstyle = "margin-left:2px;margin-right:2px"; //globeicon style
                ciw = 24;	//clipboard icon width
				cbciw = 24; //clipboard container width
            }

          

            //ALL SHARE BUTTONS
		    var newHTML = "<div class='inline top4'>";
            //LINK WITH GLOBE BUTTON. HANDLES HOVER
            newHTML+="<img style='"+gstyle+"' src='"+globeIcon+"' width='"+giw+"px' height='"+gih+"px' alt='Permalink' title='Permalink' class='linkicon24' onclick='document.location.href=\""+url+"\";return false'/>";
            //CLIPBOARD COPY CONTAINER (HANDLES FLASH HACK)
            if(!$.browser.msie && !isiPhone()){
                newHTML+="<span class='clipboardicon24container' rel='"+cbciw+"' title='Copy link to clipboard' alt='Copy link to clipboard'></span>";
                //ACTUAL CLIPBOARD IMAGE
                newHTML+="<img src='/images/icons/"+copyIcon+"' rel='"+url+"' width='"+ciw+"px' height='24px' alt='copy link to clipboard' title='copy link to clipboard' class='clipboardicon24'/>";
            }
            //GOOGLE PLUS ICON
            //newHTML+="<span class='gplusicon24'><g:plusone count='false' size='medium' href='"+url+"'></g:plusone></span>";
            //TWITTER ICON
            //newHTML+="<iframe allowtransparency='true' frameborder='0' scrolling='no' class='twitter-share-button' src='http://platform.twitter.com/widgets/tweet_button.html?url="+encodeURIComponent(url)+"&amp;text="+$('title').text()+' - '+DOMelement.text()+"&amp;count=none' style='width:59px; height:20px;'></iframe>";
            //FACEBOOK ICON
            //newHTML+="<iframe src='https://www.facebook.com/plugins/like.php?href="+encodeURIComponent(url)+"&amp;send=false&amp;layout=button_count&amp;width=450&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=35' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:50px; height:24px;' class='fbicon24' allowTransparency='true'></iframe>";
            //END ALL SHARE BUTTONS
            newHTML+="</div>";
		    return newHTML;
    }
    function isiPhone(){
        return ((navigator.platform.indexOf("iPhone") != -1)||(navigator.platform.indexOf("iPod") != -1)||(navigator.platform.indexOf("iPad") != -1));
    }

	$(".section_h3 a").attr("title",function(){return "Permalink to " + $(this).attr("title")});
	$(".sectionfigure_h3 a").attr("title",function(){return "Permalink to " + $(this).attr("title")});
	
  	$(".section_h2").after( function(){ var DOMelement = $(this); return addShareButtons(DOMelement,false,DOMelement.children('a').attr('href')) +"<hr class='section_hr'/>";});
    $(".section_h3").after( function(){	var DOMelement = $(this); return addShareButtons(DOMelement,true,DOMelement.children('a').attr('href')); });
	$(".sectionfigure_h3").after( function(){	var DOMelement = $(this); return addShareButtons(DOMelement,true,DOMelement.children('a').attr('href')); });
	$(".IFACHART").prev("p").children("strong").after( function(){ 
     if($(this).html()!=null){
	        if($(this).html().indexOf("Table")>-1 || $(this).html().indexOf("Figure")>-1){
				
		        return addShareButtons($(this),false,'#' + $(this).parent('p').next().attr('id'));
	        }
	        else{
		        return;
	        }
        }
	});

    $(".clipboardicon24container, .clipboardicon24, .gplusicon24, .twitter-share-button, .fbicon24").hover(function(){
	        clearTimeout($(this).siblings(".linkicon24").data('timeout'));  
			clearTimeout($(this).parent().prev(".section_h3").data('timeout'));          
    });
	
	$(".linkicon24").hover(function(){
        clearTimeout($(this).data('timeout'));

		$(this).siblings(".clipboardicon24container").show();
		$(this).siblings(".clipboardicon24container").css("display","inline");
		$(this).siblings(".clipboardicon24").fadeIn();
		$(this).siblings(".gplusicon24").fadeIn();
		$(this).siblings(".twitter-share-button").fadeIn();
		$(this).siblings(".fbicon24").fadeIn();
		}, 
        function() {
            var THIS = $(this);
            var t = setTimeout(function() {           
                THIS.siblings(".clipboardicon24container").hide();
		        THIS.siblings(".clipboardicon24").fadeOut();
		        THIS.siblings(".gplusicon24").fadeOut();
		        THIS.siblings(".twitter-share-button").fadeOut();
		        THIS.siblings(".fbicon24").fadeOut();
            }, 2000);
          THIS.data('timeout', t);
        }
    );
	$(".section_h3, .sectionfigure_h3").hover(function(){
        clearTimeout($(this).data('timeout'));

		$(this).next(".inline").children(".clipboardicon24container").show();
		$(this).next(".inline").children(".clipboardicon24container").css("display","inline");
		$(this).next(".inline").children(".clipboardicon24").fadeIn();
		$(this).next(".inline").children(".gplusicon24").fadeIn();
		$(this).next(".inline").children(".twitter-share-button").fadeIn();
		$(this).next(".inline").children(".fbicon24").fadeIn();
		}, 
        function() {
            var THIS = $(this);
            var t = setTimeout(function() {           
                THIS.next(".inline").children(".clipboardicon24container").hide();
		        THIS.next(".inline").children(".clipboardicon24").fadeOut();
		        THIS.next(".inline").children(".gplusicon24").fadeOut();
		        THIS.next(".inline").children(".twitter-share-button").fadeOut();
		        THIS.next(".inline").children(".fbicon24").fadeOut();
            }, 2000);
          THIS.data('timeout', t);
        }
    );

		
	$(".clipboardicon24").each(function(){	
	var clip = new ZeroClipboard.Client();	
		var text = $(this).attr('rel');
	 	 //clip.glue($(this)[0],$(this).parent()[0]);
		 var html = clip.getHTML(  $(this).siblings(".clipboardicon24container").attr("rel"), 24);
		 $(this).siblings(".clipboardicon24container").append(html);
         clip.setText(text);	
       
		 clip.addEventListener('complete', function(client, text) {
                if(text==''||text==null){
                //alert("rel: "+$(this).attr('rel').toString());
                    alert("Copy Failed. Please click the globe icon and use the url in the address bar.");

                }
                else{
                  alert("Direct link to this section ("+text+")\r\n is now copied into your clipboard for you to share.");
                }
                    
                });	 
	});

})


