<!--

//This function will validate selected form input parameters.

<!--
function Validate()
{
	var Continue = 1;
	var Msg = "";
	var FocusF  = "";
	
	while (Continue == 1) 
	{
		if (document.hendra.Title.selectedIndex == 0) {
			Msg = "Please select a Title";
			Continue = 0;
			FocusF = "Title";
			break;
		}
		if (document.hendra.Firstname.value.length == 0) {
			Msg = "Please enter a Firstname";
			Continue = 0;
			FocusF = "Firstname";
			break;
		}
		if (document.hendra.Lastname.value.length == 0) {
			Msg = "Please enter a Lastname";
			Continue = 0;
			FocusF = "Lastname";
			break;
		}
		if (document.hendra.Institution.value.length == 0) {
			Msg = "Please enter a Institution";
			Continue = 0;
			FocusF = "Institution";
			break;
		}
		if (document.hendra.Department.value.length == 0) {
			Msg = "Please enter a Department";
			Continue = 0;
			FocusF = "Department";
			break;
		}
		if (document.hendra.Email.value.length == 0) {
			Msg = "Please enter a Email";
			Continue = 0;
			FocusF = "Email";
			break;
		}
		if (document.hendra.Postaladdress.value.length == 0) {
			Msg = "Please enter a Postaladdress";
			Continue = 0;
			FocusF = "Postaladdress";
			break;
		}

		if (document.hendra.txtOrderDetails.value.length == 0) {
			Msg = "Please click the Add order button";
			Continue = 0;
			FocusF = "Add";
			break;
		}
		if (document.hendra.Article_deliver.options.selectedIndex == 0) {
			Msg = "Please select a delivery method";
			Continue = 0;
			FocusF = "Article_deliver";
			break;
		}
		if (document.hendra.Article_deliver.options.selectedIndex == 1) {
			if (document.hendra.Fax.value.length == 0) {
				Msg = "Please enter a Fax number";
				Continue = 0;
				FocusF = "Fax";
				break;
			}	
		}
		
		break;	
	}	
	if (Continue == 1) {
		return true;
	}else{
		alert (Msg);
		if (FocusF > "")  {
			eval("document.hendra." + FocusF + ".focus()");
		}	
		return false;
	}			

}

function AddOrder()
{
	
	var Proceed = 1;
	var Msg = "";
	var FocusF  = "";
	
	
	while (Proceed == 1) 
	{
		if (document.hendra.Request_type.options.selectedIndex == 0) {
			Msg = "Please select a Request_type";
			Proceed = 0;
			FocusF = "Request_type";
			break;
		}
		break;	
	}	
	if (Proceed == 1) {
		PopOrderList();
		ClearFields();
	}else{
		alert (Msg);
		eval("document.hendra." + FocusF + ".focus()");
	}	
	

}

function ClearFields()
{
	document.hendra.Request_type.options.selectedIndex = 0;
	document.hendra.Request_title.value = "";
	document.hendra.Journal.value = "";
	document.hendra.Authors.value = "";
	document.hendra.Article_year.value = "";
	document.hendra.Article_volume.value = "";
    document.hendra.Article_supp.value = "";
	document.hendra.month.value = "";
	document.hendra.Article_issue.value = "";
	document.hendra.Article_pages.value = "";
	document.hendra.Otherinfo.value = ""; 
    document.hendra.Order_article.value = "";
	document.hendra.Article_deadline.value = "";
}
	
function PopOrderList()
{
	var reqType = "Request for : " + document.hendra.Request_type.options[document.hendra.Request_type.options.selectedIndex].value;
	var reqTitle = "Title : " + document.hendra.Request_title.value;
	var reqJournal = "Article Title : " + document.hendra.Journal.value;
	var reqAuthors = "Authors : " + document.hendra.Authors.value;
	var reqYear = "Year published : " + document.hendra.Article_year.value;
	var reqVol = "Volume : " + document.hendra.Article_volume.value;
    var reqSupp = "Supplement : " + document.hendra.Article_supp.value;
	var reqMonth = "Month : " + document.hendra.month.value;
	var reqIssue = "Issue : " + document.hendra.Article_issue.value;
	var reqPages = "Pages : " + document.hendra.Article_pages.value;
	var reqOther = "Othe info : " + document.hendra.Otherinfo.value; 
	if (document.hendra.Order_article[0].checked) {
    	var reqOrder = "Order Internationally : " + document.hendra.Order_article[0].value;
	}else{
		var reqOrder = "Order Internationally : " + document.hendra.Order_article[1].value;
	}		
	var reqDeadline = "Deadline date : " + document.hendra.Article_deadline.value;
	
	var reqTotalOrder = "";
	var reqDisplayOrder = "";
	
	reqTotalOrder += reqType + "%" + reqTitle + "%" + reqJournal + "%" + reqAuthors + "%" + 
					 reqYear + "%" + reqVol + "%" + reqSupp + "%" + reqMonth + "%" + 
					 reqIssue + "%" + reqPages + "%" + reqOther + "%" + reqOrder + "%" + reqDeadline + " # \n"; 
			
	
	if ((document.hendra.Request_title.value.length > 0) && (document.hendra.Journal.value.length > 0)) {
		reqDisplayOrder +=  reqType + " \n " + reqTitle + " \n " + reqJournal + "\n";
	}
	if ((document.hendra.Request_title.value.length == 0) && (document.hendra.Journal.value.length > 0)) {
		reqDisplayOrder +=  reqType + " \n " + reqJournal + "\n";
	}
	if ((document.hendra.Request_title.value.length > 0) && (document.hendra.Journal.value.length == 0)) {
		reqDisplayOrder +=  reqType + " \n " + reqTitle + "\n";
	}	
		
					 
	document.hendra.txtDisplayOrders.value += reqDisplayOrder;
	document.hendra.txtOrderDetails.value = document.hendra.txtDisplayOrders.value
	
	document.hendra.txtOrders.value += reqTotalOrder;
	//document.hendra.txtOrderDetails.value = document.hendra.txtOrders.value;
	
}	


//-->

		// -->


