var NS = document.layers;
var payWind;
var largeWin;
var smallWin;
var arrColours = Array("#FFFF37","#FFFFFF","#CA0000","#C60000");
var origColour;var colour;

function getObject(obj) {var theObj;if (document.all) {if (typeof obj == "string") {return document.all(obj)} else {return obj.style}}
if (document.getElementById) {if (typeof obj == "string") {return document.getElementById(obj)} else {return obj.style}}return null}


function openPop(){
if (payWind && payWind.open && !payWind.closed) payWind.close();

payWind = window.open("","payWind","top=10,left=10,height=450,width=600,resizable,status,toolbar,scrollbars")
}
function openProductWindow(thsAddress){
if (largeWin && largeWin.open && !largeWin.closed) largeWin.close();

largeWin = window.open(thsAddress,"largeWin","top=5,left=5,height=500,width=790,resizable,status,toolbar,menubar,scrollbars")
}
function openProductView(thsImage){
if (smallWin && smallWin.open && !smallWin.closed) smallWin.close();

smallWin = window.open("http://www.sell-smart.co.uk/image.php?imageurl="+thsImage,"","top=5,left=5,height=400,width=400,resizable,status,scrollbars")
}
function openTextPreview(productId,storeId){
if (smallWin && smallWin.open && !smallWin.closed) smallWin.close();

smallWin = window.open("textpreview.php?pdid="+productId+"&sid="+storeId,"","top=5,left=5,height=400,width=400,resizable,status,scrollbars")
}

function openImagePreview(siteAddress,thsImageUrl){
if (smallWin && smallWin.open && !smallWin.closed) smallWin.close();

smallWin = window.open(siteAddress+"imagepreview.php?img="+thsImageUrl,"smallWin","top=5,left=5,height=400,width=500,resizable,status,scrollbars")
}
function goPage(thsPg){
		
	window.open(thsPg,"","top=19,left=5,width=740,height=525,scrollbars,resizable");
	
}
