if(typeof EAC=='undefined')var EAC={};if(EAC.defaults)EAC.defaults.trans_sid="";EAC.FW={CompanyID:"TGL",ProductID:"TGC",CompanyName:"Total Gym Fitness",CompanyDomain:"totalgymcatalog.com",isNewSession:false,isInternalIP:false,isTestMode:false,SessionID:"1b8fd5117c9c897b75a9c121a1713ee1",Sourcing:{urlkey:"",altkey:"0",KeyCode:"63537",Source:"TGL63537",Medium:"direct",Campaign:"",Creative:"",Segment:"",TagCode:"",Tracking:"1",Description:"Default source code",Referral:"http://192.168.100.250/tools.php",Keywords:"",urlverb:"key",gaCampaign:"TGL63537 [Default source code] (campaign not set)"}}
EAC.Framework=EAC.FW;EAC.altContent=function(element,content){if(!element)return;var keyid=EAC.FW.Sourcing.urlkey||EAC.FW.Sourcing.KeyCode;var x=new Ajax.Updater(element,'altContent.php',{parameters:{key:keyid,content:content,keyfileid:EAC.FW.Sourcing.KeyFileID||'(none)'},evalScripts:true});}
window['altContent']=EAC.altContent;EAC.getUTMValue=function(utmName,cookie){if(utmName){if(utmName!='gclid')utmName='utm_'+utmName;var re=new RegExp('(\\?|&)('+utmName+')=([^&]+)','i');var searchq=re.exec(document.location.search);if(searchq)return searchq[3];}
var utmz=EAC.cookie.get('__utmz');if(cookie&&utmz){var re=new RegExp('(\\.|\\|)('+cookie+')=([^&]+)','i');var searchq=re.exec(utmz);if(searchq)return searchq[3];}
return null;}
EAC.trigger_gaSupport=function(onLoad_or_path){if(document.getElementById('eac_ga_iframe'))return;if(document.cookie.indexOf('__utmc')==-1)EAC.FW.isNewSession=true;EAC.FW.gaAccount1="UA-997241-3";EAC.FW.gaAccount2="UA-997241-3";EAC.FW.gaAccount3="UA-997241-3";var utm_source,utm_medium,utm_campaign,utm_content,utm_term;var url=EAC.defaults.helperPath+'eac_scripts.ga.html?eac=t';if(document.location.search.indexOf('gclid=')!=-1){url+='&gclid='+EAC.getUTMValue('gclid');}else if(document.location.search.indexOf('utm_')!=-1){utm_source=EAC.getUTMValue('source');utm_medium=EAC.getUTMValue('medium');utm_campaign=EAC.getUTMValue('campaign');utm_content=EAC.getUTMValue('content');utm_term=EAC.getUTMValue('term');}else{if(EAC.FW.isNewSession||document.cookie.indexOf('__utmz')==-1||document.location.search.indexOf(EAC.FW.Sourcing.urlverb+'=')!=-1){if(EAC.FW.Sourcing.Referral)
var utm_source=EAC.FW.Sourcing.Referral;else
var utm_source=(document.referrer&&EAC.FW.Sourcing.Medium!='direct')?EAC.parseURL(document.referrer)['domain']:document.location.host||document.location.hostname;utm_medium=EAC.FW.Sourcing.Medium;utm_campaign=encodeURIComponent(EAC.FW.Sourcing.gaCampaign);utm_content=EAC.FW.Sourcing.Creative;if(utm_medium!='direct'&&utm_medium!='organic'&&utm_medium!='ppc'&&utm_medium!='cpc'&&document.referrer&&!EAC.FW.Sourcing.Creative)
utm_content=EAC.parseURL(document.referrer)['path'];if(EAC.FW.Sourcing.Keywords){utm_term=encodeURIComponent(unescape(EAC.FW.Sourcing.Keywords));}else{var re=/(\?|&)(q|p|query|encquery|qt|terms|rdata|qs|wd|text|szukaj|k|searchExpr|search_for|string|search_query|searchfor)=([^&]+)/;var searchq=re.exec(document.referrer);if(searchq)utm_term=encodeURIComponent(unescape(searchq[3]));}
EAC.cookie.erase('__utmz','__utmv');}
if(!EAC.FW.Sourcing.gaCampaign){utm_campaign=utm_content=null;}}
if(utm_source)url+='&utm_souce='+utm_source;if(utm_medium)url+='&utm_medium='+utm_medium;if(utm_campaign)url+='&utm_campaign='+utm_campaign;if(utm_content)url+='&utm_content='+utm_content;if(utm_term)url+='&utm_term='+utm_term;url+=(typeof onLoad_or_path=='string')?'#'+onLoad_or_path:'#'+document.location.pathname;if(document.getElementById('eac_ga_support'))onLoad_or_path=true;if(onLoad_or_path===true){var d=document.getElementById('eac_ga_support')||document.body||document.getElementsByTagName("body")[0];var e=document.createElement("iframe");e.setAttribute("id",'eac_ga_iframe');e.setAttribute("src",url);e.setAttribute("width","0");e.setAttribute("height","0");e.setAttribute("frameborder","0");e.style.visiblity='hidden';d.appendChild(e);}else{document.write("<iframe id='eac_ga_iframe' style='width:0px;height:0px;visibility:hidden;' src='"+url+"'></iframe>");}
EAC.console.log('GA Triggered '+url);EAC.trigger_gaSupport=function(){};}
document.observe('dom:loaded',function(evt){EAC.trigger_gaSupport(true);});document.fire('EAC:FW.load');var jscripts='1.5';var jscript_default_cartshow='cartshow.php';var jscript_default_checkout='purchase.php';if(typeof EAC=='undefined'){var EAC={onThisPage:function(a1,a2,a3,a4,a5,a6){inwindow(a1,a2,a3);return false;},inWindow:function(a1,a2,a3,a4,a5,a6){inwindow(a1,a2,a3);return false;}}}
function addtocart(item,qty,replace){Cart.Add(item,jscript_default_cartshow);}
function showcart(){location.href=jscript_default_cartshow;}
function updatecart(item,qty,was){if(was!=qty)Cart.Update(item,qty,true,true);}
function orderform(item,qty,replace){Cart.Add(item,jscript_default_checkout);}
function preorder(item,qty,gotopage){Cart.Add(item,gotopage);}
function checkout(){if(window.name=='ShoppingCart'){opener.location.replace(jscript_default_checkout);window.close();}else{location.replace(jscript_default_checkout);}}
function cntShopping(){if(window.name=='ShoppingCart'){window.close();}else{history.back();}}
function updateqty(_this,item,was){var qty=_this.value;updatecart(item,qty,was);}
function returnto(page,replace){if(replace){location.replace(page);}else{location.href=page;}}
function hometo(page,replace){if(replace){location.replace(page);}else{location.href=page;}}
function show_privacy(){priWin=window.open('privacy.php','Privacy','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,width=600,height=400');}
function show_security(){secWin=window.open('security.php','Security','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,width=500,height=450');}
function verisign(){sealWin=window.open('https://digitalid.verisign.com/as2/be2a64569d4991d39b3f4c1800eb4c1b',"win",'toolbar=0,location=1,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,width=700,height=450');window.name="mainWin";}
function inwindow(url,width,height,params,event){if(typeof EAC!='undefined'&&typeof EAC.Version!="undefined"){if(width<501){if(event)EAC.onThisPage(url,width,height,event);else EAC.onThisPage(url,width,height);}else EAC.inWindow(url,width,height,params);}else{if(!params)var params='toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1';popup=window.open(url,'popup',params+',width='+width+',height='+height+',top='+10);if(window.focus)popup.focus();}}