function getProduct(productid,wattage)
	{
	var strURL="recessed-lu-ajax.php?id="+productid+"&wattage="+wattage;
		var req = getXMLHTTP();
		
		if (req) {
			
			req.onreadystatechange = function() {
				if (req.readyState == 4 && (req.status==200 || window.location.href.indexOf("http")==-1))
					{document.getElementById('main').innerHTML=req.responseText;}
					else if (req.readyState != 4 ){
					document.getElementById('main').innerHTML="<div style='text-align: center; background:none; height:332px;'><br/><br/><br/><img src='images/loading2.gif' style='height:16px; width:16px;'  /> </div>";
					}		
			}			
			req.open("GET", strURL, true);
			req.send(null);
		}
	}
	
function getXMLHTTP() { //fuction to return the xml http object
		var xmlhttp=false;	
		try{
			xmlhttp=new XMLHttpRequest();
		}
		catch(e)	{		
			try{			
				xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch(e){
				try{
				req = new ActiveXObject("Msxml2.XMLHTTP");
				}
				catch(e1){
					xmlhttp=false;
				}
			}
		}
		 	
		return xmlhttp;
    }
	
	
	function productBrowserToggle(target)
	{
	var strURL="/common/product-browser/"+target;
		var req = getXMLHTTP();
		
		if (req) {
			
			req.onreadystatechange = function() {
				if (req.readyState == 4 && (req.status==200 || window.location.href.indexOf("http")==-1))
					{document.getElementById('lu-browser').innerHTML=req.responseText;}
					else if (req.readyState != 4 ){
					document.getElementById('lu-browser').innerHTML="<div style='text-align: center; background:none; height:150px;'><br/><br/><br/><img src='images/loading2.gif' style='height:16px; width:16px;'  /> </div>";
					}		
			}			
			req.open("GET", strURL, true);
			req.send(null);
		}
	}
	
	function getmfg(cmh) {		
				document.getElementById('wattagediv').className= 'lu-step-hide lu-step' ;
				document.getElementById('mdldiv').className= 'lu-step-hide lu-step' ;

		var strURL="modules/lu/manufacturer.php?cmh="+cmh;
		var req = getXMLHTTP();
		
		if (req) {
			
			req.onreadystatechange = function() {
			
				if (req.readyState == 4 && (req.status==200 || window.location.href.indexOf("http")==-1))
					{document.getElementById('mfgdiv').innerHTML=req.responseText;}
					else if (req.readyState != 4 ){
					document.getElementById('mfgdiv').innerHTML="<div style='text-align: center; background:none;'><br/><br/><br/><img src='images/loader-lu.gif' style='height:16px; width:16px;'  /> </div>";
					}
		
			}			
			req.open("GET", strURL, true);
			req.send(null);
		}		
	}
	function getmdl(cmh,mfgid) {		
		document.getElementById('wattagediv').className= 'lu-step-hide lu-step' ;
		document.getElementById('mdldiv').className= 'lu-step' ;
		
		var strURL="modules/lu/model.php?cmh="+cmh+"&mfgid="+mfgid;
		var req = getXMLHTTP();
		
		if (req) {
			
			req.onreadystatechange = function() {
				if (req.readyState == 4 && (req.status==200 || window.location.href.indexOf("http")==-1))
					{document.getElementById('mdldiv').innerHTML=req.responseText;}
					else if (req.readyState != 4 ){
					document.getElementById('mdldiv').innerHTML="<div style='text-align: center; background:none;'><br/><img src='images/loader-lu.gif' style='height:16px; width:16px;'  /> </div>";
					}		
			}			
			req.open("GET", strURL, true);
			req.send(null);
		}
				
	}
	function getwattage(cmh,mdlid) {	
		document.getElementById('wattagediv').className= 'lu-step' ;	
		var strURL="modules/lu/wattage.php?cmh="+cmh+"&mdlid="+mdlid;
		var req = getXMLHTTP();
		
		if (req) {
			
			req.onreadystatechange = function() {
				if (req.readyState == 4 && (req.status==200 || window.location.href.indexOf("http")==-1))
					{document.getElementById('wattagediv').innerHTML=req.responseText;}
					else if (req.readyState != 4 ){
					document.getElementById('wattagediv').innerHTML="<div style='text-align: center; background:none;'><br/><img src='images/loader-lu.gif' style='height:16px; width:16px;'  /> </div>";
					}				
			}			
			req.open("GET", strURL, true);
			req.send(null);
		}
				
	}
	
	function getuni(cmh) {		
		var strURL="modules/lu/universal.php?cmh="+cmh;
		var req = getXMLHTTP();
		
		if (req) {
			
			req.onreadystatechange = function() {
				if (req.readyState == 4) {
					// only if "OK"
					if (req.status == 200) {						
						document.getElementById('unidiv').innerHTML=req.responseText;						
					} else {
						alert("There was a problem while using XMLHTTP:\n" + req.statusText);
					}
				}				
			}			
			req.open("GET", strURL, true);
			req.send(null);
		}
				
	}
	function getproduct2(uniid, cmh) {		
		var strURL="modules/lu/product2.php?cmh="+cmh+"&uniid="+uniid;
		var req = getXMLHTTP();
		
		if (req) {
			
			req.onreadystatechange = function() {
				if (req.readyState == 4) {
					// only if "OK"
					if (req.status == 200) {						
						document.getElementById('product2div').innerHTML=req.responseText;						
					} else {
						alert("There was a problem while using XMLHTTP:\n" + req.statusText);
					}
				}				
			}			
			req.open("GET", strURL, true);
			req.send(null);
		}
				
	}
	function wattage1(id) {		
		var strURL="modules/wattage/table.php?id="+id;
		var req = getXMLHTTP();
		
		if (req) {
			
			req.onreadystatechange = function() {
				if (req.readyState == 4) {
					// only if "OK"
					if (req.status == 200) {						
						document.getElementById('wattagecfl-table').innerHTML=req.responseText;						
					} else {
						alert("There was a problem while using XMLHTTP:\n" + req.statusText);
					}
				}				
			}			
			req.open("GET", strURL, true);
			req.send(null);
		}
				
	}
	function wattage2(id) {		
		var strURL="modules/wattage/table.php?id="+id;
		var req = getXMLHTTP();
		
		if (req) {
			
			req.onreadystatechange = function() {
				if (req.readyState == 4) {
					// only if "OK"
					if (req.status == 200) {						
						document.getElementById('wattagecmh-table').innerHTML=req.responseText;						
					} else {
						alert("There was a problem while using XMLHTTP:\n" + req.statusText);
					}
				}				
			}			
			req.open("GET", strURL, true);
			req.send(null);
		}
				
	}
	function wattage3(id) {		
		var strURL="modules/wattage/table.php?id="+id;
		var req = getXMLHTTP();
		
		if (req) {
			
			req.onreadystatechange = function() {
				if (req.readyState == 4) {
					// only if "OK"
					if (req.status == 200) {						
						document.getElementById('wattagehid-table').innerHTML=req.responseText;						
					} else {
						alert("There was a problem while using XMLHTTP:\n" + req.statusText);
					}
				}				
			}			
			req.open("GET", strURL, true);
			req.send(null);
		}
				
	}
	
	