var Parameters = {
CompanyID     : "TGL",
CompanyName   : "Total Gym Fitness, LLC",
CompanyURL    : "www.totalgymdirect.com",
ProductID     : "TGL",
isNewSession  : false,
isInternalIP  : false,
isTestMode    : false,
Source        : "TGL11163",
SalesPhone    : ""
}
if (Parameters.isNewSession && typeof EAC != 'undefined') {
EAC.defaults.trans_sid = "";
EAC.Remote({fn:'isBlackListed',async:true});
Parameters.isNewSession = false;
}
var jscripts= '1.3';
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;}
}
} else {
EAC.defaults.trans_sid = "";
}
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();
}
}
function setSalesPhone() {
if (!Parameters.SalesPhone) return;
var phone = document.getElementById('SalesPhone');
if (!phone) return;
var phone_div = document.createElement("div");
$(phone_div).setStyle({position: 'absolute', top:'20px', right:'15px', width:'200px', height:'3em', textAlign:'center', color:'green', backgroundColor:'white'});
phone_div.innerHTML = "To order by phone<br />";
var phone_num = document.createElement("span");
$(phone_num).setStyle({fontSize: '1.25em', fontWeight: 'bold'});
phone_num.innerHTML = Parameters.SalesPhone;
phone.appendChild(phone_div);
phone_div.appendChild(phone_num);
}