
var globalDestDropItems;var globalDoAutoComplete;var globalMinDropdownChars=2;var IE5Mac=identifyIE5Mac();addLoadListener(initAutoComplete);function initAutoComplete()
{var destination=document.getElementById("destination");destination.setAttribute("autocomplete","off");attachEventListener(destination,"keydown",keydownAutoComplete,false);attachEventListener(destination,"blur",blurAutoComplete,false);return true;};function keydownAutoComplete(event)
{if(typeof event=="undefined")
{event=window.event;}
switch(event.keyCode)
{case 9:case 13:case 16:case 17:case 18:case 20:case 27:case 33:case 34:case 35:case 36:case 37:case 39:break;case 38:var target=this;var autoCompleteDropdown=document.getElementById("autoCompleteDropdown");if(autoCompleteDropdown!=null)
{var childLis=autoCompleteDropdown.childNodes;var selected=false;for(var i=0;i<childLis.length;i++)
{if(childLis[i].className=="hover")
{selected=true;if(i>0)
{childLis[i].className="";childLis[i-1].className="hover";target.value=childLis[i-1].firstChild.nodeValue;}
break;}}
if(!selected)
{childLis[0].className="hover";target.value=childLis[0].firstChild.nodeValue;}}
stopDefaultAction(event);break;case 40:var target=this;var autoCompleteDropdown=document.getElementById("autoCompleteDropdown");if(autoCompleteDropdown!=null)
{var childLis=autoCompleteDropdown.childNodes;var selected=false;for(var i=0;i<childLis.length;i++)
{if(childLis[i].className=="hover")
{selected=true;if(i<childLis.length-1)
{childLis[i].className="";childLis[i+1].className="hover";target.value=childLis[i+1].firstChild.nodeValue;}
break;}}
if(!selected)
{childLis[0].className="hover";target.value=childLis[0].firstChild.nodeValue;}}
stopDefaultAction(event);break;case 8:case 46:if(typeof autoCompleteTimer!="undefined")
{clearTimeout(autoCompleteTimer);}
autoCompleteTimer=setTimeout("generateDropdown(false)",300);break;default:if(typeof autoCompleteTimer!="undefined")
{clearTimeout(autoCompleteTimer);}
var target=this;var inputRanges="false";if(typeof target.createTextRange!="undefined"||typeof target.setSelectionRange!="undefined")
{inputRanges="true";}
autoCompleteTimer=setTimeout("generateDropdown("+inputRanges+")",300);}
return true;};function destinationJump(worldguideUrl){var input=document.getElementById("destination");var foundItem=null;if(typeof globalDestDropItems!="undefined"){for(var i=0;i<globalDestDropItems.length;i++){if(getDestDisplayText(globalDestDropItems[i])==input.value){foundItem=globalDestDropItems[i];}}}
if(foundItem!=null){window.location.href=worldguideUrl+'/destinationRedirect.do?cobjid='+foundItem.ethylCobjId;}else{window.location.href='destinationRedirect.do?partDestinationName='+input.value;}}
function getDestDisplayText(destination){var text=destination.nameSimplified;if(destination.parentNameSimplified!=null&&destination.parentNameSimplified!='')text+=', '+destination.parentNameSimplified;return text;}
var ajaxDestinationPopulateDropDown=function(data){var input=document.getElementById("destination");var newUl=document.createElement("ul");newUl.setAttribute("id","autoCompleteDropdown");newUl.autoCompleteInput=input;newUl.style.position="absolute";newUl.style.left=getPosition(input)[0]+"px";newUl.style.top=getPosition(input)[1]+input.offsetHeight-2+"px";newUl.style.width=input.offsetWidth-3+"px";for(var i=0;i<data.length;i++){var returnedData=getDestDisplayText(data[i]);var newLi=document.createElement("li");newLi.appendChild(document.createTextNode(returnedData));if(!IE5Mac){attachEventListener(newLi,"mouseover",mouseoverDropdown,false);attachEventListener(newLi,"mouseout",mouseoutDropdown,false);attachEventListener(newLi,"mousedown",mousedownDropdown,false);}
newUl.appendChild(newLi);}
globalDestDropItems=data;if(newUl.firstChild!=null)
{document.getElementsByTagName("body")[0].appendChild(newUl);}
var doAutoComplete=globalDoAutoComplete;if(typeof doAutoComplete!="undefined"&&doAutoComplete)
{autoComplete();}}
function generateDropdown(doAutoComplete)
{closeDropdown();var input=document.getElementById("destination");if(input.value.length>=globalMinDropdownChars)
{globalDoAutoComplete=doAutoComplete;DestinationManager.getCompleteDestinations(input.value,ajaxDestinationPopulateDropDown);}
return true;};function autoComplete()
{var input=document.getElementById("destination");var inputCobjid=document.getElementById("cobjid");var cursorMidway=false;if(typeof document.selection!="undefined")
{var range=document.selection.createRange();if(range.move("character",1)!=0)
{cursorMidway=true;}}
else if(typeof input.selectionStart!="undefined"&&input.selectionStart<input.value.length)
{cursorMidway=true;}
var originalValue=input.value;var autoCompleteDropdown=document.getElementById("autoCompleteDropdown");if(autoCompleteDropdown!=null&&!cursorMidway)
{autoCompleteDropdown.firstChild.className="hover";input.value=autoCompleteDropdown.firstChild.firstChild.nodeValue;if(typeof input.createTextRange!="undefined")
{var range=input.createTextRange();range.moveStart("character",originalValue.length);range.select();}
else if(typeof input.setSelectionRange!="undefined")
{input.setSelectionRange(originalValue.length,input.value.length);}
if(autoCompleteDropdown.childNodes.length==1)
{setTimeout("closeDropdown();",10);}}
return true;};function mouseoverDropdown(event)
{if(typeof event=="undefined")
{event=window.event;}
var target=this;var childLis=target.parentNode.childNodes;for(var i=0;i<childLis.length;i++)
{childLis[i].className="";}
target.className="hover";return true;};function mouseoutDropdown(event)
{if(typeof event=="undefined")
{event=window.event;}
target=this;target.className="";return true;};function mousedownDropdown(event)
{if(typeof event=="undefined")
{event=window.event;}
var target=this;target.parentNode.autoCompleteInput.value=target.firstChild.nodeValue;closeDropdown();return true;};function blurAutoComplete()
{if(typeof autoCompleteTimer!="undefined")
{clearTimeout(autoCompleteTimer);}
closeDropdown();return true;};function closeDropdown()
{var autoCompleteDropdown=document.getElementById("autoCompleteDropdown");if(autoCompleteDropdown!=null)
{autoCompleteDropdown.parentNode.removeChild(autoCompleteDropdown);}
return true;};function addLoadListener(fn)
{if(typeof window.addEventListener!='undefined')
{window.addEventListener('load',fn,false);}
else if(typeof document.addEventListener!='undefined')
{document.addEventListener('load',fn,false);}
else if(typeof window.attachEvent!='undefined')
{window.attachEvent('onload',fn);}
else
{var oldfn=window.onload;if(typeof window.onload!='function')
{window.onload=fn;}
else
{window.onload=function()
{oldfn();fn();};}}};function attachEventListener(target,eventType,functionRef,capture)
{if(typeof target.addEventListener!="undefined")
{target.addEventListener(eventType,functionRef,capture);}
else if(typeof target.attachEvent!="undefined")
{var functionString=eventType+functionRef;target["e"+functionString]=functionRef;target[functionString]=function(event)
{if(typeof event=="undefined")
{event=window.event};target["e"+functionString](event);};target.attachEvent("on"+eventType,target[functionString]);}
else
{eventType="on"+eventType;if(typeof target[eventType]=="function")
{var oldListener=target[eventType];target[eventType]=function()
{oldListener();return functionRef();}}
else
{target[eventType]=functionRef;}}
return true;};function stopDefaultAction(event)
{event.returnValue=false;if(typeof event.preventDefault!="undefined")
{event.preventDefault();}
return true;};function getPosition(theElement)
{var positionX=0;var positionY=0;while(theElement!=null)
{positionX+=theElement.offsetLeft;positionY+=theElement.offsetTop;theElement=theElement.offsetParent;}
return[positionX,positionY];};function identifyIE5Mac()
{var agent=navigator.userAgent.toLowerCase();if(navigator.vendor!="KDE"&&typeof window.opera=="undefined"&&typeof document.all!="undefined")
{if(typeof document.getElementById!="undefined")
{if(typeof document.uniqueID=="undefined")
{return true;}}}
return false;};if(typeof deconcept=="undefined"){var deconcept=new Object();}
if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){if(!document.getElementById){return;}
this.DETECT_KEY=_b?_b:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}
if(id){this.setAttribute("id",id);}
if(w){this.setAttribute("width",w);}
if(h){this.setAttribute("height",h);}
if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(c){this.addParam("bgcolor",c);}
var q=_8?_8:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",_7);this.setAttribute("doExpressInstall",false);var _d=(_9)?_9:window.location;this.setAttribute("xiRedirectUrl",_d);this.setAttribute("redirectUrl","");if(_a){this.setAttribute("redirectUrl",_a);}};deconcept.SWFObject.prototype={setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16.push(key+"="+_18[key]);}
return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");}
_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}
var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}
return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}
if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}
return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}
catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}
catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}
catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}
return _23;};deconcept.PlayerVersion=function(_27){this.major=_27[0]!=null?parseInt(_27[0]):0;this.minor=_27[1]!=null?parseInt(_27[1]):0;this.rev=_27[2]!=null?parseInt(_27[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}
if(this.major>fv.major){return true;}
if(this.minor<fv.minor){return false;}
if(this.minor>fv.minor){return true;}
if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_29){var q=document.location.search||document.location.hash;if(q){var _2b=q.substring(1).split("&");for(var i=0;i<_2b.length;i++){if(_2b[i].substring(0,_2b[i].indexOf("="))==_29){return _2b[i].substring((_2b[i].indexOf("=")+1));}}}
return"";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){if(window.opera||!document.all){return;}
var _2d=document.getElementsByTagName("OBJECT");for(var i=0;i<_2d.length;i++){_2d[i].style.display="none";for(var x in _2d[i]){if(typeof _2d[i][x]=="function"){_2d[i][x]=function(){};}}}};deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};if(typeof window.onunload=="function"){var _30=window.onunload;window.onunload=function(){deconcept.SWFObjectUtil.cleanupSWFs();_30();};}else{window.onunload=deconcept.SWFObjectUtil.cleanupSWFs;}};if(typeof window.onbeforeunload=="function"){var oldBeforeUnload=window.onbeforeunload;window.onbeforeunload=function(){deconcept.SWFObjectUtil.prepUnload();oldBeforeUnload();};}else{window.onbeforeunload=deconcept.SWFObjectUtil.prepUnload;}
if(Array.prototype.push==null){Array.prototype.push=function(_31){this[this.length]=_31;return this.length;};}
var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;function addLoadListener(fn)
{if(typeof window.addEventListener!='undefined')
{window.addEventListener('load',fn,false);}
else if(typeof document.addEventListener!='undefined')
{document.addEventListener('load',fn,false);}
else if(typeof window.attachEvent!='undefined')
{window.attachEvent('onload',fn);}
else
{return false;}
return true;};function attachEventListener(target,eventType,functionRef,capture)
{if(typeof target.addEventListener!="undefined")
{target.addEventListener(eventType,functionRef,capture);}
else if(typeof target.attachEvent!="undefined")
{var functionString=eventType+functionRef;target["e"+functionString]=functionRef;target[functionString]=function(event)
{if(typeof event=="undefined")
{event=window.event};target["e"+functionString](event);};target.attachEvent("on"+eventType,target[functionString]);}
else
{eventType="on"+eventType;if(typeof target[eventType]=="function")
{var oldListener=target[eventType];target[eventType]=function()
{oldListener();return functionRef();}}
else
{target[eventType]=functionRef;}}
return true;};function createAjaxObj(){var httprequest=false
if(window.XMLHttpRequest){httprequest=new XMLHttpRequest()
if(httprequest.overrideMimeType)
httprequest.overrideMimeType('text/xml')}
else if(window.ActiveXObject){try{httprequest=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e){try{httprequest=new ActiveXObject("Microsoft.XMLHTTP");}
catch(e){}}}
return httprequest}
function ajax_ticker(xmlfile,divId,divClass,delay,fadeornot){this.xmlfile=xmlfile
this.tickerid=divId
this.delay=delay
this.mouseoverBol=0
this.pointer=0
this.opacitystring=(typeof fadeornot!="undefined")?"width: 100%; filter:progid:DXImageTransform.Microsoft.alpha(opacity=100); -moz-opacity: 1":""
if(this.opacitystring!="")this.delay+=500
this.opacitysetting=0.2
this.messages=[]
this.ajaxobj=createAjaxObj()
document.write('<div id="'+divId+'" class="'+divClass+'"><div style="'+this.opacitystring+'">Initializing ticker...</div></div>')
this.getXMLfile()}
ajax_ticker.prototype.getXMLfile=function(){if(this.ajaxobj){var instanceOfTicker=this
var url=this.xmlfile+"?bustcache="+new Date().getTime()
this.ajaxobj.onreadystatechange=function(){instanceOfTicker.initialize()}
this.ajaxobj.open('GET',url,true)
this.ajaxobj.send(null)}}
ajax_ticker.prototype.initialize=function(){if(this.ajaxobj.readyState==4){if(this.ajaxobj.status==200||window.location.href.indexOf("http")==-1){this.contentdiv=document.getElementById(this.tickerid).firstChild
var xmldata=this.ajaxobj.responseText
this.contentdiv.style.display="none"
this.contentdiv.innerHTML=xmldata
if(this.contentdiv.getElementsByTagName("div").length==0){this.contentdiv.innerHTML="<b>Error</b> fetching remote ticker file!"
return}
var instanceOfTicker=this
document.getElementById(this.tickerid).onmouseover=function(){instanceOfTicker.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){instanceOfTicker.mouseoverBol=0}
if(window.attachEvent)
window.attachEvent("onunload",function(){instanceOfTicker.contentdiv=instanceOfTicker.ajaxobj=null})
for(var i=0;i<this.contentdiv.getElementsByTagName("div").length;i++){if(this.contentdiv.getElementsByTagName("div")[i].className=="message")
this.messages[this.messages.length]=this.contentdiv.getElementsByTagName("div")[i].innerHTML}
this.contentdiv.innerHTML=""
this.contentdiv.style.display="block"
this.rotatemsg()}}}
ajax_ticker.prototype.rotatemsg=function(){var instanceOfTicker=this
if(this.mouseoverBol==1)
setTimeout(function(){instanceOfTicker.rotatemsg()},100)
else{this.fadetransition("reset")
this.contentdiv.innerHTML=this.messages[this.pointer]
this.fadetimer1=setInterval(function(){instanceOfTicker.fadetransition('up','fadetimer1')},100)
this.pointer=(this.pointer<this.messages.length-1)?this.pointer+1:0
setTimeout(function(){instanceOfTicker.rotatemsg()},this.delay)}}
ajax_ticker.prototype.fadetransition=function(fadetype,timerid){var contentdiv=this.contentdiv
if(fadetype=="reset")
this.opacitysetting=0.2
if(contentdiv.filters&&contentdiv.filters[0]){if(typeof contentdiv.filters[0].opacity=="number")
contentdiv.filters[0].opacity=this.opacitysetting*100
else
contentdiv.style.filter="alpha(opacity="+this.opacitysetting*100+")"}
else if(typeof contentdiv.style.MozOpacity!="undefined"&&this.opacitystring!=""){contentdiv.style.MozOpacity=this.opacitysetting}
else
this.opacitysetting=1
if(fadetype=="up")
this.opacitysetting+=0.1
if(fadetype=="up"&&this.opacitysetting>=1)
clearInterval(this[timerid])}
function pausescroller(content,divId,divClass,delay){this.content=content
this.tickerid=divId
this.delay=delay
this.mouseoverBol=0
this.hiddendivpointer=1
document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[1]+'</div></div>')
var scrollerinstance=this
if(window.addEventListener)
window.addEventListener("load",function(){scrollerinstance.initialize()},false)
else if(window.attachEvent)
window.attachEvent("onload",function(){scrollerinstance.initialize()})
else if(document.getElementById)
setTimeout(function(){scrollerinstance.initialize()},500)}
pausescroller.prototype.initialize=function(){this.tickerdiv=document.getElementById(this.tickerid)
this.visiblediv=document.getElementById(this.tickerid+"1")
this.hiddendiv=document.getElementById(this.tickerid+"2")
this.visibledivtop=parseInt(pausescroller.getCSSpadding(this.tickerdiv))
this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivtop*2)+"px"
this.getinline(this.visiblediv,this.hiddendiv)
this.hiddendiv.style.visibility="visible"
var scrollerinstance=this
document.getElementById(this.tickerid).onmouseover=function(){scrollerinstance.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){scrollerinstance.mouseoverBol=0}
if(window.attachEvent)
window.attachEvent("onunload",function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null})
setTimeout(function(){scrollerinstance.animateup()},this.delay)}
pausescroller.prototype.animateup=function(){var scrollerinstance=this
if(parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5)){this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-5+"px"
this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-5+"px"
setTimeout(function(){scrollerinstance.animateup()},50)}
else{this.getinline(this.hiddendiv,this.visiblediv)
this.swapdivs()
setTimeout(function(){scrollerinstance.setmessage()},this.delay)}}
pausescroller.prototype.swapdivs=function(){var tempcontainer=this.visiblediv
this.visiblediv=this.hiddendiv
this.hiddendiv=tempcontainer}
pausescroller.prototype.getinline=function(div1,div2){div1.style.top=this.visibledivtop+"px"
div2.style.top=Math.max(div1.parentNode.offsetHeight,div1.offsetHeight)+"px"}
pausescroller.prototype.setmessage=function(){var scrollerinstance=this
if(this.mouseoverBol==1)
setTimeout(function(){scrollerinstance.setmessage()},100)
else{var i=this.hiddendivpointer
var ceiling=this.content.length
this.hiddendivpointer=(i+1>ceiling-1)?0:i+1
this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
this.animateup()}}
pausescroller.getCSSpadding=function(tickerobj){if(tickerobj.currentStyle)
return tickerobj.currentStyle["paddingTop"]
else if(window.getComputedStyle)
return window.getComputedStyle(tickerobj,"").getPropertyValue("padding-top")
else
return 0}