function UseAlternativeBestSellersOverlay()
{
return (document.getElementById('bestSellDetBoxB') ? true : false);
}
function DisplayBestSellerRank(rank)
{
var useAltOverlay = UseAlternativeBestSellersOverlay();
var bestSellDetBoxMain = document.getElementById(useAltOverlay ? 'bestSellDetBoxMain' : 'bestSellDetBox');
var bestSellDetBox = document.getElementById(useAltOverlay ? 'bestSellDetBoxB' : 'bestSellDetBox');
if( bestSellDetBox && bestSellDetBoxMain )
{
bestSellDetBox.innerHTML = GetBestSellerDivHTML(rank);
bestSellDetBoxMain.style.visibility = "visible";
if( document.getElementById('rotator') )
{
HideRotator();
}
}
}
function getScrollXY() {
var scrOfX = 0, scrOfY = 0;
if( typeof( window.pageYOffset ) == 'number' ) {
//Netscape compliant
scrOfY = window.pageYOffset;
scrOfX = window.pageXOffset;
} else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
//DOM compliant
scrOfY = document.body.scrollTop;
scrOfX = document.body.scrollLeft;
} else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
//IE6 standards compliant mode
scrOfY = document.documentElement.scrollTop;
scrOfX = document.documentElement.scrollLeft;
}
return [ scrOfX, scrOfY ];
}
function DelayedRestoreBestSellerRank(event)
{
var bestPromos = document.getElementById('bestPromos');
if( bestPromos )
{
offsetXY = getScrollXY();
var mouseX = (event.pageX ? event.pageX : (window.event.clientX + offsetXY[0]));
var mouseY = (event.pageY ? event.pageY : (window.event.clientY + offsetXY[1]));
if( !IsInsideElement(bestPromos, mouseX, mouseY) )
RestoreBestSellerRank(); // no delay
}
}
function RestoreBestSellerRank()
{
var useAltOverlay = UseAlternativeBestSellersOverlay();
var bestSellDetBoxMain = document.getElementById(useAltOverlay ? 'bestSellDetBoxMain' : 'bestSellDetBox');
if( bestSellDetBoxMain )
{
bestSellDetBoxMain.style.visibility = "hidden";
if( document.getElementById('rotator') )
{
ShowRotator();
}
}
}
function IsInsideElement(obj, x, y)
{
oTop = GetElementAbsoluteTop(obj);
oLeft = GetElementAbsoluteLeft(obj);
oBottom = oTop + obj.offsetHeight;
oRight = oLeft + obj.offsetWidth;
return (x > oLeft && x < oRight && y > oTop && y < oBottom);
}
function GetElementAbsoluteLeft(o)
{
// Get an object left position from the upper left viewport corner
oLeft = o.offsetLeft; // Get left position from the parent object
while(o.offsetParent!=null) { // Parse the parent hierarchy up to the document element
oParent = o.offsetParent; // Get parent object reference
oLeft += oParent.offsetLeft; // Add parent left position
o = oParent;
}
return oLeft; // Return left postion
}
function GetElementAbsoluteTop(o)
{
// Get an object top position from the upper left viewport corner
oTop = o.offsetTop; // Get top position from the parent object
while(o.offsetParent!=null) { // Parse the parent hierarchy up to the document element
oParent = o.offsetParent; // Get parent object reference
oTop += oParent.offsetTop; // Add parent top position
o = oParent;
}
return oTop; // Return top position
}
function GetRatingBoxString(type, rate)
{
return '\
\
\
\
';
}
function GetBestSellerDivHTML(rank)
{
var bsinfo = new Array();
switch(rank)
{
case 1:
bsinfo['prId'] = '34782';
bsinfo['pgId'] = '100';
bsinfo['pfId'] = '1564';
bsinfo['name'] = 'Samsung Eternity';
bsinfo['prFriendlyURL'] = 'samsung-eternity-att';
bsinfo['reviewFriendlyURL'] = '/samsung-eternity-user-reviews';
bsinfo['desc'] = 'Sophisticated and stylish, Samsung抯 Eternity?is the perfect choice for those who crave a full touch experience plus the ... ';
bsinfo['bulletPoints'] = '
Product Price: $399.99
Your Price: FREE
\ '; break; case 2: bsinfo['prId'] = '32869'; bsinfo['pgId'] = '100'; bsinfo['pfId'] = '1303'; bsinfo['name'] = 'T-Mobile Wing'; bsinfo['prFriendlyURL'] = 'tmobile-wing'; bsinfo['reviewFriendlyURL'] = '/htc-wing-user-reviews'; bsinfo['desc'] = 'The Wing is a full-featured Pocket PC, combined with a powerful mobile phone, which puts all the productivity you need in ... '; bsinfo['bulletPoints'] = 'Product Price: $544.99
Your Price: FREE
\ '; break; case 3: bsinfo['prId'] = '34411'; bsinfo['pgId'] = '100'; bsinfo['pfId'] = '1496'; bsinfo['name'] = 'LG Dare'; bsinfo['prFriendlyURL'] = 'lg-dare-verizon-wireless'; bsinfo['reviewFriendlyURL'] = '/lg-dare-user-reviews'; bsinfo['desc'] = 'Take the Dare! This new handset will surpass your expectations with a large 3-inch touch screen that recognizes your ... '; bsinfo['bulletPoints'] = 'Product Price: $429.99
Your Price: FREE
\ '; break; case 4: bsinfo['prId'] = '35057'; bsinfo['pgId'] = '100'; bsinfo['pfId'] = '1503'; bsinfo['name'] = 'Samsung Instinct - Black'; bsinfo['prFriendlyURL'] = 'samsung-instinct-black-sprint'; bsinfo['reviewFriendlyURL'] = '/samsung-instinct-user-reviews'; bsinfo['desc'] = 'There are touchscreens, and then there抯 the Samsung Instinct? The Instinct is the touchscreen that keeps you in touch ... '; bsinfo['bulletPoints'] = 'Product Price: $499.99
Your Price: FREE
\ '; break; case 5: bsinfo['prId'] = '35213'; bsinfo['pgId'] = '100'; bsinfo['pfId'] = '1598'; bsinfo['name'] = 'Samsung Impression'; bsinfo['prFriendlyURL'] = 'samsung-impression-att'; bsinfo['reviewFriendlyURL'] = '/samsung-impression-user-reviews'; bsinfo['desc'] = 'A great choice for those looking for the latest in multimedia and messaging, the Samsung Impression for AT&T offers one of ... '; bsinfo['bulletPoints'] = 'Product Price: $399.99
Your Price: FREE
\ '; break; case 6: bsinfo['prId'] = '34449'; bsinfo['pgId'] = '100'; bsinfo['pfId'] = '1392'; bsinfo['name'] = 'BlackBerry?Curve?8320 Sunset'; bsinfo['prFriendlyURL'] = 'blackberry-curve-8320-sunset-tmobile'; bsinfo['reviewFriendlyURL'] = '/blackberry-8320-user-reviews'; bsinfo['desc'] = 'The BlackBerry Curve is the smallest, lightest BlackBerry ever with a QWERTY keyboard. It features a liquid silver finish ... '; bsinfo['bulletPoints'] = 'Product Price: $474.99
Your Price: FREE
\ '; break; case 7: bsinfo['prId'] = '34716'; bsinfo['pgId'] = '100'; bsinfo['pfId'] = '1408'; bsinfo['name'] = 'LG Voyager?in Titanium'; bsinfo['prFriendlyURL'] = 'lg-voyager-in-titanium-verizon-wireless'; bsinfo['reviewFriendlyURL'] = '/lg-vx10000-user-reviews'; bsinfo['desc'] = 'The new Voyager in Titanium has kept all of the amazing features from the original Voyager, and now includes Visual ... '; bsinfo['bulletPoints'] = 'Product Price: $399.99
Your Price: FREE
\ '; break; case 8: bsinfo['prId'] = '34634'; bsinfo['pgId'] = '100'; bsinfo['pfId'] = '1511'; bsinfo['name'] = 'Samsung Rant - Black'; bsinfo['prFriendlyURL'] = 'samsung-rant-black-sprint'; bsinfo['reviewFriendlyURL'] = '/samsung-sph-m540-rant-user-reviews'; bsinfo['desc'] = 'The Samsung Rant features a messaging-centric form factor in two great colors. This sideways slider hides a full qwerty ... '; bsinfo['bulletPoints'] = 'Product Price: $399.99
Your Price: You make $50.00
\ '; break; case 9: bsinfo['prId'] = '35216'; bsinfo['pgId'] = '100'; bsinfo['pfId'] = '1599'; bsinfo['name'] = 'LG Xenon Blue'; bsinfo['prFriendlyURL'] = 'lg-xenon-blue-att'; bsinfo['reviewFriendlyURL'] = '/lg-xenon-user-reviews'; bsinfo['desc'] = 'Do you like the sleek style of touch screen phones, but aren抰 completely sold on their functionality? Then we suggest the ... '; bsinfo['bulletPoints'] = 'Product Price: $349.99
Your Price: FREE
\ '; break; case 10: bsinfo['prId'] = '34781'; bsinfo['pgId'] = '100'; bsinfo['pfId'] = '1563'; bsinfo['name'] = 'Samsung Behold Espresso'; bsinfo['prFriendlyURL'] = 'samsung-behold-espresso-tmobile'; bsinfo['reviewFriendlyURL'] = '/samsung-behold-user-reviews'; bsinfo['desc'] = 'This is the cell phone designed for capturing those special moments in life. The Samsung Behold features a 5MP camera, ... '; bsinfo['bulletPoints'] = 'Too Low to Show
\
Click to See Price
User Rating
'+bsinfo['user_rate']+'
Expert Rating
'+bsinfo['expert_rate']+'
'+ bsinfo['desc']+'
\
\
';
}
else
{
return '\
\
'+ bsinfo['desc']+'
\