function array(total) {
	this.length = total;
	for (var count = 1; count <= total; count++) {
		this[count] = new Image();
	}
	return this;
}

function swap(img,gfx) {
	document.images[img].src = preload[gfx].src;
}

function popupImage(imageURL) {
	window.open("/larger-image.html?"+imageURL,"","resizable=1,height=750,width=496");
} 

function popupWindow(url,width,height) {
	window.open(url,"","resizable=1,height="+height+",width="+width);
}


// AddThis.com Variables //
addthis_offset_top = -164;
addthis_offset_left = -114;
addthis_pub = 'sexylingerieuk';
addthis_brand = 'Amandas Lingerie';
addthis_logo = 'http://www.sexy-lingerie.uk.com/images/popupheader.jpg';
addthis_options = 'favorites, digg, delicious, google, myspace, facebook, stumbleupon, reddit, live, more';


var el="wrapper";
var bgimg=new Array("/images/header-background1.jpg", "/images/header-background2.jpg");
var random=Math.round((bgimg.length-1)*Math.random());
var cssStr="#"+el+" { background: url("+bgimg[random]+") no-repeat top left } ";
var style=document.createElement("style");
style.setAttribute("type","text/css");
if(style.styleSheet){style.styleSheet.cssText=cssStr;
} else {var cssText=document.createTextNode(cssStr);
style.appendChild(cssText);
}
document.getElementsByTagName("head")[0].appendChild(style);

