function getIETop(whichelement) {
var toppos = whichelement.offsetTop;
var parentelement = whichelement.offsetParent;
while (parentelement != null) {
toppos += parentelement.offsetTop;
parentelement = parentelement.offsetParent;
}
return toppos;
}
function getIELeft(whichelement) {
var leftpos = whichelement.offsetLeft;
var parentelement = whichelement.offsetParent;
while (parentelement != null) {
leftpos += parentelement.offsetLeft;
parentelement = parentelement.offsetParent;
}
return leftpos;
}
var bannerImg = new Array();
var bannerText = new Array();
var bannerUrl = new Array();
/*var myCSS = new Asset.css('/styles/jsenabled.css'); //rewritten below to fix SLI redirection problem */
document.write('');
/*if ((document.location).toString().indexOf('party-supply.centurynovelty') != -1) {
if (!Browser.Engine.trident) {
document.write('
');
link.inject(actiondiv);
}
var playpause = new Element('div', {
'id': 'bs_pp',
'class': 'playpause',
'events': {
'click': function() {
togglebannerrotation();
}
}
});
playpause.set('html', ' ');
playpause.inject(actiondiv);
$('banner_actions').set('html', '');
$('banner_actions').adopt(actiondiv);
var rotatebanner = function() {
if (activeBanner < bannerImg.length - 1) {
swapbanner(activeBanner + 1);
} else {
swapbanner(0);
}
}
bannerRotating = true;
rotatetimer = rotatebanner.periodical(7500);
}
swapbanner(startBanner);
}
} else {
$$('.banner_img','.banner_link').each(function(el) {
el.setStyle('visibility', 'visible');
});
}
/* --- Content supporting text ------------------------ */
$$('#itemdetail_supportnav a').each(function(el) {
el.onclick = function() { return false };
});
var detailAccordion = new Accordion($('itemdetail_supportcontent'), '.supportnav li', 'div.supporttextcontainer', {
duration: 250,
show: 0,
opacity: false,
alwaysHide: false,
onActive: function(toggler, element) {
toggler.className = 'active';
},
onBackground: function(toggler, element) {
toggler.className = '';
}
});
/* --- Check availability ------------------------ */
if ($('btn_checkavailability')) {
var availOverlayVisible = false;
var availReq = new Request.HTML({url: '/inventoryCheckOverlay.jsp?productId=' + $('btn_checkavailability').getAttribute('rel'),
onSuccess: function(html) {
$('availoverlay').setStyle('opacity', 0);
$('availoverlay').adopt(html);
// $('availoverlay').setStyle('display', 'block');
$('availoverlay').fade(1);
availOverlayVisible = true;
$('checkavailability_img').src = '/images/common/howsoon.gif';
$('avail_close').onclick = function() {
// $('availoverlay').setStyle('display', 'none');
$('availoverlay').fade(0);
availOverlayVisible = false;
}
var tips = $$('.tip');
tips.each(function(item,index) {
var thisItem = item;
item.addEvent('mouseover', function() {
getShippingText(index.toString(), thisItem);
});
item.addEvent('mouseout', function() {
exit();
});
});
},
onFailure: function() {
$('availoverlay').set('text', 'The request failed.');
availOverlayVisible = false;
}
});
$('btn_checkavailability').onclick = function() {
if (!availOverlayVisible) {
availReq.cancel();
if (!Browser.Engine.trident) {
$('availoverlay').setStyle('left', $('btn_checkavailability').getPosition().x - 324);
$('availoverlay').setStyle('top', $('btn_checkavailability').getPosition().y - 22);
} else {
$('availoverlay').setStyle('left', getIELeft($('btn_checkavailability')) - 324);
$('availoverlay').setStyle('top', getIETop($('btn_checkavailability')) - 22);
}
$('availoverlay').set('html', '');
$('checkavailability_img').src = '/images/common/howsoon_checking.gif';
availReq.send();
}
return false;
};
}
/* --- Enlarge photo overlay ------------------------ */
var enlargeOverlayVisible = false;
var detailReq = new Request.HTML({
onSuccess: function(html) {
$('enlargephotooverlay').empty();
$('enlargephotooverlay').setStyle('opacity', 0);
$('enlargephotooverlay').adopt(html);
turnOffSelects.run();
$('enlargephotooverlay').setStyle('left', $('enlargephotooverlay').getPosition().x - ($('enlargephotooverlay').getCoordinates().width / 2));
$('enlargephotooverlay').setStyle('top', $('enlargephotooverlay').getPosition().y - ($('enlargephotooverlay').getCoordinates().height / 2));
if ($('enlargephotooverlay').getPosition().y < 0) {
$('enlargephotooverlay').setStyle('top', 0);
}
$('enlargephotooverlay').set('tween', { delay: 100 });
$('enlargephotooverlay').tween('opacity', 1);
$('enlargephotooverlay_close').onclick = function() {
$('enlargephotooverlay').fade(0);
turnOnSelects.run();
enlargeOverlayVisible = false;
}
enlargeOverlayVisible = true;
},
onFailure: function() {
$('enlargephotooverlay').set('text', 'The request failed.');
enlargeOverlayVisible = false;
}
});
if ($$('tr.items_img a').length > 0) {
var enlDiv = new Element('div', {
'id': 'enlargephotobtn',
'events': {
'click': function() {
}
}
});
enlDiv.set('html', '
');
enlDiv.inject(document.body);
}
var enltimer = null;
var enlholder = null;
if ($('enlargephotooverlay')) {
$('enlargephotooverlay').addEvent('mouseover', function() {
turnOffEnlButton.run();
});
}
var turnOffEnlButton = function() {
if ($('enlargephotobtn')) {
$('enlargephotobtn').setStyle('display', 'none');
enlholder = null;
}
}
if ($('enlargephotobtn')) {
$('enlargephotobtn').addEvent('mouseover', function() {
$clear(enltimer);
});
}
$$('tr.items_img a').addEvent('mouseover', function() {
$clear(enltimer);
if (!Browser.Engine.trident) {
$('enlargephotobtn').setStyle('left', this.getPosition().x + (this.getCoordinates().width / 2) - 38);
$('enlargephotobtn').setStyle('top', this.getPosition().y + this.getCoordinates().height - 26);
} else {
$('enlargephotobtn').setStyle('left', getIELeft(this) + (this.getCoordinates().width / 2) - 38);
$('enlargephotobtn').setStyle('top', getIETop(this) + this.getCoordinates().height - 26);
}
$('enlargephotobtn').setStyle('display', 'block');
enlholder = this;
$('enlargephotobtn').addEvent('click', function() {
detailReq.cancel();
var relstr = enlholder.getAttribute('rel');
var itemstr = relstr.substr(0, relstr.indexOf(':'));
var catstr = relstr.substr(relstr.indexOf(':') + 1);
if (!Browser.Engine.trident) {
$('enlargephotooverlay').setStyle('left', enlholder.getPosition().x + (enlholder.getCoordinates().width / 2));
$('enlargephotooverlay').setStyle('top', enlholder.getPosition().y + (enlholder.getCoordinates().height / 2));
} else {
$('enlargephotooverlay').setStyle('left', getIELeft(enlholder) + (enlholder.getCoordinates().width / 2));
$('enlargephotooverlay').setStyle('top', getIETop(enlholder) + (enlholder.getCoordinates().height / 2));
}
$('enlargephotooverlay').set('html','');
$('enlargephotooverlay').setStyle('opacity', 0);
detailReq.send({url: '/enlargePhotoOverlay.jsp?item=' + itemstr + '&category=' + catstr});
});
});
$$('tr.items_img a').addEvent('mouseout', function() {
enltimer = turnOffEnlButton.delay(100);
});
$$('div.search_item_img a').addEvent('mouseover', function() {
$clear(enltimer);
if (!Browser.Engine.trident) {
$('enlargephotobtn').setStyle('left', this.getPosition().x + (this.getCoordinates().width / 2) - 38);
$('enlargephotobtn').setStyle('top', this.getPosition().y + this.getCoordinates().height - 26);
} else {
$('enlargephotobtn').setStyle('left', getIELeft(this) + (this.getCoordinates().width / 2) - 38);
$('enlargephotobtn').setStyle('top', getIETop(this) + this.getCoordinates().height - 26);
}
$('enlargephotobtn').setStyle('display', 'block');
enlholder = this;
$('enlargephotobtn').addEvent('click', function() {
detailReq.cancel();
var relstr = enlholder.getAttribute('rel');
var itemstr = relstr.substr(0, relstr.indexOf(':'));
var catstr = relstr.substr(relstr.indexOf(':') + 1);
if (!Browser.Engine.trident) {
$('enlargephotooverlay').setStyle('left', enlholder.getPosition().x + (enlholder.getCoordinates().width / 2));
$('enlargephotooverlay').setStyle('top', enlholder.getPosition().y + (enlholder.getCoordinates().height / 2));
} else {
$('enlargephotooverlay').setStyle('left', getIELeft(enlholder) + (enlholder.getCoordinates().width / 2));
$('enlargephotooverlay').setStyle('top', getIETop(enlholder) + (enlholder.getCoordinates().height / 2));
}
$('enlargephotooverlay').set('html','');
$('enlargephotooverlay').setStyle('opacity', 0);
detailReq.send({url: '/enlargePhotoOverlay.jsp?item=' + itemstr + '&category=' + catstr});
});
});
$$('div.search_item_img a').addEvent('mouseout', function() {
enltimer = turnOffEnlButton.delay(100);
});
});
function getShippingText(whichOption, caller) {
var s = "";
switch (whichOption) {
case "0":
s = "
Standard Shipping: Select this option if your order does not require rush processing or delivery. Most in-stock orders placed before 5:00PM ET will ship the same business day. In-stock orders placed after 5:00PM ET or on weekends and holidays should ship the following business day. Standard shipping usually takes from 3 to 6 business days to arrive.
"; break; case "1": s = "3 Business Days Shipping: Select this option to guarantee your merchandise's arrival by the end of the 3rd business day. All in-stock orders placed before 5:00PM ET will ship the same day and arrive 3 business days later. In-stock orders placed after 5:00PM ET or on weekends and holidays will ship the following business day.
For example: If you select this option before 5:00PM ET on Monday, your order will arrive Thursday. If you select this option after 5:00PM ET on Friday, your order will arrive Thursday.
"; break; case "2": s = "2 Business Days Shipping: Select this option to guarantee your merchandise's arrival by the end of the 2nd business day. All in-stock orders placed before 5:00PM ET will ship the same day and arrive 2 business days later. In-stock orders placed after 5:00PM ET or on weekends and holidays will ship the following business day.
For example: If you select this option before 5:00PM ET on Monday, your order will arrive Wednesday. If you select this option after 5:00PM ET on Friday, your order will arrive Wednesday.
"; break; case "3": s = "Next Business Day Shipping: Select this option to guarantee your merchandise's arrival by the end of the next business day. All in-stock orders placed before 5:00PM ET will ship the same day and arrive the following business day. In-stock orders placed after 5:00PM ET or on weekends and holidays will ship the following business day.
For example: If you select this option before 5:00PM ET on Monday, your order will arrive Tuesday. If you select this option after 5:00PM ET on Friday, your order will arrive Tuesday.
"; break; case "4": s = "Alaska and Hawaii: Orders shipped to Alaska and Hawaii should be delivered within 5-8 business days depending on location. To guarantee reliable and efficient deliveries, we exclusively utilize UPS Standard/Ground service for these locations.
"; break; case "5": s = "APO/FPO: To guarantee reliable and efficient deliveries, as well as to comply with government restrictions, we exclusively utilize USPS Priority Mail service for these locations. Although we ship most in stock orders the same business day, we are unable to provide delivery time estimates as that depends on the final destination.
Please note that USPS Priority Mail to APO/FPO locations is uninsured and not trackable. Century Novelty is not responsible for lost or damaged shipments.
"; break; case "6": s = "Canada: Orders shipped to Canada should be delivered within 4-8 business days depending on location. To guarantee reliable and efficient deliveries, we exclusively utilize UPS International Ground to Canada.
*Please note these rates are only for shipping. All taxes, duties and brokerage fees incurred during transit will be collected at the time of delivery. Sadly, "Free Trade" isn't completely free. Please contact your local Customs office for details on how these charges are calculated in your locale.
"; break; case "7": s = "International Orders: You can now ship internationally online at any time! But due to the high cost of international order processing, only orders greater than USD$200 can ship outside the US and Canada. For security reasons, we cannot ship to Nigeria or other countries with abnormal fraud rates.
To guarantee reliable and efficient deliveries, we utilize UPS services for these locations. The following services are available to many locations around the world:
The rates for these services are based on the weight and distance shipped. The carrier will collect any duties, brokerage charges, local taxes, and any other charges incurred during transit at the time of delivery. Please contact your local Customs office for details on how these charges are calculated in your locale.
If you are ready to place your international order, you may do so through this website. After completing your order, please email Info@CenturyNovelty.com your order number, the date by which you need the merchandise, and any preference on shipping carriers. We will use this information to email you a shipping estimate.
If you are not yet ready to place your international order, for more information or for a shipping estimate please email Info@CenturyNovelty.com. Please be sure to include the item numbers of the products you are interested in, your complete shipping address information, and how quickly you need the order.
Please note all prices are in US Dollars and all customer service is conducted in English.
"; break; case "8": s = "The \"Delivered By\" date is guaranteed when all items are \"In Stock\". If any item is not \"In Stock\" we will hold your entire order and ship everything together once everything is in stock. When an item is not \"In Stock\" the \"Delivered By\" date is simply an estimate based upon the availability date listed in the cart above. This real-time information is accurate and up-to-date. It is the same information available to Customer Service.
"; break; default: s = "No Help Available."; break; } tooltip(s, caller); } function tooltip(tip, caller) { var lefttpos = null; var toptpos = null; if ($('tooltip') != null) { $('tooltipcontent').set('html', tip); } else { var tooldiv = new Element('div'); tooldiv.id = 'tooltip'; tooldiv.injectInside(document.body); var tooldivcontent = new Element('div'); tooldivcontent.id = 'tooltipcontent'; tooldivcontent.set('html', tip); tooldivcontent.injectInside(tooldiv); var tooldivbot = new Element('div'); tooldivbot.addClass('tooltipbottom'); tooldivbot.injectInside(tooldiv); } if (caller == undefined || caller == null) { if ($$('span.tip').length > 0) { caller = $$('span.tip')[0]; } } if (caller != null) { if (!Browser.Engine.trident) { lefttpos = caller.getPosition().x; toptpos = caller.getPosition().y; } else { lefttpos = getIELeft(caller); toptpos = getIETop(caller); } $('tooltip').setStyle('display', 'block'); $('tooltip').setStyle('left', lefttpos - 6); $('tooltip').setStyle('top', (toptpos - $('tooltip').getCoordinates().height)); } } function exit() { if ($('tooltip')) { $('tooltip').setStyle('display', 'none'); } } function tooltiphtml(turl, caller) { var lefttpos = null; var toptpos = null; var tipReq = new Request.HTML({ onSuccess: function(html) { $('tooltip').setStyle('display', 'block'); $('tooltipcontent').empty(); $('tooltipcontent').adopt(html); $('tooltip').setStyle('left', lefttpos - 6); $('tooltip').setStyle('top', (toptpos - $('tooltip').getCoordinates().height)); if ($('tooltip').getPosition().y < 0) { $('tooltip').setStyle('top', 0); } $('tipclose').onclick = function() { $('tooltip').setStyle('display', 'none'); $('tooltipcontent').empty(); } }, onFailure: function() { $('tooltip').set('text', 'The request failed.'); } }); if ($('tooltip') != null) { $('tooltipcontent').empty(); } else { var tooldiv = new Element('div'); tooldiv.id = 'tooltip'; tooldiv.injectInside(document.body); var tooldivcontent = new Element('div'); tooldivcontent.id = 'tooltipcontent'; tooldivcontent.injectInside(tooldiv); var tooldivbot = new Element('div'); tooldivbot.addClass('tooltipbottom'); tooldivbot.injectInside(tooldiv); } tipReq.cancel(); tipReq.send({url: turl }); if (!Browser.Engine.trident) { lefttpos = caller.getPosition().x; toptpos = caller.getPosition().y; } else { lefttpos = getIELeft(caller); toptpos = getIETop(caller); } $('tooltip').setStyle('display', 'none'); if (!Browser.Engine.trident) { lefttpos = caller.getPosition().x; toptpos = caller.getPosition().y; } else { lefttpos = getIELeft(caller); toptpos = getIETop(caller); } return false; }