function showDD(){
	var dropMenu = document.getElementById("drop_menu_holder");
	var width_cbo = document.getElementById("width");

	if(dropMenu.style.display=="none"){
		dropMenu.style.display = "block";
		if(width_cbo){ width_cbo.style.display = "none"; }
	} else {
		dropMenu.style.display = "none";
		if(width_cbo){ width_cbo.style.display = "inline"; }
	}
}

function changeProduct(id,which,name,img){
	
	var productID = document.getElementById("product_id");
	var content = document.getElementById("product_left");
	
	productID.innerHTML = "<img src='imgs/thumbs/"+img+"' alt='"+name+"' />"+name+"<img id=\"oc_btn\" src=\"imgs/dd_btn.gif\" alt=\"open the menu\" />";
	
	if(!xmlHttp){
		var xmlHttp;
		try {
			// Firefox, Opera 8.0+, Safari
			xmlHttp=new XMLHttpRequest();
		}
		catch (e) {
			// Internet Explorer
			try {
				xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch (e) {
				try {
					xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
				}
				catch (e) {
					//broswer doesn't support ajax, use fall back
					return true;
				}
			}
		}
	}
	
	xmlHttp.onreadystatechange=function() {
		if(xmlHttp.readyState==4) {
			
			//print the text and then change the class of the link
			content.innerHTML = xmlHttp.responseText;
			
		} else if(xmlHttp.readyState==1){
			//show the loading image
			content.innerHTML = "<img src='imgs/loading.gif' alt='loading' />";
		}
	}
	
	showDD();
    
	xmlHttp.open("GET","productFetcher.php?which="+which+"&id="+id,true);
    xmlHttp.send(null);
	return false;
}
