var shell;if(shell===undefined){shell={}}shell.server_prefix="/static/styles/";shell.gFpVersion="10";shell.flash_modules=[];var flashvars={};var params={};params.allowScriptAccess="always";params.allowFullScreen="true";params.wmode="transparent";shell.date_format="";shell.site_language="";shell.news_and_media_view_all="";shell.close_str="";shell.of_str="";shell.next_str="";shell.previous_str="";shell.hide_location_str="";shell.change_location_str="";shell.is_application_frameset=false;shell.previous_step_str="";shell.next_step_str="";shell.finish_str="";shell.clear_form_str="";shell.input_form_name="";shell.form_paginated_steps=true;var form_labels_selected_index=[];shell.xhtml_doctype_fix=function(){var obj_link_targets=jQuery("a");obj_link_targets.each(function(index,item){if(item.getAttribute("rel")==="external"){item.target="_blank"}})};shell.update_link_targets=function(jquery_obj){if(jquery_obj){var obj_links=jQuery("a");obj_links.each(function(index,item){item.target="_top"})}};shell.update_target=function(jquery_obj){if(jquery_obj){jquery_obj.target="_top"}};shell.NewsModule={initialize:function(jquery_obj){this.wrapper=jquery_obj;this.wrapper.yPosition=this.wrapper.position();this.rss_matches=this.wrapper.find(".rss_detail");this.non_js_footer_link=this.wrapper.find(".news_and_media_releases:first");this.currentStory=1;this.numStories=this.rss_matches.length;this.paginationWrapper="";this.prevStoryLink=null;this.storyCounterText="";this.nextStoryLink=null;this.showAllLink=null;this.contractAllLink=null;this.footer=this.wrapper.find(".switch_rss_items:first");if(this.numStories>1){this.decorate(this.currentStory)}},decorate:function(story){this.displayStory(story);this.paginationWrapper=jQuery("<div class='pagination'></div>");this.prevStoryLink=jQuery("<a href='#' class='prevStoryLink' style='display:none'>&nbsp;</a>");this.prevStoryLink.bind("click",this,this.displayPrevStory);this.storyCounterText=jQuery("<strong><span>"+this.currentStory+"</span> "+shell.of_str+" "+this.numStories+"</strong>");this.nextStoryLink=jQuery("<a href='#' class='nextStoryLink'>&nbsp;</a>");this.storyCounterLink=jQuery("<a href='#'>"+this.currentStory+"</a> ");this.nextStoryLink.bind("click",this,this.displayNextStory);this.showAllLink=jQuery("<a href='#' class='showall'>"+shell.news_and_media_view_all+"</a>");this.showAllLink.bind("click",this,this.displayAllStories);this.contractAllLink=jQuery("<a href='#' style='display:none;'>"+shell.close_str+"</a>");this.contractAllLink.bind("click",this,this.contractAllStories);this.footer.prepend(this.contractAllLink);this.paginationWrapper.prepend(this.showAllLink);this.paginationWrapper.prepend(this.nextStoryLink);this.paginationWrapper.prepend(this.storyCounterText);this.paginationWrapper.prepend(this.prevStoryLink);if(this.non_js_footer_link){this.non_js_footer_link.css("display","none")}this.footer.prepend(this.paginationWrapper)},displayStory:function(story){this.rss_matches.each(function(index,item){if(story!==index+1){jQuery(item).css("display","none")}else{jQuery(item).css("display","block")}})},displayPrevStory:function(e){var story=e.data.wrapper.find(".rss_detail:visible");var previousStory=story.prev(".rss_detail");story.css("display","none");previousStory.css("display","block");e.data.currentStory--;if(e.data.currentStory<=1){e.data.prevStoryLink.css("display","none")}e.data.nextStoryLink.css("display","inline");e.data.setStoryCounterText();e.preventDefault()},displayNextStory:function(e){var story=e.data.wrapper.find(".rss_detail:visible");var nextStory=story.next(".rss_detail");story.css("display","none");nextStory.css("display","block");e.data.prevStoryLink.css("display","inline");if(nextStory.next(".rss_detail").length!=0){e.data.nextStoryLink.css("display","inline")}else{e.data.nextStoryLink.css("display","none")}e.data.currentStory++;e.data.setStoryCounterText();e.preventDefault()},displayAllStories:function(e){e.data.rss_matches.each(function(index,item){jQuery(item).css("display","block")});e.data.paginationWrapper.css("display","none");e.data.contractAllLink.css("display","inline");if(e.data.non_js_footer_link){e.data.non_js_footer_link.css("display","inline")}e.preventDefault()},contractAllStories:function(e){e.data.currentStory=1;e.data.prevStoryLink.css("display","none");e.data.rss_matches.each(function(index,item){(index>0)?jQuery(item).css("display","none"):jQuery(item).css("display","block")});e.data.paginationWrapper.css("display","block");e.data.contractAllLink.css("display","none");if(e.data.non_js_footer_link){e.data.non_js_footer_link.css("display","none")}e.data.setStoryCounterText();e.data.nextStoryLink.css("display","inline");scroll(0,e.data.wrapper.yPosition);e.preventDefault()},setStoryCounterText:function(){this.storyCounterText.find("span:first").text(this.currentStory)}};shell.CountrySelectorModule={initialize:function(jquery_obj){this.wrapper=jquery_obj;this.display_mode=false;this.location_form=this.wrapper.find("form:first");this.location_fieldset=this.location_form.find("fieldset:first");this.location_select=this.location_fieldset.find("select:first");this.location_submit=this.location_fieldset.find("input:first");this.location_options=this.location_select.find("option");this.text_block=this.wrapper.find("div:first");this.switcher_anchor=null;this.hide_location_str=shell.hide_location_str;this.change_location_str=shell.change_location_str;this.country_trigger=null;this.location_list_wrapper=null;this.location_list=null;this.displayed_animated_list=false;this.decorate();if(jQuery.browser.msie&&!shell.is_application_frameset){this.initialize_country_animation()}},decorate:function(){this.switcher_anchor=jQuery('<a href="#"></a>');this.switcher_anchor.innerHTML=this.switcher_anchor.title=(this.display_mode)?this.hide_location_str:this.change_location_str;this.switcher_anchor.append(this.switcher_anchor.innerHTML);this.switcher_anchor.bind("click",this,this.toggle_site_locations);this.text_block.append(this.switcher_anchor);this.location_form.bind("submit",function(){return false});this.location_submit.bind("click",this,this.changeLocation);this.location_form.css("display","none")},changeLocation:function(e){if(e.data.location_select.selectedIndex){top.location.href=e.data.location_options[e.data.location_select.selectedIndex].value}else{top.location.href=e.data.location_select.val()}e.preventDefault()},toggle_site_locations:function(e){e.data.toggle_display_mode();if(e.data.display_mode){e.data.wrapper.find("a:first").html(e.data.hide_location_str)}else{e.data.wrapper.find("a:first").html(e.data.change_location_str)}e.data.show_hide_content();e.preventDefault()},toggle_display_mode:function(){this.display_mode=!this.display_mode},show_hide_content:function(){if((jQuery.browser.msie)&&(this.country_trigger)&&!shell.is_application_frameset){this.country_trigger.css("display",(this.display_mode)?"block":"none")}this.location_form.css("display",(this.display_mode)?"block":"none")},initialize_country_animation:function(){this.location_list_wrapper=jQuery('<div id="location_list_wrapper"></div>');this.location_list_wrapper.css("display","none");this.location_list=jQuery('<ul id="location_list"></ul>');this.country_trigger=jQuery('<h4 id="country_trigger"></h4>');var obj_span=jQuery('<span style="display:block">Shell.com</span>');this.country_trigger.append(obj_span);this.location_fieldset.prepend(this.country_trigger);for(var i=0;i<this.location_options.length;i++){var obj_li=jQuery('<li id="location_'+i+'"></li>');obj_li.append(this.location_options[i].innerHTML);obj_li.bind("click",this,this.select_country);obj_li.bind("mouseover",this,function(e){jQuery(e.target).addClass("hover")});obj_li.bind("mouseout",this,function(e){jQuery(e.target).removeClass("hover")});this.location_list.append(obj_li)}this.location_list_wrapper.append(this.location_list);this.location_form.append(this.location_list_wrapper);this.location_select.css("display","none");this.country_trigger.bind("click",this,this.animate_country_options);jQuery("body:first").bind("mousedown",this,this.click_window)},animate_country_options:function(e){if(e.data.displayed_animated_list){e.data.close_country_options()}else{e.data.open_country_options()}},open_country_options:function(){this.location_list_wrapper.slideDown("3000");this.displayed_animated_list=true;jQuery(document).find("body:first").bind("mousedown",this,this.click_window)},close_country_options:function(){this.location_list_wrapper.slideUp("3000");this.displayed_animated_list=false;jQuery(document).find("body").unbind("mousedown",this.click_window)},select_country:function(e){var option_index=e.target.id.substring(9).toInt();if(option_index>=0){e.data.location_select.selectedIndex=option_index;var new_option_text=jQuery(e.data.location_options[option_index]).text();e.data.country_trigger.find("span").text(new_option_text)}e.data.animate_country_options(e)},click_window:function(e){var in_list=false;try{if(jQuery(e.target).parents("#location").length>0){in_list=true}}catch(error){}if(!in_list){if(e.data.displayed_animated_list){e.data.animate_country_options(e)}}}};shell.TabModule={initialize:function(jquery_obj){this.wrapper=jquery_obj;this.tabList=this.wrapper.find("UL:first");this.tabs=this.tabList.children();this.tabHeaders=this.tabList.find("H2");this.tabAnchors=this.tabHeaders.find("A");this.tabContentWrappers=this.tabList.find("DIV.tab");this.selected_tab_index=1;if(top.location.href.indexOf("#showtab")!=-1){var tab_id=top.location.href.split("#showtab");this.selected_tab_index=(this.tabAnchors.length>=tab_id[1])?tab_id[1]:this.selected_tab_index}this.decorate(this.selected_tab_index)},decorate:function(selected_tab_index){this.tabList.addClass("tab_module");for(var i=0;i<this.tabAnchors.length;i++){var anchor=jQuery(this.tabAnchors[i]);anchor.bind("mouseover",this,this.highlightTab);anchor.bind("mouseout",this,this.lowlightTab);anchor.bind("click",this,this.setSelectedTabIndex)}this.initTabHeights();this.displayTabContent(this.selected_tab_index);this.tabHeaders.each(function(index,item){jQuery(item).addClass("tab_header_"+(index+1))})},initTabHeights:function(){var tab_depth=0;var offset=29;this.tabHeaders.each(function(index,item){tab_depth=Math.max(tab_depth,parseInt(jQuery(item).outerHeight()))});this.tabAnchors.each(function(index,item){jQuery(item).css("height",(tab_depth)+"px")});this.wrapper.css("padding-top",(tab_depth+offset)+"px")},setSelectedTabIndex:function(e){var href=e.target.href;e.data.selected_tab_index=href.charAt(href.length-1);e.data.displayTabContent(e.data.selected_tab_index);e.preventDefault()},displayTabContent:function(index){for(var i=0;i<this.tabAnchors.length;i++){if(index-1!=i){jQuery(this.tabs[i]).removeClass("selected");jQuery(this.tabAnchors[i]).removeClass("selected")}else{jQuery(this.tabs[i]).addClass("selected");jQuery(this.tabAnchors[i]).addClass("selected")}}},highlightTab:function(e){jQuery(e.target).addClass("active").parents("li:first").addClass("active")},lowlightTab:function(e){jQuery(e.target).removeClass("active").parents("li:first").removeClass("active")}};shell.SearchModule={initialize:function(jquery_obj){this.form=jquery_obj;this.search_button=this.form.find("input[type=image]");this.search_input=this.form.find("input[type=text]");this.search_initial_value=this.search_input.val();this.decorate()},decorate:function(){this.search_input.bind("focus",this,this.clear_input_search_text);this.search_button.bind("click",this,this.check_search_input);this.search_input.bind("keydown",this,this.check_keystroke_input);this.search_input.bind("blur",this,this.reset_input_search_text)},check_search_input:function(e){var value=jQuery(e.target).parents("form").find("input:text").val();if(value==""||value==e.data.search_initial_value){e.preventDefault()}},check_keystroke_input:function(e){if(e.keyCode==13){e.data.check_search_input(e)}},clear_input_search_text:function(e){if(e.target.value==e.data.search_initial_value){e.target.value=""}},reset_input_search_text:function(e){if(e.target.value==""){e.target.value=e.data.search_initial_value}}};shell.SearchNewsModule={initialize:function(jquery_obj){this.wrapper=jquery_obj;this.initial_search_value=shell.search_news_default_text;this.decorate()},decorate:function(){this.wrapper.find("input.submit:first").css("display","none");jQuery("#search_news_term").bind("focus",this,function(e){if(e.target.value==e.data.initial_search_value){e.target.value=""}});jQuery("#search_news_term").bind("blur",this,function(e){if(e.target.value==""){e.target.value=e.data.initial_search_value}});var fieldset=this.wrapper.find("fieldset:first");var input_form_submit_div=jQuery('<div class="livetext_button"></div>');var input_form_submit_a=jQuery('<a href="#"></a>');input_form_submit_a.bind("click",function(){jQuery("#search_news").submit();return false});var input_form_submit_strong=jQuery("<strong></strong>").text(shell.search_news_button_label);input_form_submit_a.append(input_form_submit_strong);input_form_submit_div.append(input_form_submit_a);fieldset.append(input_form_submit_div)}};shell.PageToolsModule={initialize:function(jquery_obj){this.wrapper=jquery_obj;this.bookmarks_container=this.wrapper.find("li.bookmark div:first");this.email_form=this.wrapper.find("#email_to_a_friend_form");this.decorate()},decorate:function(){this.bookmarks_container.css("display","none");this.wrapper.find("li.printer a:first").bind("click",this,this.print_page);this.wrapper.find("li.printer a:first").bind("keypress",this,this.print_page);this.wrapper.find("li.message a:first").bind("click",this,this.email_to_friend);this.wrapper.find("li.bookmark a:first").bind("click",this,this.toggle_bookmarks)},print_page:function(e){window.print();e.preventDefault()},toggle_bookmarks:function(e){e.data.bookmarks_container.toggle("slow");e.preventDefault()},email_to_friend:function(e){var popup=window.open("about:blank","emaff");if(popup&&popup.focus){popup.focus()}e.data.email_form.attr("target","emaff");e.data.email_form.submit();e.preventDefault()}};shell.AccordionModule={initialize:function(jquery_obj){this.container=jquery_obj;this.title=this.container.find(".title");this.toggled_elems=this.container.find(".toggle");this.default_selected_index=-1;for(var i=0;i<this.title.length;i++){if(jQuery(this.title[i]).hasClass("selected")){this.default_selected_index=i;break}}this.display_options={show:this.default_selected_index,opacity:false};this.decorate()},decorate:function(){if(this.title.length>1){for(var i=0;i<this.toggled_elems.length;i++){var title=jQuery(this.title[i]);var toggled=jQuery(this.toggled_elems[i]);if(i!=this.display_options.show){toggled.css({display:"none"});title.bind("click",this,this.showHideContent)}else{title.addClass("selected");toggled.addClass("expanded")}}}else{jQuery(this.title[0]).addClass("selected");jQuery(this.toggled_elems[0]).addClass("expanded");if(this.container.hasClass("accordion_non_its")){jQuery(this.title[0]).addClass("expanded_single")}}},showHideContent:function(e){var clicked_title=(jQuery(e.target).hasClass("title"))?jQuery(e.target):jQuery(e.target).parent(".title:first");var related_content=clicked_title.next();var titles=jQuery(e.target).parents(".module:first").find(".title");var toggled=jQuery(e.target).parents(".module:first").find(".toggle");for(var i=0;i<titles.length;i++){if(jQuery(titles[i]).hasClass("selected")){jQuery(titles[i]).bind("click",e.data,e.data.showHideContent);jQuery(titles[i]).removeClass("selected");jQuery(toggled[i]).removeClass("expanded");jQuery(toggled[i]).slideUp("500")}}clicked_title.addClass("selected");related_content.addClass("expanded");clicked_title.unbind("click",e.data.showHideContent);related_content.slideDown("500");e.preventDefault()}};shell.SectionOverviewModule={initialize:function(jquery_obj){this.wrapper=jquery_obj;this.forms=this.wrapper.find("form");if(this.forms.length>0){for(var i=0;i<this.forms.length;i++){this.decorate(jQuery(this.forms[i]))}}},decorate:function(form){var button=jQuery('<input type="image" src="'+shell.server_prefix+'images/global/go_button.gif">');form.find("input:first").replaceWith(button);form.css("display","block");form.bind("submit",function(){return false});button.bind("click",this,this.changeURL);button.bind("keypress",this,this.changeURL)},changeURL:function(e){var options=jQuery(e.target).parents("form:first").find("option");for(var i=0;i<options.length;i++){if(options[i].selected){top.location.href=options[i].value;break}}e.preventDefault()}};shell.FlashModule={initialize:function(jquery_obj){this.container=jquery_obj;this.config=null;for(var i=0;i<shell.flash_modules.length;i++){if(this.container.find("div:first").length>0&&this.container.find("div:first").id){if(shell.flash_modules[i].id==this.container.find("div:first").id){this.config=shell.flash_modules[i];break}}}this.initial_innerHTML=this.container.innerHTML;if(swfobject&&swfobject.getFlashPlayerVersion().major==shell.gFpVersion){return}else{if(this.config!=null&&this.config.video_file!=""){this.display_html5_video(this.container);jQuery(document).load(this.check_html5_video)}}},display_html5_video:function(mootools_elem){mootools_elem.innerHTML="";var video_elem=jQuery('<video width="'+this.config.width+'" height="'+this.config.height+'" controls="controls" preload="none"></video>');var source_elem=jQuery("<source src="+this.config.video_file+'"></source>');video_elem.append(source_elem);mootools_elem.append(video_elem)},check_html5_video:function(e){var video=e.data.container.find("video:first");if(video){if(typeof video.play==="undefined"||(video.error&&video.error.code&&video.error.code>0)){if(video&&typeof video.pause==="function"){video.pause()}this.reset_html()}}},reset_html:function(){this.container.innerHTML=this.initial_innerHTML}};shell.ie_fix_for_flash_and_text_with_options=function(jquery_obj){var flash=jquery_obj.find(".flash"),flash_obj=null;for(var i=0;i<flash.length;i++){flash[i]=jQuery(flash[i]);if(flash[i].hasClass("right")){if(flash[i].find("object:first").length>0){flash_obj=flash[i].find("object:first");if(flash_obj.width){flash[i].css("width",flash_obj.width+"px")}}}}};shell.ie_fix_for_flash_and_impulse_pane=function(jquery_obj){var impulse_pane=jQuery("#impulse_pane"),clearing_div;if(impulse_pane.length>0){clearing_div=impulse_pane.find("div.clearfix:first-child");if(clearing_div.length==0){clearing_div=jQuery('<div class="clearfix" style="height:0.1em;"> </div>');impulse_pane.prepend(clearing_div)}}};jQuery(document).ready(function(){var modules=jQuery(".module");if(location.href.indexOf("/home/page/")!=-1){if(top.frames&&top.frames.length>0){for(var i=0;i<top.frames.length;i++){if(top.frames[i].name&&top.frames[i].name=="top_bar"){shell.is_application_frameset=true;break}}}}modules.each(function(index,item){var module=jQuery(item);if(module.hasClass("accordion")){shell.AccordionModule.initialize(module);return}if(module.hasClass("country_selector")){shell.CountrySelectorModule.initialize(module);return}if(module.hasClass("flash")){shell.FlashModule.initialize(module);if(jQuery.browser.msie){shell.ie_fix_for_flash_and_impulse_pane(module)}return}if(module.hasClass("rss_wrapper")){shell.NewsModule.initialize(module);return}if(module.hasClass("search")){shell.SearchModule.initialize(module);return}if(module.hasClass("search_news")){shell.SearchNewsModule.initialize(module);return}if(module.hasClass("page_tools")){shell.PageToolsModule.initialize(module);return}if(module.hasClass("tabbed")){shell.TabModule.initialize(module);return}if(module.hasClass("section_overview")){shell.SectionOverviewModule.initialize(module);return}if(module.hasClass("text_with_options")){if(jQuery.browser.msie){shell.ie_fix_for_flash_and_text_with_options(module);shell.ie_fix_for_flash_and_impulse_pane(module)}return}});if(shell.is_application_frameset){shell.update_link_targets(jQuery("#content"));shell.update_link_targets(jQuery(".navigation:first"));shell.update_link_targets(jQuery(".shell_logo:first"));shell.update_link_targets(jQuery("#country_switch"));shell.update_link_targets(jQuery("#header"));shell.update_target(jQuery("form.search:first"))}});jQuery(window).load(function(){shell.xhtml_doctype_fix();if(shell.is_application_frameset){var frame_rows=top.document.getElementById("frame_rows");var frame_rows_frames=(frame_rows.children)?frame_rows.children:frame_rows.ChildNodes;for(var i=0;i<frame_rows_frames.length;i++){if(frame_rows_frames[i].name&&frame_rows_frames[i].name=="content"){frame_rows.rows="50,"+(top.frames.breadcrumbs.jQuery("#content").height()+20)+","+(top.frames.heading.jQuery("#content").height()+20)+", *";break}}}});shell.appObj=function(oNew,oDef){var oTemp={},propertyName;for(propertyName in oDef){if(!(oDef[propertyName] instanceof Function)){oTemp[propertyName]=oDef[propertyName]}}for(propertyName in oNew){if(!(oNew[propertyName] instanceof Function)){oTemp[propertyName]=oNew[propertyName]}}return oTemp};function flash_transition(objJSON){if(!window.location.href.match(/\.content\.shell\.com/)){if(objJSON.onclick!=""&&objJSON.onclick!="null"){eval(objJSON.onclick)}}if(objJSON.href!=""){if(objJSON.target=="_blank"){window.open(objJSON.href)}else{window.location.href=objJSON.href}}};
