   function makeRequest5(url,with_sign,product_id) {

        var http_request = false;

        if (window.XMLHttpRequest) { // Mozilla, Safari,...
            http_request = new XMLHttpRequest();
            if (http_request.overrideMimeType) {
                http_request.overrideMimeType('text/xml');
                // See note below about this line
            }
        } else if (window.ActiveXObject) { // IE
            try {
                http_request = new ActiveXObject("Msxml2.XMLHTTP");
            } catch (e) {
                try {
                    http_request = new ActiveXObject("Microsoft.XMLHTTP");
                } catch (e) {}
            }
        }

        if (!http_request) {
            alert('Giving up :( Cannot create an XMLHTTP instance');
            return false;
        }
        http_request.onreadystatechange = function() { alertContents(http_request,with_sign,product_id); };
        http_request.open('GET', url, true);
        http_request.send(null);

    }

    function alertContents(http_request,with_sign,product_id) {
		
    	   var Price;
        var Text,Shaded;
        var vars = new Array();
        if (http_request.readyState == 4) {
            if (http_request.status == 200) {
            		
            		Text = http_request.responseText;
            		vars = Text.split(':');
            		Price = vars[0];
            		Shaded = vars[1];
            	//	alert(Shaded);
               	
				if (Shaded == 0 || Shaded == "" || Shaded == "0" || Shaded == null) {
               		Shaded = "0";
				}
				try {
					document.getElementById('shaded').value =Shaded;
					on_change_shades();
					check_global_constraints();
				} catch(e) {
					
				}
				Price = parseInt(Price);	
				if (with_sign == true) {
					if (Price == 0 || Price == "" || Price == "0" ) {
               			Price = "N/A";
               			try {
               				document.getElementById('product_price').value = Price;
                            document.getElementById('product_price').innerHTML = Price;
               			} catch(e) {
               				
               			}
					} else {
						try {
               				document.getElementById('product_price').value = "$" + Price;
                            document.getElementById('product_price').innerHTML = "$" + Price;
						} catch(e) {
							
						}
					}
				} else {
					if (Price == 0 || Price == "" || Price == "0" ) {
               			Price = "N/A";
					}
					try {
						document.getElementById('product_price').value = Price;
                        document.getElementById('product_price').innerHTML = Price;
					}	catch(e) {
						
					}
				}
				
				//set_all_prices(product_id);
                //	alert(document.getElementById('quote').value);
            } else {
                alert('There was a problem with the request.');
            }
        }

    }
    
    
    function get_price(product_id,mult,with_sign,account_id) {
    		var width;
    		var height;
    		var width_fraction;
    		var height_fraction;
    		var url_addr;
    		var quantity;
        
			var discount = 0;
			
            if(document.getElementById('stack'))
                var stack = document.getElementById('stack').value;
            
            width = parseInt(document.getElementById('select_width').value);
            width_fraction = parseFloat(document.getElementById('select_width_frac').value);
            height = parseInt(document.getElementById('select_height').value);
            height_fraction = parseFloat(document.getElementById('select_height_frac').value);

            if(document.getElementById('cat_id')) {
                var cat_id = document.getElementById('cat_id').value;
                if (cat_id == 10 || cat_id == 13) {
                    height = width;
                    height_fraction = width_fraction;
                }
            }

			var arr = new Array();
			arr = document.getElementsByTagName("select");

			for(var i=0; i < arr.length; i++)
			{
				var tagName = document.getElementsByTagName( "select" ).item(i);
				if (tagName.title == "Hardware") {
					tagText = tagName.options[tagName.selectedIndex].text;
					switch(tagText) {
						case "Top Down - Bottom Up":
						//case "Clutch Control":
							discount = 0.1125;
							break;
						case "Cordless Ultra":
						case "Cordless Top Down - Bottom Up":
							discount = 0.094;
							break;
						default:
							discount = 0;
							break;
					}
					document.getElementById('discount_value').value = discount;
				}
			}
			
			if(document.getElementById('discount_value')) {
				var discount_value = document.getElementById('discount_value');
				discount = discount_value.value;
			}
    
/*
			if(document.getElementById('surcharge')) {
				surcharge = document.getElementById('surcharge').value;
				switch(surcharge) {
					case "Top Down - Bottom Up":
					case "Omni-Rise Clutch Control":
						surcharge = 0.1125;
						break;
					case "Cordless Ultra":
					case "Cordless Top Down - Bottom Up":
						surcharge = 0.094;
						break;
					default:
						surcharge = 0;
						break;
				}
			}
*/
    		try {
    			 quantity = parseInt(document.getElementById('Quantity').options[document.getElementById('Quantity').selectedIndex].value);
	 		if (quantity < 0 || quantity == 0 || quantity == "") {
	 			quantity = 1;
	 		}
    		}	catch(e) {
    			quantity = 1;
    		}

			if ((stack == "Split Stack") || (stack == "Split Stack (2 Panels)")) {
				width = parseInt(document.getElementById('select_width').value)/2;
				width_fraction = parseFloat(document.getElementById('select_width_frac').value)/2;
				quantity = 2;
			}
            
    		url_addr = "/get_product_price.php?pid=" + product_id  + "&width=" + width +  "&qu=" + quantity + "&height=" + height + "&wf=" + width_fraction + "&hf=" + height_fraction + "&ac=" + account_id + "&mult=" + discount;
    		makeRequest5(url_addr,with_sign,product_id);
    }
    

    function my_get_price(product_id,mult) {

    		var width;

    		var height;

    		var width_fraction;

    		var height_fraction;

    		var url_addr;

    		

    		width = document.getElementById('select_width').value;

    		width_fraction = document.getElementById('select_width_frac').value;

    		height = document.getElementById('select_height').value;

    		height_fraction = document.getElementById('select_height_frac').value;

    		

    		url_addr = "/get_product_price.php?pid=" + product_id  + "&width=" + width + "&height=" + height + "&wf=" + width_fraction + "&hf=" + height_fraction;

            document.write(url_addr);

    		makeRequest(url_addr);

    		

    			

    }
