/*
window.onload = function() {
	// check to see that the browser supports the getElementsByTagName method
	// if not, exit the loop 
	if (!document.getElementsByTagName) {
		return false; 
	} 
	// create an array of objects of each link in the document 
	var popuplinks = document.getElementsByTagName("a");
	// loop through each of these links (anchor tags) 	
	for (var i=0; i < popuplinks.length; i++) {	
		// if the link has a class of "popup"...	
		if (popuplinks[i].getAttribute("class") == "prodPopup") {	
			// add an onclick event on the fly to pass the href attribute	
			// of the link to our second function, openPopUp 	
			popuplinks[i].onclick = function() {	
			openPopUp(this.getAttribute("href"));	
			return false; 	
			} 	
		}
	} 
} 
*/

function openPopup(linkURL, pWidth, pHeight) {
	window.open(linkURL,'prodPopup','toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=' + pWidth + ',height=' + pHeight)
}

IE = navigator.appName=="Microsoft Internet Explorer";
NS = navigator.appName=="Netscape";
bVer = parseInt(navigator.appVersion);
var newWin=null;

function popup(loc, name, width, height) {

	var _params = "width="+width+",height="+height+",resizable=no,status=yes,scrollbars=yes";

	// CENTER ON BROWSERS WHICH SUPPORT JSCRIPT 1.2

	if (bVer >= 4) {
		 _left = ( (screen.width-width) >>1 );
		 _top = ( (screen.height-height) >>1 );

	} else {
		 _left = ( (800-width) >>1 );
		 _top = ( (600-height) >>1 );
	}

	if (IE) _params += ",top=" + _top + ",left=" + _left;
	else if (NS) _params += ",screenX=" + _left + ",screenY=" + _top;

	newWin = window.open(loc, name, _params);
	if ( newWin!=null && !(IE && bVer<5) )
		newWin.focus(); // MSIE4 DOESN'T FOCUS WINDOWS
}

function validateForm(form) {
  if ( (form.myName.value == "") || (form.organization.value == "") || (form.email.value == "") || (form.phone.value == "") ) {
    alert("Please complete Name, Organization, Email and Telephone prior to submitting you request.");
    return false;
  } else {
    return true;
  }
}     

function changeImages() {

        for (var i=0; i<changeImages.arguments.length; i+=2) {
	        document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
        }
}
