$(function(){var isFixed=(function(){var container=document.body;if(document.createElement&&container&&container.appendChild&&container.removeChild){var el=document.createElement('div');if(!el.getBoundingClientRect)return null;el.innerHTML='x';el.style.cssText='top:100px;';container.appendChild(el);var orgTop=el.getBoundingClientRect().top;var originalHeight=container.style.height,originalScrollTop=container.scrollTop;el.style.position="fixed";container.style.height=(originalHeight+3000)+'px';container.scrollTop=500;var elementTop=el.getBoundingClientRect().top;container.style.height=originalHeight;var isSupported=(orgTop!==elementTop);container.removeChild(el);container.scrollTop=originalScrollTop;return isSupported;}
return null;})();if(!isFixed){$("!placeHolder").hide();}});function pblcRootPath(){if(document.pathModifier==null){var m=window.location.pathname;var startAt=1;if(m.substr(0,1)!="/")m="/"+m;if(m.substr(startAt,3)=="(S("){document.pathModifier=m.substring(0,m.indexOf("/",startAt)+1);}else{document.pathModifier="/";}}else{if(document.pathModifier.substr(0,1)!="/"){document.pathModifier="/"+document.pathModifier;}}
return document.pathModifier;}
function pLink(m1,m2,m3,mpage){if(mpage=='cccccccc-ffff-cccc-ffff-cccccccccccc'){document.location.href=pblcRootPath()+'content/Products/PublicProductList.aspx?GUID='+m1;}else if(mpage=='ffffffff-cccc-ffff-cccc-ffffffffffff'){document.location.href=pblcRootPath()+'content/Products/PublicProductDetails.aspx?GUID='+m2+'&pGUID='+m1;}else{document.location.href='http://'+document.domain+'/content/infoservice/site.aspx?page='+mpage;}}
function MM_findObj(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}
if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=MM_findObj(n,d.layers[i].document);if(!x&&d.getElementById)x=d.getElementById(n);return x;}
var active=0,oc=0,activeSub=null;function a(n,c){var disp,o,oP,i;if(active==n){disp='none';oP=eval('MM_findObj("s'+active+'")');active=0;}else{if(active!=0){for(i=0;i<=oc;i++){o=eval('MM_findObj("s'+active+'_'+i+'")');o.style.display='none';}
oP=eval('MM_findObj("s'+active+'")');}
disp='block';active=n;oP=eval('MM_findObj("s'+active+'")');oc=c;}
for(i=0;i<=c;i++){o=eval('MM_findObj("s'+n+'_'+i+'")');o.style.display=disp;}}
function s(o){if(activeSub){activeSub.style.backgroundColor='#3667FF';activeSub.style.color='#ffffff';}
o.style.backgroundColor='#7A9BFF';o.style.color='#000000';o.style.backgroundImage='url(img/right_black.gif)';activeSub=o;}
function M(o){if(activeSub!=o)o.className='toparea';var id=o.id.substr(1);$("div.HeaderMenuMarker").removeClass("Hover").filter("#marker_"+id).addClass("Hover");}
function O(o){if(activeSub!=o)o.className='toparea';}
function l(s){if(s.indexOf('.aspx')==-1)parent.frames['c_FrameMenu'].location.href='html/'+s;else parent.frames['c_FrameMenu'].location.href=s;}
var currOpen=null;function openSubs(o){if(o.length>0){parent.frames['c_FrameMenu'].location.href="../indexframe/menupublic2nd.aspx?par="+o;}else{parent.frames['c_FrameMenu'].location.href="../indexframe/emptyPublic.aspx";}}
function closeSubs(o){}
function selM(o){if(o){if(activeSub)activeSub.className='toparea';activeSub=o;o.className='toparea';}
var id=o.id.substr(1);$("div.HeaderMenuMarker").removeClass("Active Hover").filter("#marker_"+id).addClass("Active");}
function removeHovers(ev){$("div.HeaderMenuMarker").removeClass("Hover");}
function removeActive(){$("div.HeaderMenuMarker").removeClass("Active Hover");}
function pLinkTo(pm1,pm2,pm3,pm4){alert('in');pm1=pm1.toLowerCase();pm2=pm2.toLowerCase();pm3=pm3.toLowerCase();if(!pm1||pm1=='')return;var topMenu=$("div[onclick*='"+pm1+"']");if(topMenu.length>0){selM(topMenu[0]);}else{if(pm4){top.frames["GfghMain"].document.location.href="../infoservice/PortalContentPublic.aspx?GUID="+pm4;}}
top.frames['c_FrameMenu'].document.location.href="../indexframe/menupublic2nd.aspx?par="+pm1+"&s="+pm2+"&t="+pm3;if(topMenu.length>0){if(pm2==''){doClick(topMenu[0]);}}}
function BannerClick(o){if(o.className=="link"&&o.linkTo!=null&&o.linkTo.length>0){window.open(o.linkTo,o.target);}}
function ReplaceBanner(s){if(s!=null){var oImg=ElementByID("BannerImg");if(oImg==null)return;var arr=s.split("\n");if(arr!=null&&arr.length>3){oImg.className="";document.BannerViewDuration=parseFloat(arr[0]);if(arr[1].substr(arr[1].length-4).toLowerCase()!=".fla"){if(arr[2].length>0)oImg.className="link";oImg.src=arr[1];oImg.linkTo=arr[2];oImg.target=arr[3];}}}
if(document.BannerViewDuration==null||document.BannerViewDuration<1)document.BannerViewDuration=180;window.setTimeout(function(){top.AD_AddDownload("~/Content/IndexFrame/HeaderBanner.aspx",false,null,ReplaceBanner,null);},document.BannerViewDuration*1000);}
function popWindow_hp(theURL,vars,winName,htmlName,features){eval(winName+"=window.open('"+theURL+'?'+vars+"','"+htmlName+"','"+features+"')");if(window.focus)
eval(winName+".focus()");}
function s2(o){if(secondMenuactiveSub){secondMenuactiveSub.style.backgroundColor='#3667FF';secondMenuactiveSub.style.color='#ffffff';secondMenuactiveSub.style.backgroundImage='url(img/right_white.gif)';}
o.style.backgroundColor='#7A9BFF';o.style.color='#000000';o.style.backgroundImage='url(img/right_black.gif)';secondMenuactiveSub=o;}
function M2(o){if(o){$(o).addClass("Hover");}}
function O2(o){$(o).removeClass("Hover");}
function unHoverTopLevel(){$("tr.topLevel").removeClass("Hover");}
function Msub(o){unHoverSubLevel();$(o).addClass("Hover");}
function unHoverSubLevel(){$("tr.subLevel td.NameTD").removeClass("Hover");}
function l2(s){if(s.indexOf('.aspx')==-1)parent.frames['c_FrameMenu'].location.href='html/'+s;else parent.frames['c_FrameMenu'].location.href=s;}
var currOpen2=null;function openSubs2(o){if(o){var id=o.id.substr(1);$("tr[id^='sub_"+id+"']").show();}}
function closeAllSubs2(){$("tr.subLevel").hide().removeClass("secondMenuactive");}
function selMTop(o){if(o){closeAllSubs2();allSubInsecondMenuactive();$("tr.topLevel").removeClass("secondMenuactive");$(o).toggleClass("secondMenuactive",true);}}
function selMSub(o){if(o){secondMenuactiveSub=o;allSubInsecondMenuactive();$(o).toggleClass("secondMenuactive",true);}}
function allSubInsecondMenuactive(){$("tr.subLevel td").removeClass("secondMenuactive");}
function doClick(obj){try{var evt=document.createEvent("MouseEvents");evt.initMouseEvent("click",true,true,window,0,0,0,0,0,false,false,false,false,0,null);obj.dispatchEvent(evt);}catch(er){obj.click();}}
function AddToBasket(){$.post("AddToCartPublic.aspx",$("#aspnetForm").serialize(),function(data){var htmltxt=data.toString();var scriptCartVarStart=htmltxt.lastIndexOf('ShowBasket');var endset=0;for(i=scriptCartVarStart;i<(scriptCartVarStart+100);i++){if(htmltxt.substr(i,1)===";"){endset=i;}}
var showbasketfunc=htmltxt.toString().substring(htmltxt.lastIndexOf('ShowBasket'),endset);eval(showbasketfunc);});}
function ShowBasket(articleCount,newArticleCount,isCurrentUser){if(articleCount==null||isNaN(parseInt(articleCount,10)))articleCount=0;var o1=document.getElementById("ShoppingCartCount");o1.innerHTML=articleCount.toString();var oLink=getLastChildElement(o1.parentNode);if(oLink!=null&&oLink.style!=null)oLink.style.display=(articleCount==0?'none':'');}
