function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=1,statusbar=0,menubar=0,resizable=1,width=590,height=490,left = 250,top = 200');");
}


function PopupPic(sPicURL) { 
width=50;
height=50;
winLeft = (screen.availWidth-width)/2; 
winTop = (screen.availHeight-(height+110))/2;

     window.open( "popup.htm?"+sPicURL, "",  "location=0, status=0, resizable=0, HEIGHT=250, width=250, left=" + winLeft + ",top=" + winTop); 
}


home_header = new Image
frame_header = new Image
finish_header = new Image
coverings_header = new Image
product_header = new Image
default_header = new Image
contact_header = new Image

home_header.src = "http://www.couturesofa.co.uk/images/home.gif"
frame_header.src = "http://www.couturesofa.co.uk/images/frames.gif"
finish_header.src = "http://www.couturesofa.co.uk/images/finish.gif"
product_header.src = "http://www.couturesofa.co.uk/images/product.gif"
coverings_header.src = "http://www.couturesofa.co.uk/images/coverings.gif"
contact_header.src = "http://www.couturesofa.co.uk/images/contact.gif"
default_header.src = "http://www.couturesofa.co.uk/images/home.gif"

window.onload=swapGraphic

function swapGraphic() {

	if (document.images) {

	currentURL = document.URL
	
	switch(currentURL) {
		case "http://www.couturesofa.co.uk/index.html":	
			document.headergraphic.src = home_header.src
			break

		case "http://www.couturesofa.co.uk/product.html":	
			document.headergraphic.src = product_header.src
			break

		case "http://www.couturesofa.co.uk/frames.html":	
			document.headergraphic.src = frame_header.src
			break

		case "http://www.couturesofa.co.uk/coverings_fillings.html":	
			document.headergraphic.src = coverings_header.src
			break

		case "http://www.couturesofa.co.uk/finish.html":	
			document.headergraphic.src = finish_header.src
			break
		case "http://www.couturesofa.co.uk/contact.html":	
			document.headergraphic.src = contact_header.src
			break
		default:
			document.headergraphic.src = default_header.src
			break
}}}