	function OpenWindow(action) {
		//alert(action[1]);
		var wf = "";
		wf = wf + "top=10,left=10";
		wf = wf + ",width=" + action[3];
		wf = wf + ",height=" + action[4];
		wf = wf + ",resizable=" + (action[5] ? "yes" : "no");
		wf = wf + ",scrollbars=" + (action[6] ? "yes" : "no");
		wf = wf + ",menubar=" + (action[7] ? "yes" : "no");
		wf = wf + ",toolbar=" + (action[8] ? "yes" : "no");
		wf = wf + ",directories=" + (action[9] ? "yes" : "no");
		wf = wf + ",location=" + (action[10] ? "yes" : "no");
		wf = wf + ",status=" + (action[11] ? "yes" : "no");
		return window.open(action[1],action[2],wf);
	}


	function print_window(site){
			var path = "http://slm.co.uk/cgi-bin/usedcars/compileany.pl?site="+site+"&print=1";
			var prophndl = OpenWindow(new Array(0,path,'print',780,800,0,1,0,0,0,0,0));
	}

	function CARLISTswappic(contianer,num){	
		//alert('swap pic = '+nm);
		var c = document.getElementById(contianer);
		if (c){
			var divs = c.getElementsByTagName('div');

			if (divs){
				for (var x=0;x<divs.length ;x++ ){
					divs[x].style.display = (x==num)?"block":"none";
				}
			}else{
				alert ("divs not found inside the div named '"+contianer+"'")
			}	
		}else{
			alert ("div '"+contianer+"' not found")
		}

	}

