
var Class={create:function(){return function(){this.initialize.apply(this,arguments);}}}
Object.extend=function(destination,source){for(property in source)destination[property]=source[property];return destination;}
Function.prototype.bind=function(object){var __method=this;return function(){return __method.apply(object,arguments);}}
Function.prototype.bindAsEventListener=function(object){var __method=this;return function(event){__method.call(object,event||window.event);}}
function $(){if(arguments.length==1)return get$(arguments[0]);var elements=[];$c(arguments).each(function(el){elements.push(get$(el));});return elements;function get$(el){if(typeof el=='string')el=document.getElementById(el);return el;}}
if(!window.Element)var Element=new Object();Object.extend(Element,{remove:function(element){element=$(element);element.parentNode.removeChild(element);},hasClassName:function(element,className){element=$(element);if(!element)return;var hasClass=false;element.className.split(' ').each(function(cn){if(cn==className)hasClass=true;});return hasClass;},addClassName:function(element,className){element=$(element);Element.removeClassName(element,className);element.className+=' '+className;},removeClassName:function(element,className){element=$(element);if(!element)return;var newClassName='';element.className.split(' ').each(function(cn,i){if(cn!=className){if(i>0)newClassName+=' ';newClassName+=cn;}});element.className=newClassName;},cleanWhitespace:function(element){element=$(element);$c(element.childNodes).each(function(node){if(node.nodeType==3&&!/\S/.test(node.nodeValue))Element.remove(node);});},find:function(element,what){element=$(element)[what];while(element.nodeType!=1)element=element[what];return element;}});var Position={cumulativeOffset:function(element){var valueT=0,valueL=0;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;element=element.offsetParent;}while(element);return[valueL,valueT];}};document.getElementsByClassName=function(className){var children=document.getElementsByTagName('*')||document.all;var elements=[];$c(children).each(function(child){if(Element.hasClassName(child,className))elements.push(child);});return elements;}
Array.prototype.iterate=function(func){for(var i=0;i<this.length;i++)func(this[i],i);}
if(!Array.prototype.each)Array.prototype.each=Array.prototype.iterate;function $c(array){var nArray=[];for(var i=0;i<array.length;i++)nArray.push(array[i]);return nArray;}
var fx=new Object();fx.Base=function(){};fx.Base.prototype={setOptions:function(options){this.options={duration:300,onComplete:'',transition:fx.sinoidal}
Object.extend(this.options,options||{});},step:function(){var time=(new Date).getTime();if(time>=this.options.duration+this.startTime){this.now=this.to;clearInterval(this.timer);this.timer=null;if(this.options.onComplete)setTimeout(this.options.onComplete.bind(this),10);}
else{var Tpos=(time-this.startTime)/(this.options.duration);this.now=this.options.transition(Tpos)*(this.to-this.from)+this.from;}
this.increase();},custom:function(from,to){if(this.timer!=null)return;this.from=from;this.to=to;this.startTime=(new Date).getTime();this.timer=setInterval(this.step.bind(this),13);},invisible:function(){this.now=0;this.increase();},show:function(){if(this.now==0)
this.custom(0,1)},hide:function(){if(this.now==1)
this.custom(1,0)},showElement:function(e)
{this.setElement(e);this.show();},hideElement:function(e)
{this.setElement(e);this.hide();},setElement:function(e){this.el=$(e);},clearTimer:function(){clearInterval(this.timer);this.timer=null;}}
fx.Layout=Class.create();fx.Layout.prototype=Object.extend(new fx.Base(),{initialize:function(el,options){this.el=$(el);this.el.style.overflow="hidden";this.iniWidth=this.el.offsetWidth;this.iniHeight=this.el.offsetHeight;this.setOptions(options);}});fx.Height=Class.create();Object.extend(Object.extend(fx.Height.prototype,fx.Layout.prototype),{increase:function(){this.el.style.height=this.now+"px";},toggle:function(){if(this.el.offsetHeight>0)this.custom(this.el.offsetHeight,0);else this.custom(0,this.el.scrollHeight);}});fx.Width=Class.create();Object.extend(Object.extend(fx.Width.prototype,fx.Layout.prototype),{increase:function(){this.el.style.width=this.now+"px";},toggle:function(){if(this.el.offsetWidth>0)this.custom(this.el.offsetWidth,0);else this.custom(0,this.iniWidth);}});fx.Opacity=Class.create();fx.Opacity.prototype=Object.extend(new fx.Base(),{initialize:function(el,options){this.el=$(el);this.now=1;this.increase();this.setOptions(options);},increase:function(){if(this.now==1&&(/Firefox/.test(navigator.userAgent)))this.now=0.9999;this.setOpacity(this.now);},setOpacity:function(opacity){if(opacity==0&&this.el.style.visibility!="hidden")this.el.style.visibility="hidden";else if(this.el.style.visibility!="visible")this.el.style.visibility="visible";if(window.ActiveXObject)this.el.style.filter="alpha(opacity="+opacity*100+")";this.el.style.opacity=opacity;},toggle:function(){if(this.now>0)this.custom(1,0);else this.custom(0,1);}});fx.sinoidal=function(pos){return((-Math.cos(pos*Math.PI)/2)+0.5);}
fx.linear=function(pos){return pos;}
fx.cubic=function(pos){return Math.pow(pos,3);}
fx.circ=function(pos){return Math.sqrt(pos);}
var treeSelected=null;var imgPlus=new Image();imgPlus.src="/i/tnp.gif";var imgMinus=new Image();imgMinus.src="/i/tnm.gif";var imgDot=new Image();imgDot.src="/i/tnd.gif";function findNode(el)
{while(el!=null)
{if(el.className=="treeNode")
{break;}
else
{el=el.parentNode;}}
return el;}
function cA(el)
{expandNode(el.parentNode);selectNode(el.parentNode);el.blur();}
function selectNode(el)
{if(treeSelected!=null)
{setSubNodeClass(treeSelected,'A','tus');}
setSubNodeClass(el,'A','treeSelected');treeSelected=el;}
function setSubNodeClass(el,nodeName,className)
{var child;for(var i=0;i<el.childNodes.length;i++)
{child=el.childNodes[i];if(child.nodeName==nodeName)
{child.className=className;break;}}}
function eC(el)
{return expandCollapse(el);}
function expandCollapse(el)
{if(el==null)
return;var child;var imgEl;for(var i=0;i<el.childNodes.length;i++)
{child=el.childNodes[i];if(child.src)
{imgEl=child;}
else if(child.className=="tnsh")
{child.className="treeSubnodes";imgEl.src="/i/tnm.gif";break;}
else if(child.className=="treeSubnodes")
{child.className="tnsh";imgEl.src="/i/tnp.gif";break;}}}
function expandNode(el)
{var child;var imgEl;for(var i=0;i<el.childNodes.length;i++)
{child=el.childNodes[i];if(child.src)
{imgEl=child;}
if(child.className=="tnsh")
{child.className="treeSubnodes";imgEl.src="/i/tnm.gif";break;}}}
function collapseNode(el)
{var child;var imgEl;for(var i=0;i<el.childNodes.length;i++)
{child=el.childNodes[i];if(child.src)
{imgEl=child;}
if(child.className=="treeSubnodes")
{child.className="tnsh";imgEl.src="/i/tnp.gif";break;}}}
function syncTree(href)
{var loc=new String();loc=href;if(loc.substring(0,7)=='file://')
{loc='file:///'+loc.substring(7,loc.length);loc=loc.replace(/\\/g,'/');}
var base=loc.substr(0,loc.lastIndexOf('/')+1);var tocEl=findHref($('treeRoot'),loc,base);if(tocEl!=null)
{selectAndShowNode(tocEl);}}
function findHref(node,href,base)
{var el;var anchors=node.getElementsByTagName('A');for(var i=0;i<anchors.length;i++)
{el=anchors[i];var aref=new String();aref=el.getAttribute('href');if((aref.substring(0,7)!='http://')&&(aref.substring(0,8)!='https://')&&(aref.substring(0,7)!='file://'))
{aref=base+aref;}
if(aref==href)
{return el;}}
return null;}
function expandAll()
{var el;var anchors=document.getElementsByTagName('DIV');for(var i=0;i<anchors.length;i++)
{el=anchors[i];if(el.className=="treeNode")
{expandNode(el);}}
return null;}
function collapseAll()
{var el;var anchors=document.getElementsByTagName('DIV');for(var i=0;i<anchors.length;i++)
{el=anchors[i];if(el.className=="treeNode")
{collapseNode(el);}}
return null;}
function selectAndShowNode(node)
{var el=findNode(node);if(el!=null)
{selectNode(el);do
{expandNode(el);el=findNode(el.parentNode);}while((el!=null))
var windowTop;var windowBottom;var treeDiv=$('tree');var ua=window.navigator.userAgent.toLowerCase();if((i=ua.indexOf('msie'))!=-1)
{windowTop=node.offsetTop-treeDiv.scrollTop;windowBottom=treeDiv.clientHeight-windowTop-node.offsetHeight;}
else if(ua.indexOf('gecko')!=-1)
{windowTop=node.offsetTop-treeDiv.offsetTop-treeDiv.scrollTop;windowBottom=treeDiv.clientHeight-windowTop-node.offsetHeight;}
else
{return;}
if(windowTop<0)
{treeDiv.scrollTop+=windowTop-18;return;}
if(windowBottom<0)
{treeDiv.scrollTop-=windowBottom-18;return;}}}
function isBlank(val){if(val==null){return true;}for(var i=0;i<val.length;i++){if((val.charAt(i)!=' ')&&(val.charAt(i)!="\t")&&(val.charAt(i)!="\n")&&(val.charAt(i)!="\r")){return false;}}return true;}
function isInteger(val){if(isBlank(val)){return false;}for(var i=0;i<val.length;i++){if(!isDigit(val.charAt(i))){return false;}}return true;}
function isNumeric(sText)
{ValidChars='0123456789.,';IsNumber=true;for(i=0;i<sText.length&&IsNumber==true;i++)
{Char=sText.charAt(i);if(ValidChars.indexOf(Char)==-1)
{IsNumber=false;}}
return IsNumber;}
function isDigit(num){if(num.length>1){return false;}var string="1234567890";if(string.indexOf(num)!=-1){return true;}return false;}
function ToggleDisplay(TagId){if(document.getElementById&&$(TagId)!=null){var o=$(TagId);if(o.style.visibility=='hidden'){o.style.visibility='visible';o.style.display='block';}else{o.style.visibility='hidden';o.style.display='none';}}}
function setTitle(title){if(parent.frames.length!=0){try{this.parent.document.title=title;}catch(e){}}else{document.title=title;}}
d=document;l=d.layers;op=navigator.userAgent.indexOf('Opera')!=-1;px='px';function gE(e,f){if(l){f=(f)?f:self;var V=f.document.layers;if(V[e])return V[e];for(var W=0;W<V.length;)t=gE(e,V[W++]);return t;}if(d.all)return d.all[e];return $(e);}
function sE(e){l?e.visibility='show':e.style.visibility='visible';}
function hE(e){l?e.visibility='hide':e.style.visibility='hidden';}
function sX(e,x){l?e.left=x:op?e.style.pixelLeft=x:e.style.left=x+px;}
function sY(e,y){l?e.top=y:op?e.style.pixelTop=y:e.style.top=y+px;}
function sW(e,w){l?e.clip.width=w:op?e.style.pixelWidth=w:e.style.width=w+px;}
function sH(e,h){l?e.clip.height=h:op?e.style.pixelHeight=h:e.style.height=h+px;}
function wH(e,h){if(l){Y=e.document;Y.open();Y.write(h);Y.close();}if(e.innerHTML)e.innerHTML=h;}
function findPosX(obj){var curleft=0;if(obj.offsetParent){while(obj.offsetParent){curleft+=obj.offsetLeft;obj=obj.offsetParent;}}else if(obj.x){curleft+=obj.x;}return curleft;}
function findPosY(obj){var curtop=0;if(obj.offsetParent){while(obj.offsetParent){curtop+=obj.offsetTop;obj=obj.offsetParent;}}else if(obj.y){curtop+=obj.y;}return curtop;}
function ShowE(e){if(e){sE(e);e.style.display='block';};}
function HideE(e){if(e){hE(e);e.style.display='none';};}
function setCookie(c_name,value,expiredays)
{var exdate=new Date()
exdate.setDate(exdate.getDate()+expiredays)
document.cookie=c_name+"="+escape(value)+
((expiredays==null)?"":";domain=tracepartsonline.net;path=/;expires="+exdate.toGMTString())}
function setSessionCookie(c_name,value)
{document.cookie=c_name+"="+escape(value)+";domain=tracepartsonline.net;path=/;"}
function setServerCookie(value)
{}
function getCookie(name){var dc=document.cookie;var prefix=name+"=";var begin=dc.indexOf("; "+prefix);if(begin==-1){begin=dc.indexOf(prefix);if(begin!=0)return null;}else
begin+=2;var end=document.cookie.indexOf(";",begin);if(end==-1)
end=dc.length;return unescape(dc.substring(begin+prefix.length,end));}
var N_BASEZINDEX=0;var RE_PARAM=/^\s*(\w+)\s*\=\s*(.*)\s*$/;function f_putScreen(b_show){if(b_show==null&&!window.b_screenOn)
return;if(b_show==false){window.b_screenOn=false;if(e_screen)e_screen.style.display='none';return;}
if(window.e_screen==null){window.e_screen=document.createElement("div");e_screen.innerHTML="&nbsp;";document.body.appendChild(e_screen);e_screen.style.position='absolute';e_screen.id='eScreen';if(document.addEventListener){document.addEventListener('mousemove',f_dragProgress,false);window.addEventListener('resize',f_putScreen,false);window.addEventListener('scroll',f_putScreen,false);}
if(window.attachEvent){document.attachEvent('onmousemove',f_dragProgress);window.attachEvent('onresize',f_putScreen);window.attachEvent('onscroll',f_putScreen);}
else{document.onmousemove=f_dragProgress;window.onresize=f_putScreen;window.onscroll=f_putScreen;}}
var a_docSize=f_documentSize();e_screen.style.left=a_docSize[2]+'px';e_screen.style.top=a_docSize[3]+'px';e_screen.style.width=a_docSize[0]+'px';e_screen.style.height=a_docSize[1]+'px';e_screen.style.zIndex=N_BASEZINDEX+a_windows.length*2-1;e_screen.style.display='block';}
function f_documentSize(){var n_scrollX=0,n_scrollY=0;if(typeof(window.pageYOffset)=='number'){n_scrollX=window.pageXOffset;n_scrollY=window.pageYOffset;}
else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){n_scrollX=document.body.scrollLeft;n_scrollY=document.body.scrollTop;}
else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){n_scrollX=document.documentElement.scrollLeft;n_scrollY=document.documentElement.scrollTop;}
if(typeof(window.innerWidth)=='number')
return[window.innerWidth,window.innerHeight,n_scrollX,n_scrollY];if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight))
return[document.documentElement.clientWidth,document.documentElement.clientHeight,n_scrollX,n_scrollY];if(document.body&&(document.body.clientWidth||document.body.clientHeight))
return[document.body.clientWidth,document.body.clientHeight,n_scrollX,n_scrollY];return[0,0];}
function f_dialogOpen(s_url,s_title,s_features){if(!window.a_windows)
window.a_windows=[];var a_featuresStrings=s_features.split(',');var a_features=[];for(var i=0;i<a_featuresStrings.length;i++)
if(a_featuresStrings[i].match(RE_PARAM))
a_features[String(RegExp.$1).toLowerCase()]=RegExp.$2;var n_nesting=a_windows.length;var e_window=document.createElement("div");e_window.style.position='absolute';var n_width=a_features.width?parseInt(a_features.width):300;var n_height=a_features.height?parseInt(a_features.height):200;var a_docSize=f_documentSize();e_window.style.left=(a_features.left?parseInt(a_features.left):((a_docSize[0]-n_width)/2)+a_docSize[2])+'px';e_window.style.top=(a_features.top?parseInt(a_features.top):((a_docSize[1]-n_height)/3)+a_docSize[3])+'px';e_window.style.zIndex=N_BASEZINDEX+a_windows.length*2+2;e_window.innerHTML='<table border="1" cellspacing="0" class="'+
(a_features.css?a_features.css:'dialogWindow')+'"><tr><th class="title3" onmousedown="f_dragStart('+n_nesting+', event)" onmouseup="f_dragEnd()" onmousemove="f_dragProgress(event)" onselectstart="return false"><span style="float:left"">'+
(s_title?s_title:'Dialog Window')+'</span><img valign="top" src="/i/close.png" onclick="f_dialogClose();" onmousedown="return false;" style="float:right; margin: 0 0 0 0"></th></tr><tr><td><iframe width="'+n_width+'" height="'+n_height+'" src="'+s_url+'"></iframe></td></tr></table>';document.body.appendChild(e_window);a_windows[n_nesting]=e_window;f_putScreen(true);}
function f_dialogClose(){var n_nesting=a_windows.length-1;if(a_windows[n_nesting].removeNode)
a_windows[n_nesting].removeNode(true);else if(document.body.removeChild)
document.body.removeChild(a_windows[n_nesting]);a_windows[n_nesting]=null;a_windows.length=n_nesting;f_putScreen(n_nesting?true:false);}
function f_dragStart(s_name,e_event){if(!e_event&&window.event)e_event=window.event;window.n_mouseX=e_event.clientX;window.n_mouseY=e_event.clientY;window.e_draggedWindow=window.a_windows[s_name];return false;}
function f_dragProgress(e_event){if(!e_event&&window.event)e_event=window.event;if(!e_event||window.e_draggedWindow==null)return;var n_newMouseX=e_event.clientX;var n_newMouseY=e_event.clientY;window.e_draggedWindow.style.left=(parseInt(window.e_draggedWindow.style.left)-window.n_mouseX+n_newMouseX)+'px';window.e_draggedWindow.style.top=(parseInt(window.e_draggedWindow.style.top)-window.n_mouseY+n_newMouseY)+'px';window.n_mouseX=n_newMouseX;window.n_mouseY=n_newMouseY;}
function f_dragEnd(){window.e_draggedWindow=null;}
function getNewHttpRequest()
{var h=false;if(window.XMLHttpRequest){h=new XMLHttpRequest();if(h.overrideMimeType){h.overrideMimeType('text/xml');}}
else if(window.ActiveXObject)
{try{h=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e)
{try{h=new ActiveXObject("Microsoft.XMLHTTP");}
catch(e){}}}
return h;}
function makeRequest(url,f)
{var h23=getNewHttpRequest();h23.onreadystatechange=function(){f(h23);};h23.open('GET',url,true);h23.send(null);}
function makeV3DRequest(url){v3drequestUrl=url;var http_request=false;wait();makeRequest(url,get3dpreviewResponse);}
function get3dpreviewResponse(h){if(h.readyState==4){if(h.status==200){if(h.responseText=="notfound")
{while(v3dRequests>0)
{v3dRequests--;window.setTimeout('makeV3DRequest(v3drequestUrl);',10000);}}
else
{set3DContent(h.responseText);}}else{set3DBoxContent('There was a problem with the request.');}}}
function set3DContent(f)
{var pic=pvwBg?pvwBg:"";var s="<applet code='com/prove/pr3d/Prove3d.class' archive='/javascript/3D/viewer.jar' name='viewer' width='100%' height='100%' >"
s=s+"<param name='scene' value='"+f+"'>";s=s+"<param name='startTransparent' value='false'>";s=s+"<param name='startView' value='isometric'>";s=s+"<param name='textureTransparency' value='0.2'>";s=s+"<param name='motionBar' value='left'>";s=s+"<param name='viewBar' value='right'>";s=s+"<param name='buttonHide' value=''>";s=s+"<param name='background' value='"+pic+"'>";s=s+"<param name='backcolor' value='ffffff'>";s=s+"<param name='rotationDuration' value='1'>";s=s+"<param name='startAnimated' value='false'>";s=s+"<param name='collisionRadius' value='0'>";s=s+"<param name='headlightOn' value='true'>";s=s+"<param name='cameraAngle' value='0.1'>";s=s+"<param name='textcolor' value='000000'>";s=s+"<param name='shadowcolor' value='179B7E'>";s=s+"<param name='bilinear' value='off'>";s=s+"<param name='antialiasing' value='on'>";s=s+"<param name='zoomspeed' value='0.5'>";s=s+"<param name='turnspeed' value='1.0'>";s=s+"<param name='fitSceneOnLoad' value='true'>";s=s+"<param NAME='language' value='106'><param NAME='dictionaryFile' value='Dictionary.xml'>";s=s+"<param NAME='viewIso' value='-0.69;0.69;0.18;-0.73'><param NAME='viewFront' value='-1;0;0;6.28'><param NAME='viewBack' value='0;1;0;3.14'><param NAME='viewTop' value='1;0;0;1.57'><param NAME='viewBottom' value='1;0;0;-1.57'><param NAME='viewLeft' value='0;1;0;1.57'><param NAME='viewRight' value='0;1;0;-1.57'>";s=s+"<param NAME='showTooltips' value='false'>";s=s+"<param NAME='tooltipBackground' value='#FFFFFF'>";s=s+"<param NAME='tooltipForeground' value='#000000'>";s=s+"The 3D viewer requires the Java Runtime Environment (JRE) and for Java to be enabled on your system.<br>If Java is not installed, go to <a href='http://www.java.com/en/download/manual.jsp' target='_blank'> http://www.java.com/en/download/manual.jsp</a></applet>";set3DBoxContent(s);}
function set3DBoxContent(s)
{var e=$(ifId);if(e)
{var i=window.frames[ifId].document;i.open();i.write('<HTML><HEAD></HEAD><BODY style="padding: 0 0 0 0;margin: 0 0 0 0; background-color: #FFFFFF" ><TABLE id="Table1" cellSpacing="0" cellPadding="0" align="center" class="kimviewer" width=100% height=100% border=0><TR><TD valign=middle align=center width=100% height=100% >');i.write(s);i.write("</TD></TR></TABLE></BODY></HTML>");i.close();bt=$(btId);if(bt)
{HideE(bt)}
if(!bitmapPreview)
showVrml();}}
function showVrml()
{ShowE($('td3Dbuttons'));ShowE($(ifId));HideE(pvwar);HideE(pvTopElement);$('pv_bt2D').style.fontWeight='normal';$('pv_bt3D').style.fontWeight='bold';if(preview2DEnabled&&preview3DEnabled){ShowE($('trSwitchPreviews'));}}
function showView(view)
{var str=changeView($('dynamicThumb1').src,view);$('dynamicThumb1').src=changeView($('dynamicThumb1').src,view);pv_currentView=findViewIndex(view);}
function changeView(file,view)
{var reg=new RegExp("(_[a-z]*\\.)+","g");return file.replace(reg,'_'+view+'.');}
function nextView()
{pv_currentView+=1;if(pv_currentView>=pv_views.length)
pv_currentView=0;showView(pv_views[pv_currentView]);}
function findViewIndex(viewName)
{for(i=0;i<=pv_views.length;i++)
{if(viewName==pv_views[i])
return i;}
return 0;}
function makeV2DRequest(url){v2drequestUrl=url;var http_request=false;HideE($('thumbTable1'));makeRequest(url,get2dpreviewResponse);}
function get2dpreviewResponse(h){if(h.readyState==4){if(h.status==200){if(h.responseText=="filenotfound")
{showPreviewError();return;}
else
{set2DBoxContent(h.responseText);}}}}
function showPreviewError()
{HideE($('thumbTable1'));HideE($('pvWarning'));ShowE($('pvError'));}
function set2DBoxContent(s)
{if(s.length==0){showPreviewError();return;}
pvImageId.src=s;if(bitmapPreview)
{showBitmap();}}
function showBitmap()
{HideE($('td3Dbuttons'))
HideE($(ifId));HideE(pvwar)
ShowE(pvTopElement);$('pv_bt2D').style.fontWeight='bold';$('pv_bt3D').style.fontWeight='normal';if(preview2DEnabled&&preview3DEnabled)
{ShowE($('trSwitchPreviews'));}}
function dalert(s)
{return;if($('debug'))
{$('debug').innerHTML+='<br>'+s;}}
function requestPartsStatus(url)
{if(progressParts&&progressParts.length&&progressParts.length>0)
{for(var i=0;i<progressParts.length;i++)
{if(progressParts[i]&&progressParts[i].length>0)
{dalert('requestPartsStatus() ==> progressParts[i]='+progressParts[i]);dalert(url);makePartsStatusRequest(progressParts[i],url);}}}}
function removePart(pid)
{if(progressParts&&progressParts.length&&progressParts.length>0)
{for(var i=0;i<progressParts.length;i++)
{if(progressParts[i]==pid)
{dalert('removing part '+pid);progressParts[i]='';}}}}
var rpc_pstat_url='../rpc/getPartStatus.aspx';function makePartsStatusRequest(partId,url)
{if(partId)
{if(url.length&&url.length>0)
{rpc_pstat_url=url;}
dalert('makePartsStatusRequest('+partId+')');makeRequest(rpc_pstat_url+'?QueueId='+partId,OnPartStatusReady);}}
function OnPartStatusReady(h)
{if(h.readyState==4){if(h.status==200){dalert(h.responseText.split('|')[2].length);if(h.responseText.split('|')[2].length>10)
{var r=h.responseText;dalert(r);var pid=r.split('|');var id='Caddy1_Package1_ctrl_'+pid[0]+'_tdStatus';dalert(id);if($(id))
{$(id).innerHTML=pid[2];$(id).className='STATE_'+pid[1];dalert(id+$(id).innerHTML);removePart(pid[0]);}
else
{id='Caddy1_Package2_ctrl_'+pid[0]+'_tdStatus';if($(id))
{$(id).innerHTML=pid[2];$(id).className='STATE_'+pid[1];removePart(pid[0]);}
else
{dalert(id+' not found');}}}
else
{var dlto=getDownloadTimeout();if(h.responseText.length>0&&h.responseText.split('|')[0].length>0)
{var pid=h.responseText.split('|')[0];dalert('new request in :'+dlto+' for '+pid);setTimeout('makePartsStatusRequest('+pid+',\''+rpc_pstat_url+'\')',dlto);}}}
else
{dalert("'requestPartsStatus(\'' + rpc_pstat_url + '\')',3000");setTimeout('requestPartsStatus(\''+rpc_pstat_url+'\')',3000);}}}
function execJS(node){var bSaf=(navigator.userAgent.indexOf('Safari')!=-1);var bOpera=(navigator.userAgent.indexOf('Opera')!=-1);var bMoz=(navigator.appName=='Netscape');var st=node.getElementsByTagName('script');alert("node.getElementsByTagName('script') : "+st.length);var strExec;for(var i=0;i<st.length;i++){if(bSaf){strExec=st[i].innerHTML;}
else if(bOpera){strExec=st[i].text;}
else if(bMoz){strExec=st[i].textContent;}
else{strExec=st[i].text;alert(strExec);}
try{eval(strExec.split("<!--").join("").split("-->").join(""));}catch(e){alert(e);}}}
function getDownloadTimeout()
{if(!gb_dlto)
var gb_dlto=5000;if(gb_dlto<1000){gb_dlto+=200;}
else if(gb_dlto>=1000&&gb_dlto<5000){gb_dlto+=500;}
else if(gb_dlto>=5000&&gb_dlto<10000){gb_dlto+=1000;}
else if(gb_dlto>=10000){gb_dlto+=2000;}
return gb_dlto;}
function Go98K(url,target)
{if(target==''||target=='this')
{if(pageStart)
{pageStart();}
document.location.href=url;}
else
{alert('target not implemented');}}
function go32k(id)
{if(parent.frames.length>1)
{parent.frames["mleft"].document.location.href="left.aspx?class="+id;}
else
{document.location.href='/global/index.aspx?class='+id;}}
function CFChanged(ctrl){setCookie('CFID',ctrl.options[ctrl.selectedIndex].value,120);}
function D2CFChanged(ctrl){if(ctrl.options[ctrl.selectedIndex].value!=''){setCookie('D2CFID',ctrl.options[ctrl.selectedIndex].value,120)};}
function copyToclipboard(t,message)
{if(window.clipboardData)
{window.clipboardData.setData("Text",t);alert(message+t);return true;}
return false;}
function addToFavorites(url,title)
{if(window.sidebar){window.sidebar.addPanel(title,url,'');}
else if(window.external){window.external.AddFavorite(url,title);}}
function initToolTip(parentId,containerId)
{fader.setElement(containerId);fader.invisible();$(parentId).onmouseover=function(){if(faderTimer){clearInterval(faderTimer);};fader.showElement(containerId);};$(parentId).onmouseout=function(){if(faderTimer){clearInterval(faderTimer);};faderTimer=setTimeout('fader.hideElement("'+containerId+'")',600);};$(containerId).onmouseover=$(parentId).onmouseover;$(containerId).onmouseout=$(parentId).onmouseout;}
function onCheck(a)
{_onCheck(a,'D2CADFormat');}
function _onCheck(a,group)
{if(a&&a.childNodes)
{if(group)
UnselectAll(group);for(i=0;i<a.childNodes.length;i++)
{if(a.childNodes[i].className=='chkbox')
{checkBox(a.childNodes[i],true);}}
a.className='cblist cbpan_selected';}}
function checkBox(e,value)
{if(e)
{e.checked=value;}
if(e.getAttribute&&e.getAttribute("label"))
{e.label=e.getAttribute("label");}
if(e["label"]&&value)
{CFLSource.innerHTML=e["label"];}
if(e.getAttribute&&e.getAttribute("value"))
{e.value=e.getAttribute("value");}
if(e["value"]&&value)
{CFLSourceLinked.value=e["value"];}}
function resetAllCheckBoxes(name)
{a=document.getElementsByClassName('chkbox');for(i=0;i<a.length;i++)
{if(a[i].name==name)
checkBox(a[i],false);}}
function UnselectAll(name)
{a=document.getElementsByClassName('cbpan_selected');for(i=0;i<a.length;i++)
{a[i].className="cblist";}
resetAllCheckBoxes(name)}
function onCFSelected(thisId,divChild)
{a=document.getElementsByClassName('cbpan_1');for(i=0;i<a.length;i++)
{HideE(a[i]);a[i].className="cbpan_1";}
onCheck($(thisId));ShowE($(divChild));}
function showCadFormats(idSource)
{setCadFormatsPosition(idSource);ids=$(idSource);if(ids.getAttribute&&ids.getAttribute("linked"))
{ids.linked=ids.getAttribute("linked");}
if($(idSource)["linked"])
{CFLSourceLinked=$($(idSource)["linked"]);}
CFLSource=$(idSource);fader.hide();fader.toggle();}
function hideCadFormats()
{fader.toggle();}
function setCadFormatsPosition(idSource)
{pid=$(idSource);el=$('CADFormatsList');sX(el,findPosX(pid));el.style.top=findPosY(pid)+pid.offsetHeight+1;}
function pageStart(){img=$('w8');if(img&&img.src){img.className='WaitImageOn';}}
function _ps(){pageStart();}
function pageStop(){img=$('w8');if(img&&img.src){img.className='WaitImageOff';}}
function _keepAlive()
{try
{if(!$('ifr_keepAlive'))
{_createKPIFrame();}
$('ifr_keepAlive').src='keepAlive.aspx';}
catch(__err){};}
function _createKPIFrame()
{var kaifr=document.createElement('iframe');kaifr.id='ifr_keepAlive';kaifr.src='keepalive.aspx';kaifr.name='ifr_keepAlive';kaifr.width=5;kaifr.height=2;kaifr.style.display='none';document.getElementsByTagName('body')[0].appendChild(kaifr);}
function evaluatePP()
{document.forms['partEvalutation'].SameStep.value='1';document.forms['partEvalutation'].submit();disableFormControls('partEvalutation');}
function disableFormControls(formName)
{var maxElems=document.forms[formName].elements.length;for(var i=0;i<maxElems;i++)
{if(document.forms[formName].elements[i].type!='hidden')
{document.forms[formName].elements[i].disabled=true;}}}
function isEnterKey()
{return(window.event&&window.event.keyCode==13)}
function doLogout(ws)
{setCookie("AL","0",-1);if(parent&&parent.frames&&parent.frames.length>1)
{wTarget=parent.document;}
else
{wTarget=window.document;}
if(ws.length>0)
uTarget="/ws/"+ws+"/";else
uTarget="/";wTarget.location.href=uTarget;}
window.setInterval('_keepAlive()',349000);function goRfq1(globalRoot,CatalogId,SelectionId,BackUrl,QueueId)
{try{pageStart();}catch(e){};document.location.href=globalRoot+"rfq.aspx?CatalogId="+CatalogId+"&sid="+SelectionId+"&backUrl="+BackUrl+"&QueueId="+QueueId;}
function initComboEditable(){jQuery(".CB_Origin").each(function(i){var nameAttr=jQuery(this).attr("name");var valSelected=jQuery(this).find("option:selected").text();var objCb=jQuery(this);var objCBeditable=jQuery(".BLOCK_CBEditable").filter("[name="+nameAttr+"]");objCBeditable.show();jQuery(this).replaceWith(objCBeditable);objCBeditable.find(".IPT_Write").val(valSelected);objCBeditable.find(".BT_DropDown").click(function(e){e.stopPropagation();jQuery(".BLOCK_List").hide();jQuery(".BLOCK_List").html("");objCb.find("option").each(function(j){jQuery(".BLOCK_List").append("<div class=\"LIST_item\">"+jQuery(this).text()+"</div>");});jQuery(".BLOCK_List").width(objCBeditable.find(".IPT_Write").width());jQuery(".BLOCK_List").show("fast");jQuery(".BLOCK_List").css("top",objCBeditable.find(".IPT_Write").height()+objCBeditable.find(".IPT_Write").position().top+3);jQuery(".BLOCK_List").css("left",objCBeditable.find(".IPT_Write").offset().left);jQuery(".LIST_item").click(function(){objCBeditable.find(".IPT_Write").val(jQuery(this).text());jQuery(".BLOCK_List").hide();objCBeditable.find(".IPT_Write").select();});jQuery(".LIST_item").mouseover(function(){jQuery(this).css("background-color","#1E90FF");jQuery(this).css("color","white");});jQuery(".LIST_item").mouseout(function(){jQuery(this).css("background-color","white");jQuery(this).css("color","black");});});});jQuery("body").click(function(e){var cn=e.target.className;if(jQuery(".BLOCK_List").css("display")=="block"){jQuery(".BLOCK_List").hide();}});}
