function initScrollLayer_showcase() {

  // arguments: id of layer containing scrolling layers (clipped layer), id of layer to scroll, 
  // if horizontal scrolling, id of element containing scrolling content (table?)
  var wndo = new dw_scrollObj('showcasewindow', 'showcaselayer', 'showcasediv');
  
  // pass id's of any wndo's that scroll inside tables
  // i.e., if you have 3 (with id's showcasewindow, showcasewindow, wn3): dw_scrollObj.GeckoTableBugFix('showcasewindow', 'showcasewindow', 'wn3');
  dw_scrollObj.GeckoTableBugFix('showcasewindow'); 
}

function refresh_showcase () {
		
	create_xmlhttp_request(1);
	var sid = document.showcase_select_form.showcase_selection.value;
	
	xmlhttp2.open("GET",'/cgi-bin/customers/products.cgi?command=list showcase items&showcase_id='+sid);
	xmlhttp2.onreadystatechange=function(){
		if (xmlhttp2.readyState==4) {
			if (xmlhttp2.status==200) {
				document.getElementById('showcaselayer').innerHTML= xmlhttp2.responseXML.getElementsByTagName('content')[0].firstChild.data;
			}
		}
	}
	xmlhttp2.send(null);
}


function remove_product(pid) {

if (window.confirm('Are you sure you wish to remove this product from the showcase?')) {
	var sid = document.showcase_select_form.showcase_selection.value;

	create_xmlhttp_request();

	xmlhttp.open("GET",'/cgi-bin/customers/products.cgi?command=remove from showcase&product_id=' + pid + '&showcase_id=' + sid );
	xmlhttp.onreadystatechange=function(){
		if (xmlhttp.readyState==4) {
			if (xmlhttp.status==200) {

				document.getElementById('showcaselayer').innerHTML= xmlhttp.responseXML.getElementsByTagName('showcase_list')[0].firstChild.data;

				//parent.showcaseframe.refresh_showcase();

			}
		}
	}	
	xmlhttp.send(null);
	}
}


function remove_showcase_mgt_product(pid,sid) {

if (window.confirm('Are you sure you wish to remove this product from the showcase?')) {

	create_xmlhttp_request();

	xmlhttp.open("GET",'/cgi-bin/customers/products.cgi?command=remove from showcase&product_id=' + pid + '&showcase_id=' + sid );
	xmlhttp.onreadystatechange=function(){
		if (xmlhttp.readyState==4) {
			if (xmlhttp.status==200) {

				document.getElementById('showcase_detail').innerHTML = xmlhttp.responseXML.getElementsByTagName('content')[0].firstChild.data; 

				//load_showcase_management_detail(sid);

			}
		}
	}	
	xmlhttp.send(null);
	}
}



function new_showcase () {
	document.showcase_select_form.showcase_selection.value=0;
	parent.showcaseframe.refresh_showcase();
	
}	