pagingArray = new Array();

function placeFooter(){

if(document.getElementById('leftColumn') && document.getElementById('rColTop') && document.getElementById('rColbot')){
lColObj = document.getElementById('leftColumn');
rColTopObj = document.getElementById('rColTop');
rColbotObj = document.getElementById('rColbot');

rColbotObj.style.display = "block";

lHeight = lColObj.clientHeight;
rHeight1 = rColTopObj.clientHeight;
rHeight2 = rColbotObj.clientHeight;

//alert(lHeight + "\n" + rHeight1  + "\n" + rHeight2)

rHeight = rHeight1+rHeight2;

if(lHeight>=rHeight){

	lHeight1=lHeight - rHeight2;
	rColbotObj.style.marginTop = lHeight1 + "px";
}
else {
	rColbotObj.style.marginTop = rHeight1 + "px";
	lColObj.style.height = rHeight + "px";
}

rColbotObj.style.visibility = "visible";
}
}

var go = true;
if (document.location.toString().indexOf('?refreshme=true')!=-1) {
SetCookie('refreshed','true');
go=false;
document.location=document.location.toString().split('?')[0];
}
if (GetCookie('refreshed')=='true' && go) {
SetCookie('refreshed','false');
document.location.reload();
}

var moretxtvalue='';
var nRec = 0;
var related = new Array();
var CurrItemId='addcook';
var ie = false;
var ns6 = false;
var ns = false;
var opera = false;

if (eval(document.layers)) { ns=true; }
else {
    if (eval(document.all)) { ie=true; if (navigator.userAgent.indexOf('Opera')!=-1) opera=true;}
        else {
            if (eval(document.getElementById)) { ns6=true;}
            }
    }
//finds and return <DIV> object by given name

function Layer(layerName) {
return (ns)?(document.layers[layerName]):((ns6)?(document.getElementById(layerName)):(document.all(layerName)));
}

function enlarge(url,imgw,imgh) {
var leftPos = (screen.availWidth-900) / 2;
var topPos = (screen.availHeight-600) / 2;
imgw=eval(imgw)+20; if (imgw > 800) imgw = 800;
imgh=eval(imgh)+30; if (imgh > 600) imgh = 600;
window.open(url, 'EnlargePicture','width='+imgw+',height='+imgh+',scrollbars=no,resizable=no,statusbar=no,location=no,titlebar=0,top=' + topPos + ',left=' + leftPos);
}

function PriceGuarantee() {
var NewPopGuar = new Object();
NewPopGuar=window.open("http://site.affordablelamps.com/custom/priceguarantee.php?link="+pid.toLowerCase(),"pgar","HEIGHT=685,WIDTH=660,scrollbars=yes,resizable=yes,top=50,left=50");
NewPopGuar.window.focus();
}

function Coup() {
var NewPopCoup = new Object();
NewPopCoup=window.open("http://site.affordablelamps.com/offer_pop.htm","disc","HEIGHT=375,WIDTH=625,scrollbars=no,resizable=yes,top=50,left=50");
NewPopCoup.window.focus();
}

function Discount() {
var NewPopDis = new Object();
NewPopDis=window.open("http://site.affordablelamps.com/custom/discount.php?link="+pid.toLowerCase(),"disc","HEIGHT=420,WIDTH=640,scrollbars=no,resizable=yes,top=50,left=50");
NewPopDis.window.focus();
}

function TellToFriend() {
var NewPop = new Object();
NewPop=window.open("http://site.affordablelamps.com/custom/ytellafriend.php?link="+pid.toLowerCase(),"tellafriend","HEIGHT=380,WIDTH=640,scrollbars=no,resizable=yes,top=50,left=50");
NewPop.window.focus();
}

function preloadImages(){
	var d = document;  if(!d.pics) d.pics = [];
	for(var i = 0, a = preloadImages.arguments; i < a.length; i++){
		(d.pics[d.pics.length] = new Image()).src = a[i];
		}
}

//preloadImages('i/menu/i1a.gif','i/menu/i1b.gif','i/menu/i2a.gif','i/menu/i2b.gif','i/menu/i3a.gif','i/menu/i3b.gif','i/menu/i4a.gif','i/menu/i4b.gif','i/menu/i5a.gif','i/menu/i5b.gif','i/menu/i6a.gif','i/menu/i6b.gif','i/menu/i7a.gif','i/menu/i7b.gif');


