
(function($,Edge,compId){var Composition=Edge.Composition,Symbol=Edge.Symbol;
//Edge symbol: 'stage'
(function(symbolName){Symbol.bindElementAction(compId,symbolName,"document","compositionReady",function(sym,e){sym.$("captionTxt").css('line-height','120%');var headline;var headlinetxt=sym.$("headlineTxt");var order;var caption;var smcap
var sources;var pictures;var mainPic=sym.$("main_pic");function resetCaps(){$.ajax({type:"GET",url:"GN31895.xml",dataType:"xml",success:function(xml){headline=$(xml).find('headline').text();sym.$("headlineTxt").html(headline);order=$(xml).find('order0').text();sym.$("orderTxt").html(order);caption=$(xml).find('caption0').text();sym.$("captionTxt").html(caption);smcap=$(xml).find('smcap0').text();sym.$("smcapTxt").html(smcap);sources=$(xml).find('sources').text();sym.$("sourcesTxt").html(sources);pictures=$(xml).find('picture0').text();sym.$("pictureTxt").html(pictures);}});}
resetCaps();var thumbWidth=83;var n=28;var thumbs=9;var space=31;var ttime=500;var RTL="false";var igmeasure=sym.$("Stage").width();var buttonstrip=sym.getSymbol("slider").$("buttonstrip");var stripw=buttonstrip.width();var offset=buttonstrip.offset();var rtloff=31;var fwd;var back;fwd=(RTL=="true")?0:1;back=(RTL=="true")?1:0;sym.setVariable("number",0);sym.setVariable("strip",0);var mainbtnArray=["mainBtn0","mainBtn1"];for(var m=0;m<mainbtnArray.length;m++){sym.$("mainBtn"+m).bind('click',mainbtnClick);}
function mainbtnClick(){var selected_id=$(this).attr("id");$.ajax({   
    type:"GET",    url:"GN31895.xml",    dataType:"xml",    success:function(xml){var id=sym.getVariable("number");var next;if(selected_id=="Stage_mainBtn"+back){next=id-1;if(next<1){sym.$("mainBtn"+back).hide();sym.$("stripBtn"+back).hide();}
if(next<n-thumbs){sym.$("stripBtn"+fwd).show();}
if(next>n-thumbs){sym.$("stripBtn"+fwd).hide();}
if(next<n-1){sym.$("mainBtn"+fwd).show();}
if(id>n-thumbs){if(RTL=="true"){ttime=0;moveIt=rtloff+((n-thumbs)*(thumbWidth))-space;}else{ttime=0;moveIt=((n-thumbs)*-(thumbWidth))+space;}}else{if(RTL=="true"){moveIt=rtloff+(next*(thumbWidth))-space;}else{moveIt=(next*-(thumbWidth))+space;}}}else{next=id+1;if(next>0){sym.$("mainBtn"+back).show();sym.$("stripBtn"+fwd).show();}
if(next<n-thumbs-1){sym.$("stripBtn"+back).show();}
if(next>n-thumbs-1){sym.$("stripBtn"+fwd).hide();}
if(next>n-2){sym.$("mainBtn"+fwd).hide();}
if(id<n-thumbs){if(RTL=="true"){moveIt=rtloff+(next*(thumbWidth))-space;}else{moveIt=(next*-(thumbWidth))+space;}}}
  sym.getSymbol("slider").$("buttonstrip").stop().animate({left:moveIt},ttime);startPos=moveIt;pictures=$(xml).find('picture'+next).text();        sym.$("pictureTxt").html(pictures);        caption=$(xml).find('caption'+next).text();        sym.$("captionTxt").html(caption);        smcap=$(xml).find('smcap'+next).text();        sym.$("smcapTxt").html(smcap);        order=$(xml).find('order'+next).text();        sym.$("orderTxt").html(order);for(var i=0;i<n;i++){if(i==next){mainPic.attr("src","images/pic_"+next+".jpg");sym.getSymbol("slider").getSymbol("buttonstrip").$("btn"+next).css({"border-width":"3px","border-style":"solid","border-color":"rgba(100,100,100,0.75)"});}else{sym.getSymbol("slider").getSymbol("buttonstrip").$("btn"+i).css({"border-width":"3px","border-style":"solid","border-color":"rgba(100,100,100,0)"});}}
sym.setVariable("number",next);}});e.preventDefault()}
var btnArray=["stripBtn0","stripBtn1"];for(var b=0;b<btnArray.length;b++){sym.$("stripBtn"+b).bind('click',stripbtnClick);}
function stripbtnClick(){var selected_id=$(this).attr("id");var s=sym.getVariable("strip");if(selected_id=="Stage_stripBtn"+back){if(s>0){s=s-1;}else{s=0;}
moveIt=(RTL=="true")?rtloff-space+(thumbs*s*(thumbWidth)):space+(thumbs*s*-(thumbWidth));}else{if(s>=(n/thumbs)-2){s=Math.floor(n/thumbs);moveIt=(RTL=="true")?rtloff-space+((n-thumbs)*(thumbWidth)):((n-thumbs)*-(thumbWidth))+space;}else{s=s+1;moveIt=(RTL=="true")?rtloff-space+(thumbs*s*(thumbWidth)):(thumbs*s*-(thumbWidth))+space;}}
if(s<1){sym.$("stripBtn"+back).hide();}else{sym.$("stripBtn"+back).show();}
if(s>(n/thumbs)-1){sym.$("stripBtn"+fwd).hide();}else{sym.$("stripBtn"+fwd).show();}
sym.getSymbol("slider").$("buttonstrip").stop().animate({left:moveIt},ttime);startPos=moveIt;sym.setVariable("strip",s);e.preventDefault()}
for(var j=0;j<n;j++){sym.getSymbol("slider").getSymbol("buttonstrip").$("btn"+j).bind('click',thClick);sym.getSymbol("slider").getSymbol("buttonstrip").$("btn"+j).css({"border-width":"3px","border-style":"solid","border-color":"rgba(100,100,100,0)"});}
function thClick(){var selected_id=$(this).attr("id");$.ajax({   
    type:"GET",    url:"GN31895.xml",    dataType:"xml",    success:function(xml){for(var i=0;i<n;i++){if(selected_id=="Stage_slider_buttonstrip_btn"+i){pictures=$(xml).find('picture'+i).text();        sym.$("pictureTxt").html(pictures);   
        caption=$(xml).find('caption'+i).text();        sym.$("captionTxt").html(caption);        smcap=$(xml).find('smcap'+i).text();        sym.$("smcapTxt").html(smcap);        order=$(xml).find('order'+i).text();        sym.$("orderTxt").html(order);sym.getSymbol("slider").getSymbol("buttonstrip").$("btn"+i).css({"border-width":"3px","border-style":"solid","border-color":"rgba(100,100,100,0.75)"});mainPic.attr("src","images/pic_"+i+".jpg");if(i>0){sym.$("mainBtn"+back).show();sym.$("stripBtn"+back).show();}
if(i<1){sym.$("mainBtn"+back).hide();sym.$("stripBtn0"+back).hide();}
if(i<n-thumbs-1){sym.$("stripBtn"+fwd).show();}
if(i>n-thumbs-1){sym.$("stripBtn"+fwd).hide();}
if(i>n-2){sym.$("mainBtn"+fwd).hide();}
if(i<n-1){sym.$("mainBtn"+fwd).show();}
if(i<n-thumbs+1){if(RTL=="true"){moveIt=rtloff+(i*(thumbWidth))-space;}else{moveIt=(i*-(thumbWidth))+space;}}else{if(RTL=="true"){moveIt=rtloff+((n-thumbs)*(thumbWidth))-space;}else{moveIt=((n-thumbs)*-(thumbWidth))+space;}}
sym.getSymbol("slider").$("buttonstrip").stop().animate({left:moveIt},ttime);startPos=moveIt;sym.setVariable("strip",Math.floor(i/thumbs));sym.setVariable("number",i);}else{sym.getSymbol("slider").getSymbol("buttonstrip").$("btn"+i).css({"border-width":"3px","border-style":"solid","border-color":"rgba(100,100,100,0)"});}}
               }
   });e.preventDefault()}
sym.$("mainBtn"+back).hide();sym.$("stripBtn"+back).hide();});
//Edge binding end
})("stage");
//Edge symbol end:'stage'

//=========================================================

//Edge symbol: 'backBtn'
(function(symbolName){})("back_butt");
//Edge symbol end:'back_butt'

//=========================================================

//Edge symbol: 'forwardBtn'
(function(symbolName){})("forward_butt");
//Edge symbol end:'forward_butt'

//=========================================================

//Edge symbol: 'button_strip'
(function(symbolName){})("button_strip");
//Edge symbol end:'button_strip'

//=========================================================

//Edge symbol: 'strip'
(function(symbolName){})("strip");
//Edge symbol end:'strip'
})(jQuery,AdobeEdge,"GraphicNews31895");