﻿// JScript file for addict.co.uk

    function newWindow(URL,name,width,height) {
        day = new Date();
        id = day.getTime();
        eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=" + width + ",height=" + height + ",resizable=1');");
        return false;
    }
    
    function helpPopup(URL) {
        day = new Date();
        id = day.getTime();
        eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=633,resizable=1');");
        return false;
    }

    var image = new Array();
    function ProductPreload(images){
		for (var i = 0; i < images.length; i++) {
		    image[i] = new Image();
            image[i].src = images[i];
        }
    }
            
    function ProductOpen(image){
		var div = document.getElementById("productListingShadow");
		var imageE = document.getElementById("image");

		imageE.src = ProductPopupImages[image];
		div.style.display = 'block';
		return false;
	}
	function ProductClose(){
		var div = document.getElementById("productListingShadow");
		div.style.display = 'none';
		return false;
	}
	
	function PopupPic(sPicURL) {
		//window.open( "/furniture/scripts/popup.htm?"+sPicURL, "", "resizable=1,HEIGHT=200,WIDTH=300");
		window.open( "/furniture/scripts/" + sPicURL, "", "resizable=1,HEIGHT=200,WIDTH=300");
	}

    function helpPopupResize(URL) {
		day = new Date();
        id = day.getTime();
        strURL = '/furniture/images/help/' + URL;
        newImg=new Image();
		newImg.src=strURL;
		iWidth = newImg.width;
		iHeight = newImg.height;
        eval("page" + id + " = window.open('" + strURL + "', '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=" + iWidth + ",height=" + iHeight + "');");
        return false;
    }