	myPix1 = new Array(
		"images/promo_alstom.jpg",
		"images/promo_gigastor.jpg",
		"images/promo_linkanal.jpg",
		"images/promo_netpriva.jpg",
		"images/promo_ntaps.jpg",
		"images/promo_obs12.jpg",
		"images/promo_gigastor_exp.jpg",
		"images/promo_voip.jpg"

	)
	
	myLnx1 = new Array(
		"pdf/observer/alstom_case_study.pdf",
		"p_giga.html",
		"p_linka.html",
		"p_netp.html",
		"p_ntaps.html",
		"pdf/observer/observer_new_features.pdf",
	    "pdf/observer/gigastor_48tb.pdf",
		"p_voip.html"

	)


	
	captionText = new Array(
		"\"A more comprehensive tool than any other product - All for a very sensible cost\"",
		"'Paramount in Retrospective Network Analysis' Now it's easy to 'Rewind' your network.",
		"'High-Level Resource Monitoring for your Entire Network' Device and Route Monitoring, Network Mapping, and More..",
		"A complete traffic shaping solution which gives guaranteed band-width for business critical applications.",
		"nTaps ensure complete 'Passive' visibility into your Full-Duplex Network Links",
		"Observer Version 13 new features Guide",
		"Expand your options with up to 48 Terrabytes. 'Now that's Storage'",
		"Enterprise Strength VoIP Analysis"

	)

	headerText = new Array(
		"Alstom",
		"Gigastor",
		"Link Analyst",
		"NetPriva",
		"Network Taps",
		"Observer 13 - NEW FEATURES",
		"Gigastor Expandable",
		"VoIP"

	)

	function choosePix() {
		if (document.images) {
			randomNum1 = Math.floor((Math.random() * myPix1.length))
			randomNum2 = Math.floor((Math.random() * myPix1.length))
			
			if (randomNum1 == randomNum2) {
				if (randomNum1 < (myPix1.length-1)) {
				randomNum2 = (randomNum2+1)
				}
				else {
				randomNum2 = (randomNum2-1)
				}
			}

			document.getElementById("myPicture1").src = myPix1[randomNum1];
			document.getElementById("myLink1").href = myLnx1[randomNum1];
			document.getElementById("moreLink1").href = myLnx1[randomNum1];
			document.getElementById("headerText1").innerHTML = headerText[randomNum1];
			document.getElementById("captionText1").innerHTML = captionText[randomNum1];

			document.getElementById("myPicture2").src = myPix1[randomNum2];
			document.getElementById("myLink2").href = myLnx1[randomNum2];
			document.getElementById("moreLink2").href = myLnx1[randomNum2];
			document.getElementById("headerText2").innerHTML = headerText[randomNum2];
			document.getElementById("captionText2").innerHTML = captionText[randomNum2];		}
	}


// Function to add text to a node by node ID - parameters are 'nodeID' and 'Text'

	function addNode(nodeID, Text) {
		if(document.getElementById){	
		newGraf = document.createElement("p")
		newText = document.createTextNode(Text)
		newGraf.appendChild(newText)

		node = document.getElementById(nodeID);
		node.appendChild(newGraf)
		return false
		}
	}

// Function to remove last child of a node by 'node ID'

	function delNode(nodeID) {
		if(document.getElementById){
		node = document.getElementById(nodeID);
		node.removeChild(node.lastChild);
		}
	}



//
//FORM VALIDATION
//


//Function to check if input is a number, parameter is 'passedVal'

	function isNum(passedVal) {		
		if (passedVal == "") {
			return false
		}
		for (i=0; i<passedVal.length; i++) {
			if (passedVal.charAt(i) < "0") {
			return false
		}
		if (passedVal.charAt(i) > "9") {
			return false
		}
	}
	return true

	}

//function using Regular expression to check for email address validity

	re = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/	

	function validEmail(mail) {
		if(re.test(mail.value)) {
			return true
		}
		else {
		alert ("Please Enter a Valid Email Address")
		request_form.email.focus()
		request_form.email.select()
	return false
		}
	}



//Function to verify fields upon form submittal which in turn calls 'sub-functions'(above)

	function submitIt(request_form) {


	//ensure that First name is filled in

		if (request_form.first_name.value=="") {
		alert ("You Must Enter a First Name")
		request_form.first_name.focus()
		request_form.first_name.select()
	return false
		}

	//ensure that Last name is filled in

		if (request_form.last_name.value=="") {
		alert ("You Must Enter a Last Name")
		request_form.last_name.focus()
		request_form.last_name.select()
	return false
		}


	//ensure that Contact's Phone Number is filled in

		if (request_form.tel.value=="") {
		alert ("You Must Enter a Telephone Number")
		request_form.tel.focus()
		request_form.tel.select()
	return false
		}
		
		//ensure that Email address is filled in

		if (request_form.email.value=="") {
		alert ("You Must Enter an Email Address")
		request_form.email.focus()
		request_form.email.select()
	return false
		}
		


return true
}

	//ensure that Contact's Phone Number is numeric
	function validPhone(telno) {
		if (isNum(telno.value)) {
			return true
		}
		else
		alert ("Please Enter a Valid Telephone Number (numbers only, no dashes or spaces)")
		request_form.tel.focus()
		request_form.tel.select()
	return false
		}
		








