var animation_duration=250;var animate_height=0;var toggle_show=new Object();function initialize_country_animation(o,f){if(is_ie){var n=get_element("location_dropdown");
var e=215;var m=0;var c=39;var p=57;var k=get_element("location_dropdown").getElementsByTagName("OPTION");var d=document.createElement("UL");
var g;var b;var j;var a;d.id="location_options";b=document.createElement("H4");b.id="country_trigger";j=document.createElement("SPAN");
j.style.display="block";j.appendChild(document.createTextNode("Shell.com"));b.appendChild(j);a=get_element("location").getElementsByTagName("fieldset")[0];
a.insertBefore(b,a.getElementsByTagName("input")[0]);for(var h=0;h<=k.length-1;h++){g=document.createElement("LI");g.innerHTML=k[h].innerHTML;
g.index_number=h;g.onclick=function(){animate_country_options("hide",this.index_number)};d.appendChild(g)}get_element("location").appendChild(d);
while((n.parentNode!="location")&&(n.offsetTop!=undefined)){m+=parseInt(n.offsetTop);n=n.parentNode}var l=parseInt(get_element("location_options").offsetHeight);
if(!o&&f){get_element("location_options").style.width="168px"}get_element("location_options").style.position="absolute";get_element("location_options").style.height="0px";
get_element("location_options").style.top="43px";get_element("location_dropdown").style.display="none";if(l>e){animate_height=e
}else{animate_height=l}get_element("country_trigger").onclick=function(){animate_country_options("open",-1);show_hide_object("location_options",this)
};if($E("input","location")){$E("input","location").addClass("active")}}else{return false}}function animate_country_options(e,c){var a=new Chain();
switch(e){case"open":var k=function(){get_element("location_options").style.border="solid 1px #000";get_element("location_options").style.padding="3px";
get_element("country_trigger").onclick=function(){animate_country_options("hide",-1)};var i=new Fx.Style($("location_options"),"height",{duration:animation_duration});
i.start(animate_height)};var j=function(){get_element("location_options").style.overflowY="auto"};a.chain(k);a.chain(j);a.callChain();
a.callChain.delay(1,a);var f=get_element("location_options").getElementsByTagName("LI");for(var d=0;d<=f.length-1;d++){f[d].onmouseover=function(){this.className="hover"
};f[d].onmouseout=function(){this.className=""}}break;case"hide":if(c>=0){get_element("location_dropdown").selectedIndex=c;
var h=get_element("location_dropdown").getElementsByTagName("OPTION")[c].innerHTML;var b=get_element("location_dropdown").getElementsByTagName("OPTION")[c].value
}var a=new Chain();var k=function(){get_element("country_trigger").onclick=function(){animate_country_options("open",-1);
show_hide_object("location_options",this)};if(c>=0){get_element("country_trigger").getElementsByTagName("SPAN")[0].innerHTML=h
}get_element("location_options").style.paddingBottom="0px";get_element("location_options").style.paddingTop="0px"};var j=function(){var i=new Fx.Style($("location_options"),"height",{duration:animation_duration});
i.start(0)};var g=function(){get_element("location_options").style.border="none"};a.chain(k);a.chain(j);a.chain(g);a.callChain();
a.callChain.delay(1,a);a.callChain.delay(animation_duration,a);break}}function show_hide_object(b,a){toggle_show.target=get_element(b);
toggle_show.source=a;if(toggle_show.target.style.height=="0px"){$(document).addEvent("mouseup",hide_current_object)}else{$(document).removeEvent("mouseup",hide_current_object)
}}function hide_current_object(b){var a=b.target?b.target:b.srcElement;if(a!=toggle_show.source){animate_country_options("hide",-1);
toggle_show.target=null;$(document).removeEvent("mouseup",hide_current_object)}};
