var popWin;var popWinType;var ie;ie=(document.all)?true:false;function helpModLvl(hrefTarget){var name,width,height;name="helpModLvl";width="463";height="500";popWindow(hrefTarget,name,width,height,resizable="yes");}
function helpFieldLvl(hrefTarget){var name,width,height;name="helpFieldLvl";width="323";height="500";popWindow(hrefTarget,name,width,height,resizable="yes");}
function printerFriend(hrefTarget){var name,width,height;name="printerVersion";width="603";height="500";popWindow(hrefTarget,name,width,height,resizable="yes");}
function newWindow(hrefTarget){window.open(hrefTarget)}
function popWindow(hrefTarget,name,width,height){if(document.all){xMax=screen.width,yMax=screen.height;}else{if(document.layers){xMax=window.outerWidth,yMax=window.outerHeight;}else{xMax=640,yMax=480;}}
var xOffset=(xMax-586)/2,yOffset=(yMax-700)/2;if(!popWin||popWin.closed){popWinType=name;popWin=window.open(hrefTarget,name,'width='+width+',height='+height+',screenX='+xOffset+',screenY='+yOffset+', top='+yOffset+',left='+xOffset+',scrollbars=yes,menubar=yes,resizable=yes');}else{if(popWinType!=name){popWin.close();popWinType=name;popWin=window.open(hrefTarget,name,'width='+width+',height='+height+',screenX='+xOffset+',screenY='+yOffset+', top='+yOffset+',left='+xOffset+',scrollbars=yes,menubar=yes,resizable=yes');return;}
popWin.focus();popWin.location=hrefTarget;}}
function popUpWindow(hrefTarget,name,width,height,scollbarReq,menuBarReq,resizableReq){if(document.all){xMax=screen.width,yMax=screen.height;}else{if(document.layers){xMax=window.outerWidth,yMax=window.outerHeight;}else{xMax=640,yMax=480;}}
var xOffset=(xMax-586)/2,yOffset=(yMax-700)/2;if(!popWin||popWin.closed){popWinType=name;popWin=window.open(hrefTarget,name,'width='+width+',height='+height+',screenX='+xOffset+',screenY='+yOffset+', top='+yOffset+',left='+xOffset+',scrollbars='+scollbarReq+',menubar='+menuBarReq+',resizable='+resizableReq+'');}else{if(popWinType!=name){popWin.close();popWinType=name;popWin=window.open(hrefTarget,name,'width='+width+',height='+height+',screenX='+xOffset+',screenY='+yOffset+', top='+yOffset+',left='+xOffset+',scrollbars='+scollbarReq+',menubar='+menuBarReq+',resizable='+resizableReq+'');return;}
popWin.focus();popWin.location=hrefTarget;}}
function popLanguage(formName,sel){var name,width,height,fieldValue,localeValue,hrefTarget,objTest,bolTestResult,npc;name="LanguageSelection";width="316";height="350";objTest=/_none/;fieldValue=sel.options[sel.selectedIndex].value;localeValue=fieldValue.substring(3,5)+"_"+fieldValue.substring(0,2);bolTestResult=objTest.test(fieldValue);if(bolTestResult){formName.submit();}else if(fieldValue==""){alert('Please select a Country')}else{location.href="/content/"+fieldValue.substring(0,2)+"/"+fieldValue.substring(3,5)+"/index.jsx";}
return false;}
function setPreferences(strRedirectorKey,strPermanentFlag){if(opener)
{opener.location.href="/?cookie="+strRedirectorKey+"&setCookie="+strPermanentFlag;window.close();}}
function popWrapper(hrefTarget,popType){if((popType=="pop_up_2_col"))
{helpFieldLvl(hrefTarget);}
else if((popType=="pop_up_3_col")||(popType=="pop_up_3_col")||(popType=="pr_fr_3_col"))
{helpModLvl(hrefTarget);}
else if((popType=="pop_up_4_col")||(popType=="pr_fr_4_col"))
{printerFriend(hrefTarget);}
else if((popType=="pop_up_full_page"))
{newWindow(hrefTarget);}
else{return;}}
function PopupClose()
{window.close();}
function isValidTextDate(formName,fieldName)
{var returnFlag=true;var frmIndex=findFormIndex(formName);var fieldIndex=findElementIndex(frmIndex,fieldName);var strDate=document.forms[frmIndex].elements[fieldIndex].value;var intDateLen=strDate.length;if(intDateLen>0){if(intDateLen>10)
{alert("Invalid Date Entered");document.forms[frmIndex].elements[fieldIndex].focus();returnFlag=false;return false;}
strDate=strDate.replace('-','/');strDate=strDate.replace('-','/');var arrDate=strDate.split('/');var dd=arrDate[1]
var mm=arrDate[0]
var yy=arrDate[2]
if(mm==0||isNaN(mm))
{alert('Please Enter Valid Date');document.forms[frmIndex].elements[fieldIndex].focus();returnFlag=false;return false;}
else if(dd==0||isNaN(dd))
{alert('Please Enter Valid Date');document.forms[frmIndex].elements[fieldIndex].focus();returnFlag=false;return false;}
else if(yy==0||isNaN(yy))
{alert('Please Enter Valid Date');document.forms[frmIndex].elements[fieldIndex].focus();returnFlag=false;return false;}
else
{if(mm==1||mm==3||mm==5||mm==7||mm==8||mm==10||mm==12)
totDays=31;else if(mm==4||mm==6||mm==9||mm==11)
totDays=30;else if(yy%4==0&&yy%100!=0||yy%400==0)
totDays=29;else
totDays=28;if(dd>totDays)
{alert("Please select valid Date");document.forms[frmIndex].elements[fieldIndex].focus();returnFlag=false;return false;}
if(mm<1||mm>12)
{alert("Please select valid Month");document.forms[frmIndex].elements[fieldIndex].focus();returnFlag=false;return false;}}}
if(returnFlag==true)
{return true;}}
function findFormIndex(formName)
{var frmLen=document.forms.length;var frmIndex;var formFlag=false;for(var i=0;i<frmLen;i++)
{if(document.forms[i].name==formName)
{frmIndex=i;formFlag=true;}}
if(formFlag==true)
return frmIndex;else
{alert('Invalid Form Name');return false;}}
function findElementIndex(frmIndex,fieldName)
{var elemLen=document.forms[frmIndex].elements.length;var fieldIndex;var fieldFlag=false;for(var i=0;i<elemLen;i++)
{if(document.forms[frmIndex].elements[i].type=='text'||document.forms[frmIndex].elements[i].type=='select-one')
{if(document.forms[frmIndex].elements[i].name==fieldName)
{fieldIndex=i;fieldFlag=true;}}}
if(fieldFlag==true)
return fieldIndex;else
{alert('Invalid Field Name');return false;}}
function Trim(str)
{while(str.charAt(0)==" ")str=str.substring(1);while(str.charAt(str.length-1)==" ")str=str.substring(0,str.length-1);return str;}
function ClickSearchInput(formName,fieldName,oInputDefault)
{var frmIndex=findFormIndex(formName);var fieldIndex=findElementIndex(frmIndex,fieldName);var searchval=document.forms[frmIndex].elements[fieldIndex].value;if(searchval==oInputDefault)
{searchval="";document.forms[frmIndex].elements[fieldIndex].value=searchval;document.forms[frmIndex].elements[fieldIndex].focus();}}
function ResetSearchInput(formName,fieldName,oInputDefault)
{var frmIndex=findFormIndex(formName);var fieldIndex=findElementIndex(frmIndex,fieldName);var searchval=document.forms[frmIndex].elements[fieldIndex].value;if(searchval=="")
{searchval=oInputDefault;document.forms[frmIndex].elements[fieldIndex].value=searchval;}
else
if(checkInvalidChrs(document.forms[frmIndex].elements[fieldIndex]))
document.forms[frmIndex].elements[fieldIndex].value=searchval;}
function BusyBox(id,varName,imageCount,imageNamePrefix,imageNameSuffix,imageDelay,width,height,url)
{this.id=id;this.ImageCount=imageCount;this.CurrentImageIndex=0;this.ImageWidth=0;this.ImageHeight=0;this.ImageNamePrefix=imageNamePrefix;this.ImageNameSuffix=imageNameSuffix;this.ImageDelay=imageDelay;this.DivID="BusyBoxDiv";this.ImgID="BusyBoxImg";this.Enabled=true;this.Width=width;this.Height=height;this.VarName=varName;this.timeout_id=null;this.CacheImages();this.BusyBoxUrl=url;this.IFrame=document.getElementById(this.id);this.Hide();if(this.BusyBoxUrl)
this.LoadUrl(this.BusyBoxUrl);else
this.RenderContent();if(!frames[this.id])
this.Enabled=false;}
BusyBox.prototype.GetIFrameDocument=function()
{var doc;if(this.IFrame.contentDocument)
doc=this.IFrame.contentDocument;else if(this.IFrame.contentWindow)
doc=this.IFrame.contentWindow.document;else if(this.IFrame.document)
doc=this.IFrame.document;else
doc=this.IFrame.document;return doc;}
BusyBox.prototype.LoadUrl=function(url)
{var IFrameDoc=this.GetIFrameDocument();IFrameDoc.location.replace(url);}
BusyBox.prototype.RenderContent=function()
{var doc=this.GetIFrameDocument();var wh="width:"+this.Width+"; height:"+this.Height;var style=" style='BORDER: navy 3px solid; POSITION: absolute; "+wh+"'";doc.open();doc.writeln("<body ondragstart='return false;' style='Margin: 0px; Background-Color: white'>");doc.writeln("   <div id='"+this.DivID+"' align=center "+style+">");doc.writeln("      <img id='"+this.ImgID+"' src=''>");doc.writeln("      <br><h3>Processing</h3>");doc.writeln("   </div>");doc.writeln("</body>");doc.close();}
BusyBox.prototype.Resize=function()
{if(BusyBox.IsBrowserIE())
{var div=frames[this.id].document.getElementById(this.DivID);this.IFrame.style.width=div.offsetWidth;this.IFrame.style.height=div.offsetHeight;}
else
{this.IFrame.style.width=this.Width;this.IFrame.style.height=this.Height;}}
BusyBox.prototype.Center=function()
{if(!this.IFrame)
return;var objLeft=(document.body.clientWidth-this.IFrame.offsetWidth)/2;var objTop=(document.body.clientHeight-this.IFrame.offsetHeight)/2;objLeft=objLeft+document.body.scrollLeft;objTop=objTop+document.body.scrollTop;this.IFrame.style.position="absolute";this.IFrame.style.top=objTop;this.IFrame.style.left=objLeft;}
BusyBox.prototype.CacheImages=function()
{this.Images=new Array(this.ImageCount);for(var i=0;i<this.ImageCount;i++)
{this.Images[i]=new Image();this.Images[i].src=this.ImageNamePrefix+i+this.ImageNameSuffix;}}
BusyBox.prototype.IsAnimating=function()
{if(this.timeout_id==null)
return false;else
return true;}
BusyBox.prototype.IsVisible=function()
{var ifrm=document.getElementById(this.id);if(ifrm.style.visibility=="visible"&&ifrm.style.width>0)
return true;else
return false;}
BusyBox.prototype.Animate=function()
{if(frames[this.id])
frames[this.id].document.getElementById(this.ImgID).src=this.Images[this.CurrentImageIndex].src;else
document.getElementById(this.ImgID).src=this.Images[this.CurrentImageIndex].src;this.Resize();this.Center();this.CurrentImageIndex=(this.CurrentImageIndex+1)%this.ImageCount;this.timeout_id=setTimeout(this.VarName+".Animate();",this.ImageDelay);}
BusyBox.prototype.StartAnimate=function()
{if(this.IsAnimating())
return;this.Animate();}
BusyBox.prototype.StopAnimate=function()
{clearTimeout(this.timeout_id);this.timeout_id=null;}
BusyBox.prototype.Hide=function()
{this.StopAnimate();this.IFrame.style.visibility="hidden";this.IFrame.style.width=0;this.IFrame.style.height=0;}
BusyBox.prototype.Show=function()
{if(!this.Enabled)
return;if(this.IsAnimating()||this.IsVisible())
return;this.Resize();this.Center();this.IFrame.style.visibility="visible";this.IFrame.style.zIndex="999999";this.StartAnimate();}