var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;var isWin=(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false;var isOpera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;function ControlVersion()
{var version;var axo;var e;try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");version=axo.GetVariable("$version");}catch(e){}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");version="WIN 6,0,21,0";axo.AllowScriptAccess="always";version=axo.GetVariable("$version");}catch(e){}}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");version=axo.GetVariable("$version");}catch(e){}}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");version="WIN 3,0,18,0";}catch(e){}}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");version="WIN 2,0,0,11";}catch(e){version=-1;}}
return version;}
function GetSwfVer(){var flashVer=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var swVer2=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var flashDescription=navigator.plugins["Shockwave Flash"+swVer2].description;var descArray=flashDescription.split(" ");var tempArrayMajor=descArray[2].split(".");var versionMajor=tempArrayMajor[0];var versionMinor=tempArrayMajor[1];var versionRevision=descArray[3];if(versionRevision==""){versionRevision=descArray[4];}
if(versionRevision[0]=="d"){versionRevision=versionRevision.substring(1);}else if(versionRevision[0]=="r"){versionRevision=versionRevision.substring(1);if(versionRevision.indexOf("d")>0){versionRevision=versionRevision.substring(0,versionRevision.indexOf("d"));}}
var flashVer=versionMajor+"."+versionMinor+"."+versionRevision;}}
else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1)flashVer=4;else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1)flashVer=3;else if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1)flashVer=2;else if(isIE&&isWin&&!isOpera){flashVer=ControlVersion();}
return flashVer;}
function DetectFlashVer(reqMajorVer,reqMinorVer,reqRevision)
{versionStr=GetSwfVer();if(versionStr==-1){return false;}else if(versionStr!=0){if(isIE&&isWin&&!isOpera){tempArray=versionStr.split(" ");tempString=tempArray[1];versionArray=tempString.split(",");}else{versionArray=versionStr.split(".");}
var versionMajor=versionArray[0];var versionMinor=versionArray[1];var versionRevision=versionArray[2];if(versionMajor>parseFloat(reqMajorVer)){return true;}else if(versionMajor==parseFloat(reqMajorVer)){if(versionMinor>parseFloat(reqMinorVer))
return true;else if(versionMinor==parseFloat(reqMinorVer)){if(versionRevision>=parseFloat(reqRevision))
return true;}}
return false;}}
function AC_AddExtension(src,ext)
{if(src.indexOf('?')!=-1)
return src.replace(/\?/,ext+'?');else
return src+ext;}
function AC_Generateobj(objAttrs,params,embedAttrs)
{var str='';if(isIE&&isWin&&!isOpera)
{str+='<object ';for(var i in objAttrs)
{str+=i+'="'+objAttrs[i]+'" ';}
str+='>';for(var i in params)
{str+='<param name="'+i+'" value="'+params[i]+'" /> ';}
str+='</object>';}
else
{str+='<embed ';for(var i in embedAttrs)
{str+=i+'="'+embedAttrs[i]+'" ';}
str+='> </embed>';}
document.write(str);}
function AC_FL_RunContent(){var ret=AC_GetArgs
(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");AC_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs);}
function AC_SW_RunContent(){var ret=AC_GetArgs
(arguments,".dcr","src","clsid:166B1BCA-3F9C-11CF-8075-444553540000",null);AC_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs);}
function AC_GetArgs(args,ext,srcParamName,classid,mimeType){var ret=new Object();ret.embedAttrs=new Object();ret.params=new Object();ret.objAttrs=new Object();for(var i=0;i<args.length;i=i+2){var currArg=args[i].toLowerCase();switch(currArg){case"classid":break;case"pluginspage":ret.embedAttrs[args[i]]=args[i+1];break;case"src":case"movie":args[i+1]=AC_AddExtension(args[i+1],ext);ret.embedAttrs["src"]=args[i+1];ret.params[srcParamName]=args[i+1];break;case"onafterupdate":case"onbeforeupdate":case"onblur":case"oncellchange":case"onclick":case"ondblclick":case"ondrag":case"ondragend":case"ondragenter":case"ondragleave":case"ondragover":case"ondrop":case"onfinish":case"onfocus":case"onhelp":case"onmousedown":case"onmouseup":case"onmouseover":case"onmousemove":case"onmouseout":case"onkeypress":case"onkeydown":case"onkeyup":case"onload":case"onlosecapture":case"onpropertychange":case"onreadystatechange":case"onrowsdelete":case"onrowenter":case"onrowexit":case"onrowsinserted":case"onstart":case"onscroll":case"onbeforeeditfocus":case"onactivate":case"onbeforedeactivate":case"ondeactivate":case"type":case"codebase":case"id":ret.objAttrs[args[i]]=args[i+1];break;case"width":case"height":case"align":case"vspace":case"hspace":case"class":case"title":case"accesskey":case"name":case"tabindex":ret.embedAttrs[args[i]]=ret.objAttrs[args[i]]=args[i+1];break;default:ret.embedAttrs[args[i]]=ret.params[args[i]]=args[i+1];}}
ret.objAttrs["classid"]=classid;if(mimeType)ret.embedAttrs["type"]=mimeType;return ret;}
var enableCache=true;var jsCache=new Array();var dynamicContent_ajaxObjects=new Array();function ajax_showContent(divId,ajaxIndex,url)
{var targetObj=document.getElementById(divId);targetObj.innerHTML=dynamicContent_ajaxObjects[ajaxIndex].response;if(enableCache){jsCache[url]=dynamicContent_ajaxObjects[ajaxIndex].response;}
dynamicContent_ajaxObjects[ajaxIndex]=false;ajax_parseJs(targetObj)}
function ajax_loadContent(divId,url)
{if(enableCache&&jsCache[url]){document.getElementById(divId).innerHTML=jsCache[url];return;}
var ajaxIndex=dynamicContent_ajaxObjects.length;document.getElementById(divId).innerHTML='Loading content - please wait';dynamicContent_ajaxObjects[ajaxIndex]=new sack();dynamicContent_ajaxObjects[ajaxIndex].requestFile=url;dynamicContent_ajaxObjects[ajaxIndex].onCompletion=function(){ajax_showContent(divId,ajaxIndex,url);};dynamicContent_ajaxObjects[ajaxIndex].runAJAX();}
function ajax_parseJs(obj)
{var scriptTags=obj.getElementsByTagName('SCRIPT');var string='';var jsCode='';for(var no=0;no<scriptTags.length;no++){if(scriptTags[no].src){var head=document.getElementsByTagName("head")[0];var scriptObj=document.createElement("script");scriptObj.setAttribute("type","text/javascript");scriptObj.setAttribute("src",scriptTags[no].src);}else{if(navigator.userAgent.indexOf('Opera')>=0){jsCode=jsCode+scriptTags[no].text+'\n';}
else
jsCode=jsCode+scriptTags[no].innerHTML;}}
if(jsCode)ajax_installScript(jsCode);}
function ajax_installScript(script)
{if(!script)
return;if(window.execScript){window.execScript(script)}else if(window.jQuery&&jQuery.browser.safari){window.setTimeout(script,0);}else{window.setTimeout(script,0);}}
DHTML_modalMessage=function()
{var url;var htmlOfModalMessage;var divs_transparentDiv;var divs_content;var iframe;var layoutCss;var width;var height;var existingBodyOverFlowStyle;var dynContentObj;var cssClassOfMessageBox;var shadowDivVisible;var shadowOffset;var MSIE;this.url='';this.htmlOfModalMessage='';this.layoutCss='modal-message.css';this.height=200;this.width=400;this.cssClassOfMessageBox=false;this.shadowDivVisible=true;this.shadowOffset=5;this.MSIE=false;if(navigator.userAgent.indexOf('MSIE')>=0)this.MSIE=true;}
DHTML_modalMessage.prototype={setSource:function(urlOfSource)
{this.url=urlOfSource;},setHtmlContent:function(newHtmlContent)
{this.htmlOfModalMessage=newHtmlContent;},setSize:function(width,height)
{if(width)this.width=width;if(height)this.height=height;},setCssClassMessageBox:function(newCssClass)
{this.cssClassOfMessageBox=newCssClass;if(this.divs_content){if(this.cssClassOfMessageBox)
this.divs_content.className=this.cssClassOfMessageBox;else
this.divs_content.className='modalDialog_contentDiv';}},setShadowOffset:function(newShadowOffset)
{this.shadowOffset=newShadowOffset},display:function()
{if(!this.divs_transparentDiv){this.__createDivs();}
this.divs_transparentDiv.style.display='block';this.divs_content.style.display='block';this.divs_shadow.style.display='block';if(this.MSIE)this.iframe.style.display='block';this.__resizeDivs();window.refToThisModalBoxObj=this;setTimeout('window.refToThisModalBoxObj.__resizeDivs()',150);this.__insertContent();},setShadowDivVisible:function(visible)
{this.shadowDivVisible=visible;},close:function()
{this.divs_transparentDiv.style.display='none';this.divs_content.style.display='none';this.divs_shadow.style.display='none';if(this.MSIE)this.iframe.style.display='none';},addEvent:function(whichObject,eventType,functionName,suffix)
{if(!suffix)suffix='';if(whichObject.attachEvent){whichObject['e'+eventType+functionName+suffix]=functionName;whichObject[eventType+functionName+suffix]=function(){whichObject['e'+eventType+functionName+suffix](window.event);}
whichObject.attachEvent('on'+eventType,whichObject[eventType+functionName+suffix]);}else
whichObject.addEventListener(eventType,functionName,false);},__createDivs:function()
{this.divs_transparentDiv=document.createElement('DIV');this.divs_transparentDiv.className='modalDialog_transparentDivs';this.divs_transparentDiv.style.left='0px';this.divs_transparentDiv.style.top='0px';document.body.appendChild(this.divs_transparentDiv);this.divs_content=document.createElement('DIV');this.divs_content.className='modalDialog_contentDiv';this.divs_content.id='DHTMLSuite_modalBox_contentDiv';this.divs_content.style.zIndex=100000;if(this.MSIE){this.iframe=document.createElement('<IFRAME src="about:blank" frameborder=0>');this.iframe.style.zIndex=90000;this.iframe.style.position='absolute';document.body.appendChild(this.iframe);}
document.body.appendChild(this.divs_content);this.divs_shadow=document.createElement('DIV');this.divs_shadow.className='modalDialog_contentDiv_shadow';this.divs_shadow.style.zIndex=95000;document.body.appendChild(this.divs_shadow);window.refToModMessage=this;this.addEvent(window,'scroll',function(e){window.refToModMessage.__repositionTransparentDiv()});this.addEvent(window,'resize',function(e){window.refToModMessage.__repositionTransparentDiv()});},__getBrowserSize:function()
{var bodyWidth=document.documentElement.clientWidth;var bodyHeight=document.documentElement.clientHeight;var bodyWidth,bodyHeight;if(self.innerHeight){bodyWidth=self.innerWidth;bodyHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){bodyWidth=document.documentElement.clientWidth;bodyHeight=document.documentElement.clientHeight;}else if(document.body){bodyWidth=document.body.clientWidth;bodyHeight=document.body.clientHeight;}
return[bodyWidth,bodyHeight];},__resizeDivs:function()
{var topOffset=Math.max(document.body.scrollTop,document.documentElement.scrollTop);if(this.cssClassOfMessageBox)
this.divs_content.className=this.cssClassOfMessageBox;else
this.divs_content.className='modalDialog_contentDiv';if(!this.divs_transparentDiv)return;var st=Math.max(document.body.scrollTop,document.documentElement.scrollTop);var sl=Math.max(document.body.scrollLeft,document.documentElement.scrollLeft);window.scrollTo(sl,st);setTimeout('window.scrollTo('+sl+','+st+');',10);this.__repositionTransparentDiv();var brSize=this.__getBrowserSize();var bodyWidth=brSize[0];var bodyHeight=brSize[1];this.divs_content.style.width=this.width+'px';this.divs_content.style.height=this.height+'px';var tmpWidth=this.divs_content.offsetWidth;var tmpHeight=this.divs_content.offsetHeight;this.divs_content.style.left=Math.ceil((bodyWidth-tmpWidth)/2)+'px';;this.divs_content.style.top=(Math.ceil((bodyHeight-tmpHeight)/2)+topOffset)+'px';if(this.MSIE){this.iframe.style.left=this.divs_content.style.left;this.iframe.style.top=this.divs_content.style.top;this.iframe.style.width=this.divs_content.style.width;this.iframe.style.height=this.divs_content.style.height;}
this.divs_shadow.style.left=(this.divs_content.style.left.replace('px','')/1+this.shadowOffset)+'px';this.divs_shadow.style.top=(this.divs_content.style.top.replace('px','')/1+this.shadowOffset)+'px';this.divs_shadow.style.height=tmpHeight+'px';this.divs_shadow.style.width=tmpWidth+'px';if(!this.shadowDivVisible)this.divs_shadow.style.display='none';},__repositionTransparentDiv:function()
{this.divs_transparentDiv.style.top=Math.max(document.body.scrollTop,document.documentElement.scrollTop)+'px';this.divs_transparentDiv.style.left=Math.max(document.body.scrollLeft,document.documentElement.scrollLeft)+'px';var brSize=this.__getBrowserSize();var bodyWidth=brSize[0];var bodyHeight=brSize[1];this.divs_transparentDiv.style.width=bodyWidth+'px';this.divs_transparentDiv.style.height=bodyHeight+'px';},__insertContent:function()
{if(this.url){ajax_loadContent('DHTMLSuite_modalBox_contentDiv',this.url);}else{this.divs_content.innerHTML=this.htmlOfModalMessage;}}}
function clearField(fieldName){var cleared=0;if(cleared!=1){fieldName.value="";cleared=1;}
else{cleared=0;}}
function searchSubmit(){document.searchForm.submit();}
function jumpURL(selection){var tempIndex,selectedURL;tempIndex=selection.selectedIndex;selectedURL=selection.options[tempIndex].value;window.top.location.href=selectedURL;}
function popupwindow(url,features){if(features==''){newWindow=window.open(url,'tempwindow',width=640,height=480,toolbar=no,scrollbars=yes);}
else{newWindow=window.open(url,'tempwindow',features);}}
function closereload(url){window.opener.location=url;self.close();}
function myPopup1(){window.open("PartLabs.cfm?PageId=676975830112&amp;<cfoutput>App=Yes&Reg=#SESSION.REGION2#&Cty=#SESSION.COUNTRY2#&Lang=#SESSION.URLLANG#</cfoutput>","myWindow","status = 1, height = 500, width = 700, resizable = 0, scrollbars = 1, top = 300, left = 500")}
function myPopup(bm){window.open(bm,"myWindow","status = 1, height = 950, width = 300, resizable = 0, scrollbars = 1, top = 0, left = 500")}
function popUpSum(URL){day=new Date();id=day.getTime();eval("page"+id+" = window.open(URL, '"+id+"', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=800,height=800,left = 300,top = 100');");}
function Login(URL) {day = new Date();id = day.getTime();eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=350,height=230,left = 500,top = 300');");}
function AddEdit(URL) {day = new Date();id = day.getTime();eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=350,height=230,left = 500,top = 300');");}

