<!-- Hide
                           //
                           // pricing array
                           //
                           // initialize array with n entries
                           function MakeArray(n) {
                           	this.length = n
                           	for (var i = 1; i <= n; i++) {
                           		this[i] = 0
                           	}
                           	return this
                           }
                           // stuff "rows" of data for a pseudo-two-dimensional array
                           function item(name,time, rate) {
                           	this.name = name
                           	this.time = time
                           	this.rate = rate
                           }
                           // create a pseudo-two-dimensional array
                           itemlist = new MakeArray(12)
                           itemlist[0] = new item("Page","1",  "50")
                           itemlist[1] = new item("Content","1",  "15")
                           itemlist[2] = new item("Forms","1",  "50")
                           itemlist[3] = new item("Logo","1",  "100")
                           itemlist[4] = new item("Graphics","1",  "35")
                           itemlist[5] = new item("Menu Buttons","1",  "10")
                           itemlist[6] = new item("Flash Intro","1",  "200")
                           itemlist[7] = new item("Flash Menu","1",  "150")
                           itemlist[8] = new item("Flash Items","1",  "50")
                           itemlist[9] = new item("CMS","1",  "1500")
						   itemlist[10] = new item("CMSCRT","1",  "3599")
                           itemlist[11] = new item("Search","1",  "60")
						   itemlist[12] = new item("Newsletter","1",  "250")
                           //
                           // input string validation function (number)
                           //
                           function isValidNumber(inputStr) {
                           var gotItOnce = 0
                           // check the entire string
                           	for (var i=0; i< inputStr.length; i++) {
                           		var oneChar = inputStr.substring(i, i+1)
                           		if (oneChar == ".") {
                           // count the periods
                           			gotItOnce++
                           		}
                           // make sure we have only one period
                           		if (gotItOnce > 1) {
                           			alert("The character '" + oneChar + "' is not a number. Please make sure you enter only numbers.")
                           			return false
                           		}
                           // make sure each character is a number or a period	
                           		if ((oneChar < "0" || oneChar > "9")&&(oneChar != ".")) {
                           			alert("The character '" + oneChar + "' is not a number. Please make sure you enter only numbers.")
                           			return false
                           		}
                           	}
                           	return true
                           }
                           //
                           // positive number decimal formatting function
                           //
                           function format(expr, decplaces) {
                           // raise incoming value by power of 10 times the
                           // number of decimal places; round to an integer; convert to string
                           	var str = "" + Math.round(eval(expr) * Math.pow(10, decplaces))
                           // pad small value strings with zeros to the left of rounded number
                           	while (str.length <= decplaces) {
                           		str = "0" + str
                           	}
                           // establish location of decimal point
                           	var decpoint = str.length - decplaces
                           // assemble final result from: (a) the string up to the position of 
                           // the decimal point; (b) the decimal point; and (c) the balance
                           // of the string. return finished product.
                           	return str.substring(0, decpoint) + "." + str.substring(decpoint, str.length);
                           }
                           //
                           // interger input calculation function
                           //
                           function intcalculate(form,itemnumber) {
                           // calculate the cost for base pages
                           // first make sure that there is an entry in the field
                           	if (form.elements[itemnumber*2].value.length != 0) {
                           // next check to make sure the field contains a valid number
                           		if (isValidNumber(form.elements[itemnumber*2].value)) {
                           // next set up the proper number of decimal places
                           			form.elements[itemnumber*2].value=Math.round(form.elements[itemnumber*2].value,0)
                           // finally calculate the "base pages" line item cost
                           			var cost = format(parseFloat(form.elements[itemnumber*2].value*itemlist[itemnumber].time*itemlist[itemnumber].rate),2)
                           			form.elements[(itemnumber*2)+1].value= cost
                           			return parseFloat(cost)
                           		}
                           	}
                           }
                           //
                           // make new window function
                           //
                           function makeNewWindow(newURL) {
                           	var newwindow=window.open(newURL,"","scrollbars,resizable,height=200,width=400")
                           	newwindow=window.open(newURL,"","scrollbars,resizable,height=200,width=400")
                           }
                           //
                           // calculate function
                           //
                           function calculate(form) {
                           	var totalcost=parseFloat(0)
                           	var cost=parseFloat(0)
                           	for (var i=0; i<= 12; i++) {
                           		intcalculate(form,i)
                           	}
                           	for (var i=0; i<=12; i++) {
                           		cost = parseFloat(form.elements[(i*2)+1].value)
                           		totalcost=totalcost+cost
                           	}
                           	form.grandtotalcost.value=format(totalcost,2)
                           	return true
                           }
                           // END HIDING -->