function ppset(){var a=getElm("ppEmailSend");var b=$("div.inMarg");var c=$("#ppdownload");if(b&&c){var d=$("h1:last");if(d!=null){var e=d.position();var f=$("#ppcontent");var g=$("div.pprContainer");if(e!=null&&e.top!=null){c.css("top",e.top+d.height()+25);c.css("left",f.position().left-581);c.css("display","block");if(g.height()>b.height()-d.height()-25){g.css("height",g.height()+25);b.css("height",g.height()+d.height()+25)}else{g.css("height",b.height()-d.height()-25)}if(pptabscurrentvalue!=null&&pptabscurrentvalue.value!=undefined&&pptabscurrentvalue.value!=""){$("input[type=checkbox]").each(function(){this.checked=false});switchTab(pptabscurrentvalue.value)}}if(typeof ClickTaleExec=="function")ClickTaleExec("ppset()")}}}function ppLangShift(a,b){if(eIDflagsTable){eIDflagsTable=getElm("ppFlags");elRows=eIDflagsTable.rows[0];for(i=0;i<elRows.cells.length;i++){if(i>=a-1&&i<=b-1)elRows.cells[i].style.display="";else elRows.cells[i].style.display="none"}if(ppLangDocsTotal!=null){for(i=0;i<ppLangDocsTotal.length;i++){var c=ppLangDocsTotal[i];if(c){c=c.rows[0];for(j=0;j<c.cells.length;j++){if(j>=a-1&&j<=b-1)c.cells[j].style.display="";else c.cells[j].style.display="none"}}}}}}function switchTab(a){var b,c;if(a!=null){if(pptabscurrentvalue!=null)pptabscurrentvalue.value=a;for(b=0;b<tabNavDiv.childNodes.length;b++){if(tabNavDiv.childNodes[b].id==a){tabNavDiv.childNodes[b].className="tab activeTab"}else{tabNavDiv.childNodes[b].className="tab inactiveTab"}}for(c=0;c<tabNavDivResults.childNodes.length;c++){if(tabNavDivResults.childNodes[c].id!=null){if(tabNavDivResults.childNodes[c].id.indexOf("Container")!=-1){if(tabNavDivResults.childNodes[c].id==a+"Container"){tabNavDivResults.childNodes[c].style.display="block"}else{tabNavDivResults.childNodes[c].style.display="none"}}}}if(a.indexOf("ppTabCert")!=-1||a.indexOf("ppTabSoft")!=-1)ppResizeLayer(a);if(typeof ClickTaleExec=="function")ClickTaleExec("switchTab('"+a+"')")}}function ppResizeLayer(a){var b=$("div.inMarg");var c=$("div.pprContainer");var d=$("h1:last");var e=$("#certMail");var f;if(a.indexOf("ppTabCert")!=-1){f=$("div.ppdlCert")}if(a.indexOf("ppTabSoft")!=-1){f=$("#ppdlSoftBlock")}if(f!=undefined){if(f.height()>=b.height()-d.height()-50){c.css("height",f.height()+e.height()+125);b.css("height",c.height()+d.height()+125)}}}function addAutocomplete(a,b,c,d){var e=[];var f=$("input.search");var g=$(".searchBox");var h=$("input#topRightControl_submitBTN");var i=$(".searchBtn");$.getJSON(a+"/ProductCodes.txt",null,function(a){$.each(a,function(a,f){var g=f.code;if(b=="true"){if(f.code.indexOf("US_")!=-1){e.push(f.code.substr(3,g.length))}}else{if(c=="true"){if(f.code.indexOf("UM_")!=-1){e.push(f.code.substr(3,g.length))}}else{if(d=="true"){if(!(f.code.indexOf("UM_")!=-1||f.code.indexOf("US_")!=-1)){if(f.code.indexOf("PL_")!=-1){e.push(f.code.substr(3,g.length))}else{e.push(f.code)}}}else{if(!(f.code.indexOf("UM_")!=-1||f.code.indexOf("US_")!=-1||f.code.indexOf("PL_")!=-1)){e.push(f.code)}}}}});f.autocomplete({source:function(a,b){var c=$.ui.autocomplete.escapeRegex(a.term);var d=new RegExp("^"+c,"i");var f=$.grep(e,function(a,b){return d.test(a)});b(f)},select:function(a,b){f.val(b.item.label);h.trigger("click")},minLength:1,mustMatch:true,matchSubset:false,scrollHeight:170,highlight:true});g.autocomplete({source:function(a,b){var c=$.ui.autocomplete.escapeRegex(a.term);var d=new RegExp("^"+c,"i");var f=$.grep(e,function(a,b){return d.test(a)});b(f)},select:function(a,b){g.val(b.item.label);i.trigger("click")},minLength:1,matchContains:false,matchSubset:false,scrollHeight:170,highlight:true,autofill:false,formatMatch:true})})}function setSiteLanguage(a,b,c){if(b!=""&&a!=""&&c!=""){cform=document.getElementsByName(b)[0];if(cform!=null){cform.value=a;setTimeout("__doPostBack('"+c+"','')",0)}}}function addUnloadEvent(a){var b=window.onunload;if(typeof window.onunload!="function"){window.onunload=a}else{window.onunload=function(){b();a()}}}function addLoadEvent(a){var b=window.onload;if(typeof window.onload!="function"){window.onload=a}else{window.onload=function(){if(b){b()}a()}}}function imagePreview(a,b,c){c+=80;b+=15;var d=100;var e=100;popup=window.open("","Preview","toolbar=0,resizable=1,status=0,menubar=0,scrollbars=0,titlebar=0,location=0,width="+b+"px ,height="+c+"px ,top="+e+"px,left="+d+"px","false");popup.resizeTo(b,c);popup.document.open();popup.document.write("<html><title>Preview</title>");popup.document.write('<body style="margin: 0 0 0 0;" onload = "javascript: var timer = setTimeout(\'window.focus();\',100); ">');popup.document.write("<img hspace=0 vspace=0 "+'src="'+a+'" onclick="window.close();" />');popup.document.write("</body></html>");popup.document.close()}function doClose(a){if(getElm(a))getElm(a).style.visibility="hidden";return false}function HoldOpenNavItems(a){return;var b="HoldOpenNavItems_"+a;var c=getCookie(b);if(c==null||c==""){setCookie(b,"1")}else{setCookie(b,"1",-1e3)}}function setCookie(a,b,c){var d=new Date;d.setDate(d.getDate()+c);document.cookie=a+"="+escape(b)+(c==null?"":";expires="+d.toGMTString())}function getCookie(a){if(document.cookie.length>0){c_start=document.cookie.indexOf(a+"=");if(c_start!=-1){c_start=c_start+a.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1)c_end=document.cookie.length;return unescape(document.cookie.substring(c_start,c_end))}}return""}function dropdown(a){var b,c;c=a.options[a.selectedIndex].value;if(c=="stay")return false;if(c){var d=new Array;d=c.split("~|||~");if(!window)return true;if(d[1]=="_top")window.location=d[0];else if(d[1]=="_blank")window.open(d[0])}return false}function DoClickByID(a,b){var c=getElm(a);if(b=="true"){if(c!=null){c.click();return true}}else{var d=c.getAttribute("href");if(d!=""){top.location.href=d}}}function DoClick(a){if(a!=""){top.location.href=a}}function getElm(a){return document.getElementById(a)}var isMobile=false;if(navigator.userAgent.match(/iPhone|iPad|android|blackberry|palm os|windows ce|opera mobi|symbian/i)){isMobile=true}
