function cPop(url, windowname, www, hhh) {window.open(url,windowname,'width=' + www + ',height=' + hhh + ',left=30,top=30,screenX=70,screenY=70,status=1');
}

imagebg=new Image(16,14)
imagebg.src="wedge2.gif"

//Checks the fields
function CheckRequiredFields(arRequired, frmNumber) {
	//this function checks to see if all the required fields are populated
	var strMsg = 'Please complete the following fields:\n';
	var iCount = 0;
	//if 'frmNumber' is not included, default to the first form on the page
	if (frmNumber) {
		//continue
	} else {
		frmNumber = 0;
	}
	for (var i = 0; i < arRequired.length; i++) {
		var elem = document.forms[frmNumber].elements[arRequired[i]]
		var x = elem.value;
		if (x == '' || x == null) {
			strMsg += ((0 < iCount) ? ', ' : '') + arRequired[i].substring(3,arRequired[i].length);
			iCount += 1;
		}
	}
	//if no errors were found, pass back an empty string
	if (iCount == 0)
		strMsg = ''
		
	//return the error message 
	return strMsg
}

//Function call that checks fields and returns errors
function ValidateData() {
	//this function will make sure the necessary data is entered and save the changes
	var strErrors = "" //error message initialize
	var arRequired //array storing names of required fields

	arRequired = new Array('txtFirstName', 'txtLastName', 'txtEmail', 'lstCountryCode', 'txtOtherComment');
	strErrors = CheckRequiredFields(arRequired);

	//if there is an error message, display it and exit sub
	if (strErrors.length != 0) {
		alert(strErrors);
		return;
	}

	//alert("About to submit");
	document.forms["frmContact"].submit();
}//validate data*/
