// JavaScript Document

<!-- Hide from older browsers;

	var nonHazLess100 = ['33', '30', '13', '43', '33', '38', '53', '33', '53', '62', '33', '30', '30', '53', '33', '23', '38', '40', '43', '40', '41', '15', '41', '40', '56', '40', '40', '56', '46', '36', '40', '26', '40', '23', '23', '56', '36', '30', '43', '43', '23', '30', '36', '56', '43', '33', '50', '42'];
	var hazLess100 = ['38', '35', '18', '48', '38', '43', '58', '38', '58', '67', '38', '35', '35', '58', '38', '28', '43', '45', '48', '45', '46', '20', '46', '45', '61', '45', '45', '61', '51', '41', '45', '31', '45', '28', '28', '61', '41', '35', '48', '48', '28', '35', '41', '61', '48', '38', '55', '47'];
	
	var nonHazLess100Med = ['53', '53', '41', '41', '56', '56', '36', '56', '42'];
	var hazLess100Med = ['58', '58', '46', '46', '61', '61', '41', '61', '47'];


function calculate() 
	{
	var intType = document.getElementById("type").value;
	var intIndustry = document.getElementById("industry").value;
	var intIndustry = document.getElementById("industry").value;
	var strIndustry = document.budgetQuote.industry.options[intIndustry].text;
			
    if (intType == 1)
    	{
		//alert ("NON HAZ DETETECED 1")
        var intArrayNumber = (document.budgetQuote.industry.value)-1;
        var varNewQuoteValue = nonHazLess100[intArrayNumber];
        }

		if (intType == 2)
        {
        //alert ("HAZ DETECTED. type 2.  Qty is::" + intQuantity)
		var intArrayNumber = (document.budgetQuote.industry.value)-1;
        var varNewQuoteValue = hazLess100[intArrayNumber];
        }
				
	var strType = document.getElementById("type").value;

	if (strType=="1")
		{
		var ind = "non hazardous"
		} 
		else if (strType=="2")
		{
		var ind = "including hazardous"
		}
						
	var strPrice = varNewQuoteValue;
	//alert(price);

	var quoteInfo="1="+strIndustry+"&"+"2="+ind+"&"+"3="+strPrice;	
	
	if (intIndustry == 0) {
		var hideHaz = document.getElementById("hazText");
		hideHaz.style.position="absolute";
		hideHaz.style.left="-1000px";
		hideHaz.style.visibility="hidden";
		hideHaz.style.float="left";	
		hideHaz.style.height="0px";
		
		var showNoInd = document.getElementById("indText");
		showNoInd.style.visibility="visible";
		showNoInd.style.position="static";
		showNoInd.style.float="left";
		showNoInd.style.clear="left";
	} else {
		var urlString = "http://www.wastecare.co.uk/collection_quote/quoteDetails.html?" + quoteInfo;
	//alert(quoteInfo);
		window.location = urlString;
	}
}


function calculateMed() 
	{
	var intType = document.getElementById("type").value;
	var intIndustry = document.getElementById("industry").value;
	var intIndustry = document.getElementById("industry").value;
	var strIndustry = document.budgetQuote.industry.options[intIndustry].text;
			
    if (intType == 1)
    	{
		//alert ("NON HAZ DETETECED 1")
        var intArrayNumber = (document.budgetQuote.industry.value)-1;
        var varNewQuoteValue = nonHazLess100Med[intArrayNumber];
        }

		if (intType == 2)
        {
        //alert ("HAZ DETECTED. type 2.  Qty is::" + intQuantity)
		var intArrayNumber = (document.budgetQuote.industry.value)-1;
        var varNewQuoteValue = hazLess100Med[intArrayNumber];
        }
				
	var strType = document.getElementById("type").value;

	if (strType=="1")
		{
		var ind = "non hazardous"
		} 
		else if (strType=="2")
		{
		var ind = "including hazardous"
		}
						
	var strPrice = varNewQuoteValue;
	//alert(price);

	var quoteInfo="1="+strIndustry+"&"+"2="+ind+"&"+"3="+strPrice;	
	
	if (intIndustry == 0) {
		var hideHaz = document.getElementById("hazText");
		hideHaz.style.position="absolute";
		hideHaz.style.left="-1000px";
		hideHaz.style.visibility="hidden";
		hideHaz.style.float="left";	
		hideHaz.style.height="0px";
		
		var showNoInd = document.getElementById("indText");
		showNoInd.style.visibility="visible";
		showNoInd.style.position="static";
		showNoInd.style.float="left";
		showNoInd.style.clear="left";
	} else {
		var urlString = "http://www.wastecare.co.uk/collection_quote/quoteDetails.html?" + quoteInfo;
	//alert(quoteInfo);
		window.location = urlString;
	}
}

function Javafunction ()

{

var intIndustry = document.getElementById("industry").value;
var strIndustry = document.budgetQuote.industry.options[intIndustry].text;


var strType = document.getElementById("type").value;

if (strType=="1")
	{
	var ind = "non hazardous"
	} else if (strType=="2")
	{
	var ind = "including hazardous"
	}

//var strType = document.budgetQuote.type.options[intType].text;

var strPrice = document.getElementById("quoteResult").innerHTML;


//var strDestinationPage = "collection_quote/email.html?industry=?" + strIndustry + "&i_Quantity=" + strQuantity + "&i_type=" + strType;
//alert (strDestinationPage);

var strDestinationPage = "http://www.wastecare.co.uk/collection_quote/email.html";

	
	if (strIndustry=="Industry")
	{
		var total = document.getElementById("budget");
		total.style.visibility="visible";
		total.style.position="static";
		total.style.float="left";
		total.style.display="inline";
		total.style.height="252px";
		total.style.width="230px";
		total.style.clear="left";
						
		var budget = document.getElementById("divResults");
		budget.style.position="absolute";
		budget.style.left="-1000px";
		budget.style.height="0px";
		budget.style.visibility="hidden";
		budget.style.float="left"
		budget.style.clear="none"
		//budget.style.width="0px";
		budget.style.margin="0px";
		
		alert("You must enter a industry type")
	}
	else
	{
		var quoteInfo="industry="+strIndustry+","+" type="+ind+","+" price="+strPrice;
		//var quoteInfo="industry="+strIndustry+","+" quantity="+strQuantity+","+" type="+strType+","+" price="+strPrice;
		//quoteInfo+=" :quantity="+strQuantity
		//quoteInfo+=" :type="+strType
		//quoteInfo+=" price="+strPrice
	
		
		
		var urlString = "http://www.wastecare.co.uk/collection_quote/email.html?" + quoteInfo;
		//alert(quoteInfo);
		window.location = urlString;
		//window.open(urlString);
		//window.open (strDestinationPage, 'quoteInfo');
		
		//document.cookie="industry="+strIndustry
		//document.cookie+=" :quantity="+strQuantity
		//document.cookie+=" :type="+strType
		//document.cookie+=" price="+strPrice
		//window.open(strDestinationPage);
	}

//self.location(strDestinationPage);

}

function newQuote()
{
		var total = document.getElementById("budget");
		total.style.visibility="visible";
		total.style.position="static";
		total.style.float="left";
		total.style.display="inline";
		total.style.height="252px";
		total.style.width="230px";
		total.style.clear="left";
						
		var budget = document.getElementById("divResults");
		budget.style.position="absolute";
		budget.style.left="-1000px";
		budget.style.height="0px";
		budget.style.visibility="hidden";
		budget.style.float="left"
		budget.style.clear="none"
		//budget.style.width="0px";
		budget.style.margin="0px";
}

function hazardous() {
	
var strType = document.getElementById("type").value;
var intIndustry = document.getElementById("industry").value;
	
if (strType=="2")
	{
		var showHaz = document.getElementById("hazText");
		showHaz.style.visibility="visible";
		showHaz.style.position="static";
		showHaz.style.float="left";
		showHaz.style.clear="left";
		
		var hideNoInd = document.getElementById("indText");
		hideNoInd.style.position="absolute";
		hideNoInd.style.left="-1000px";
		hideNoInd.style.visibility="hidden";
		hideNoInd.style.float="left";	
	}	
	else if (strType=="1") {
						
		var hideHaz = document.getElementById("hazText");
		hideHaz.style.position="absolute";
		hideHaz.style.left="-1000px";
		hideHaz.style.visibility="hidden";
		hideHaz.style.float="left";	
		hideHaz.style.height="0px";
	}
}


            

//          document.write(nonHazMore1000[0]);

            
	// end hide -->