
(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 captionb;var sources;var pictures;var keya;var keyb;var russia;var china;var skorea;var pakchon;var ghana;var guinea;var nkorea;var seajapan;var scalekm;var scalemile;var usa;var nkor;var punggye;var yong;var musudan;var taechon;var dmz;var yellowsea;var sohae;var seoul;var pyongyang;var keyc;var keyd;var nos;var mainPic=sym.$("main_pic");function resetCaps(){$.ajax({type:"GET",url:"GN30210.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);captionb=$(xml).find('captionb0').text();sym.$("captionbTxt").html(captionb);sources=$(xml).find('sources').text();sym.$("sourcesTxt").html(sources);pictures=$(xml).find('pictures').text();sym.$("picturesTxt").html(pictures);keya=$(xml).find('keya0').text();sym.$("keyaTxt").html(keya);keyb=$(xml).find('keyb0').text();sym.$("keybTxt").html(keyb);russia=$(xml).find('russia0').text();sym.$("russiaTxt").html(russia);china=$(xml).find('china0').text();sym.$("chinaTxt").html(china);skorea=$(xml).find('skorea0').text();sym.$("skoreaTxt").html(skorea);pakchon=$(xml).find('pakchon0').text();sym.$("pakchonTxt").html(pakchon);ghana=$(xml).find('ghana0').text();sym.$("ghanaTxt").html(ghana);guinea=$(xml).find('guinea0').text();sym.$("guineaTxt").html(guinea);nkorea=$(xml).find('nkorea0').text();sym.$("nkoreaTxt").html(nkorea);seajapan=$(xml).find('seajapan0').text();sym.$("seajapanTxt").html(seajapan);scalekm=$(xml).find('scalekm0').text();sym.$("scalekmTxt").html(scalekm);scalemile=$(xml).find('scalemile0').text();sym.$("scalemileTxt").html(scalemile);usa=$(xml).find('usa0').text();sym.$("usaTxt").html(usa);nkor=$(xml).find('nkor0').text();sym.$("nkorTxt").html(nkor);punggye=$(xml).find('punggye0').text();sym.$("punggyeTxt").html(punggye);yong=$(xml).find('yong0').text();sym.$("yongTxt").html(yong);musudan=$(xml).find('musudan0').text();sym.$("musudanTxt").html(musudan);taechon=$(xml).find('taechon0').text();sym.$("taechonTxt").html(taechon);dmz=$(xml).find('dmz0').text();sym.$("dmzTxt").html(dmz);yellowsea=$(xml).find('yellowsea0').text();sym.$("yellowseaTxt").html(yellowsea);sohae=$(xml).find('sohae0').text();sym.$("sohaeTxt").html(sohae);seoul=$(xml).find('seoul0').text();sym.$("seoulTxt").html(seoul);pyongyang=$(xml).find('pyongyang0').text();sym.$("pyongyangTxt").html(pyongyang);keyc=$(xml).find('keyc0').text();sym.$("keycTxt").html(keyc);keyd=$(xml).find('keyd0').text();sym.$("keydTxt").html(keyd);nos=$(xml).find('nos0').text();sym.$("nosTxt").html(nos);}});}
resetCaps();var thumbWidth=83;var n=6;var thumbs=9;var space=30;var ttime=500;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:"GN30210.xml",    dataType:"xml",    success:function(xml){var id=sym.getVariable("number");var next;if(selected_id=="Stage_mainBtn0"){next=id-1;if(next<1){sym.$("mainBtn0").hide();sym.$("stripBtn0").hide();}
if(next<n-thumbs){sym.$("stripBtn1").show();}
if(next>n-thumbs){sym.$("stripBtn1").hide();}
if(next<n-1){sym.$("mainBtn1").show();}
if(id>n-thumbs){sym.getSymbol("slider").$("buttonstrip").animate({left:((n-thumbs)*-(thumbWidth))+space},0);}else{sym.getSymbol("slider").$("buttonstrip").animate({left:(next*-(thumbWidth))+space},ttime);}}else{next=id+1;if(next>0){sym.$("mainBtn0").show();sym.$("stripBtn0").show();}
if(next<n-thumbs-1){sym.$("stripBtn1").show();}
if(next>n-thumbs-1){sym.$("stripBtn1").hide();}
if(next>n-2){sym.$("mainBtn1").hide();}
if(id<n-thumbs){sym.getSymbol("slider").$("buttonstrip").animate({left:(next*-(thumbWidth))+space},ttime);}}
  keya=$(xml).find('keya'+next).text();        sym.$("keyaTxt").html(keya);  keyb=$(xml).find('keyb'+next).text();        sym.$("keybTxt").html(keyb);  russia=$(xml).find('russia'+next).text();        sym.$("russiaTxt").html(russia);  china=$(xml).find('china'+next).text();        sym.$("chinaTxt").html(china);  skorea=$(xml).find('skorea'+next).text();        sym.$("skoreaTxt").html(skorea);  pakchon=$(xml).find('pakchon'+next).text();        sym.$("pakchonTxt").html(pakchon);  ghana=$(xml).find('ghana'+next).text();        sym.$("ghanaTxt").html(ghana);  guinea=$(xml).find('guinea'+next).text();        sym.$("guineaTxt").html(guinea);  nkorea=$(xml).find('nkorea'+next).text();        sym.$("nkoreaTxt").html(nkorea);  seajapan=$(xml).find('seajapan'+next).text();        sym.$("seajapanTxt").html(seajapan);  scalekm=$(xml).find('scalekm'+next).text();        sym.$("scalekmTxt").html(scalekm);  scalemile=$(xml).find('scalemile'+next).text();        sym.$("scalemileTxt").html(scalemile);  usa=$(xml).find('usa'+next).text();        sym.$("usaTxt").html(usa);  nkor=$(xml).find('nkor'+next).text();        sym.$("nkorTxt").html(nkor);  punggye=$(xml).find('punggye'+next).text();        sym.$("punggyeTxt").html(punggye);  yong=$(xml).find('yong'+next).text();        sym.$("yongTxt").html(yong);  musudan=$(xml).find('musudan'+next).text();        sym.$("musudanTxt").html(musudan);  taechon=$(xml).find('taechon'+next).text();        sym.$("taechonTxt").html(taechon);  dmz=$(xml).find('dmz'+next).text();        sym.$("dmzTxt").html(dmz);  yellowsea=$(xml).find('yellowsea'+next).text();        sym.$("yellowseaTxt").html(yellowsea);  sohae=$(xml).find('sohae'+next).text();        sym.$("sohaeTxt").html(sohae);  seoul=$(xml).find('seoul'+next).text();        sym.$("seoulTxt").html(seoul);  pyongyang=$(xml).find('pyongyang'+next).text();        sym.$("pyongyangTxt").html(pyongyang);        caption=$(xml).find('caption'+next).text();        sym.$("captionTxt").html(caption);        captionb=$(xml).find('captionb'+next).text();        sym.$("captionbTxt").html(captionb);        keyc=$(xml).find('keyc'+next).text();        sym.$("keycTxt").html(keyc);        keyd=$(xml).find('keyd'+next).text();        sym.$("keydTxt").html(keyd);        nos=$(xml).find('nos'+next).text();        sym.$("nosTxt").html(nos);        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_stripBtn0"){if(s>0){if(s<=i){sym.$("stripBtn0").hide();}else{sym.$("stripBtn0").show();}s=s-1;}else{s=0;sym.$("stripBtn0").hide();}
sym.getSymbol("slider").$("buttonstrip").animate({left:(thumbs*s*-(thumbWidth))+space},ttime);sym.$("stripBtn1").show();}else{if(s>(n/thumbs)-2){s=Math.floor(n/thumbs);sym.getSymbol("slider").$("buttonstrip").animate({left:((n-thumbs)*-(thumbWidth))+space},ttime);sym.$("stripBtn1").hide();}else{s=s+1;sym.getSymbol("slider").$("buttonstrip").animate({left:(thumbs*s*-(thumbWidth))+space},ttime);sym.$("stripBtn1").show();}
sym.$("stripBtn0").show();}
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:"GN30210.xml",    dataType:"xml",    success:function(xml){for(var i=0;i<n;i++){if(selected_id=="Stage_slider_buttonstrip_btn"+i){keya=$(xml).find('keya'+i).text();        sym.$("keyaTxt").html(keya);   
keyb=$(xml).find('keyb'+i).text();        sym.$("keybTxt").html(keyb);   
russia=$(xml).find('russia'+i).text();        sym.$("russiaTxt").html(russia);   
china=$(xml).find('china'+i).text();        sym.$("chinaTxt").html(china);   
skorea=$(xml).find('skorea'+i).text();        sym.$("skoreaTxt").html(skorea);   
pakchon=$(xml).find('pakchon'+i).text();        sym.$("pakchonTxt").html(pakchon);   
ghana=$(xml).find('ghana'+i).text();        sym.$("ghanaTxt").html(ghana);   
guinea=$(xml).find('guinea'+i).text();        sym.$("guineaTxt").html(guinea);   
nkorea=$(xml).find('nkorea'+i).text();        sym.$("nkoreaTxt").html(nkorea);   
seajapan=$(xml).find('seajapan'+i).text();        sym.$("seajapanTxt").html(seajapan);   
scalekm=$(xml).find('scalekm'+i).text();        sym.$("scalekmTxt").html(scalekm);   
scalemile=$(xml).find('scalemile'+i).text();        sym.$("scalemileTxt").html(scalemile);   
usa=$(xml).find('usa'+i).text();        sym.$("usaTxt").html(usa);   
nkor=$(xml).find('nkor'+i).text();        sym.$("nkorTxt").html(nkor);   
punggye=$(xml).find('punggye'+i).text();        sym.$("punggyeTxt").html(punggye);   
yong=$(xml).find('yong'+i).text();        sym.$("yongTxt").html(yong);   
musudan=$(xml).find('musudan'+i).text();        sym.$("musudanTxt").html(musudan);   
taechon=$(xml).find('taechon'+i).text();        sym.$("taechonTxt").html(taechon);   
dmz=$(xml).find('dmz'+i).text();        sym.$("dmzTxt").html(dmz);   
yellowsea=$(xml).find('yellowsea'+i).text();        sym.$("yellowseaTxt").html(yellowsea);   
sohae=$(xml).find('sohae'+i).text();        sym.$("sohaeTxt").html(sohae);   
seoul=$(xml).find('seoul'+i).text();        sym.$("seoulTxt").html(seoul);   
pyongyang=$(xml).find('pyongyang'+i).text();        sym.$("pyongyangTxt").html(pyongyang);   
        caption=$(xml).find('caption'+i).text();        sym.$("captionTxt").html(caption);        captionb=$(xml).find('captionb'+i).text();        sym.$("captionbTxt").html(captionb);        keyc=$(xml).find('keyc'+i).text();        sym.$("keycTxt").html(keyc);        keyd=$(xml).find('keyd'+i).text();        sym.$("keydTxt").html(keyd);        nos=$(xml).find('nos'+i).text();        sym.$("nosTxt").html(nos);        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.$("mainBtn0").show();sym.$("stripBtn0").show();}
if(i<1){sym.$("mainBtn0").hide();sym.$("stripBtn0").hide();}
if(i<n-thumbs-1){sym.$("stripBtn1").show();}
if(i>n-thumbs-1){sym.$("stripBtn1").hide();}
if(i>n-2){sym.$("mainBtn1").hide();}
if(i<n-1){sym.$("mainBtn1").show();}
if(i<n-thumbs+1){sym.getSymbol("slider").$("buttonstrip").animate({left:(i*-(thumbWidth))+space},ttime);}else{sym.getSymbol("slider").$("buttonstrip").animate({left:((n-thumbs)*-(thumbWidth))+space},ttime);}
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.$("mainBtn0").hide();sym.$("stripBtn0").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,"GraphicNews30210");