function getData(genData, quantityData,prodData,codeData,zoneData, installData, removeData, ordernum) {
    //var deliveryType=document.getElementById('delivery_type');
    var zipcode=document.getElementById('zipcode');
    var quantity=document.getElementById('quantity');
    var product_name=document.getElementById('description');
    var install_code=document.getElementById('install_code');
    var location=document.getElementById('location');

    //deliveryType.value = "";
    zipcode.value = "";
    quantity.value = "";
    product_name.value = "";
    install_code.value = "";
    location.value = "";

    sumEQ=new Array();

    //deliveryType.value = ordernum;
    zipcode.value = genData[1];


    for(i=0; i<quantityData.length; i++) {
        quantity.value += quantityData[i] +"\n";
        product_name.value += prodData[i] +"\n";
        location.value += zoneData[i] +"\n";
        install_code.value += codeData[i] +"\n";

/*
        if(installData[i] && removeData[i]) {
            var dataSum=(parseInt(installData[i]) + parseInt(removeData[i]));
                myint=dataSum;
            var genSum = "I&R ($"+ dataSum +")";
                myint=dataSum;
        } else if (installData[i] && (!removeData[i])) {
            var genSum = "I ($"+ installData[i] +")";
                dataSum=installData[i];
                myint=dataSum;
        } else if ((!installData[i]) && removeData[i]) {
            var genSum = "R ($"+ removeData[i] +")";
                dataSum=removeData[i];
                myint=dataSum;
        } else if(!installData[i] && !removeData[i]) {
                genSum=0;
        }

        if(genSum > 0) {
           install_code.value += codeData[i] +" | "+ genSum +"\n";
        } else {
           install_code.value += "\n";
        }

        sumEQ[i] = myint;
*/
    }
/*
    //alert(sumEQ);
    var total = 0;
    for(var s = 0; s < sumEQ.length; s++){ 
        var thisVal = parseInt(sumEQ[s]); 
        if(!isNaN(thisVal)){  
            total += thisVal; 
        }
    }

    //install_code.value += "---------------------";
    //install_code.value += "\n\t TOTAL: $"+ total;
*/
    //deliveryType.readonly = true;
    zipcode.readOnly = true;
    quantity.readOnly= true;
    product_name.readOnly = true;
    install_code.readOnly = true;
    location.readOnly = true;

    alert("All Data has been transfered. Click here OK to Proceed");
    $.fn.colorbox.close();
}

function returnData() {
    var deliveryType=document.getElementById('delivery_type');
    var zipcode=document.getElementById('zipcode');
    var quantity=document.getElementById('quantity');
    var product_name=document.getElementById('product_name');
    var install_code=document.getElementById('install_code');
    var location=document.getElementById('location');

    var deliverytype=deliveryType.value;
    var zipcode=zipcode.value;
    var quantities = new Array();
    var products = new Array();
    var codes = new Array();
    var locations = new Array();

    var qval = quantity.value.split("\n");
    var pval = product_name.value.split("\n");
    var cval = install_code.value.split("\n");
    var lval = location.value.split("\n");
    for(y=0; y<qval.length; y++) {
        quantities[y] = qval[y];
        products[y] = pval[y];
        codes[y] = cval[y];
        locations[y] = lval[y];
    }

    //parent.frames[0].receiveData(deliverytype, zipcode, quantities, products, codes, locations);
}

function getHref(x) {
    var user = x.name;
    if(user == '17096') {
        var user = 'admin'
    } else {
        var user = 'user'
    }
    var ratetrac = document.getElementById("ratetrac");
    //alert(ratetrac.value);
    var link = document.getElementById("rate_module");
    link.href = '/apps/ratemodule/rate-module.php?ref='+user+'&js=run&view=delivery_calculator&ordernum='+ ratetrac.value;
    //alert(link.href);
    return;
}
