	function validateForm(section) {
		var error	= new Array();
		var msg;
		var i		= 0;
		switch (section) {
			case "browse":
					var regexpcr = new RegExp("^form_cr_");
					var regexpca = new RegExp("^form_ca_");
					var elements = document.forms[0].elements;
					var els = elements.length;
					var errors = new Array();
					for (b = 0; b < els; ++ b) {
						if (elements[b].id.match(regexpcr) && elements[b].value == "") errors["cr"] = true;
						else if (elements[b].id.match(regexpcr)) {errors["cr"] = false;break;}
					}
					for (b = 0; b < els; ++ b) {
						if (elements[b].id.match(regexpca) && elements[b].value == "") errors["ca"] = true;
						else if (elements[b].id.match(regexpca)) {errors["ca"] = false;break;}
					}
					if (errors["cr"]) {error[i] = "Can you please select a <strong>role</strong>?";++i;}
					if (errors["ca"]) {error[i] = "Can you please select an <strong>activity</strong>?";++i;}
				break;
			case "model":
					var title = document.forms[0].title;
					var topic = document.forms[0].topic;
					if (title.value == "" && topic.value == "") {error[i] = "Can you please enter a <strong>search value</strong>?";++i;}
				break;
			case "model_adv":
				break;
			case "author":
					var author = document.forms[0].sauthor;
					var country = document.forms[0].country;
					if (author.value == "" && country.value == "") {error[i] = "Can you please enter a <strong>search value</strong> or a <strong>country</strong>?";++i;}
				break;
			case "mydetails":
			case "adminuser":
					var last_name		= document.forms[0].last_name;
					var email_address	= document.forms[0].email;
					var user_name		= document.forms[0].user_name;
					if (document.forms[0].current_password) {var cur_pwd = document.forms[0].current_password;}
					if (document.forms[0].role) {var role = document.forms[0].role;}
					var new_pwd			= document.forms[0].new_password;
					var new_pwd2		= document.forms[0].new_password_val;
					if (last_name.value == "")	{error[i] = "Can you please add a <strong>last name</strong>?";++i;}
					if (email_address.value == "" || !emailCheck(email_address.value)) {error[i] = "Can you please enter an <strong>email address</strong> or one of a <strong>valid format</strong>?";++i;}
					if (document.forms[0].role)	{if (role.value == "") {error[i] = "Can you please choose a <strong>role</strong>";++i;}}
					if (user_name.value == "")	{error[i] = "Can you please add a <strong>user name</strong>?";++i;}
					if (document.forms[0].current_password) {if (cur_pwd.value == "" && new_pwd.value != "") {error[i] = "You are not able to change your password if you don't enter<br />your <strong>current password</strong>. This is a security measure!";++i;}}
					if (section == "adminuser" && matchFormAction(document.forms[0], "/admin/user/edit/")) {if (new_pwd.value == "") {error[i] = "Can you please enter a <strong>password</strong>";++i;}}
					if (new_pwd.value != "" && new_pwd.value != new_pwd2.value) {error[i] = "Can you please enter the <strong>same password</strong> twice?";++i;}
				break;
			case "systemclient":
					var client		= document.forms[0].client;
					var membership	= document.forms[0].membership;
					var start_date	= document.forms[0].start_date;
					var end_date	= document.forms[0].end_date;
					if (client.value == "")		{error[i] = "Can you please add a <strong>client's name</strong>?";++i;}
					if (membership.value == "")	{error[i] = "Can you please choose a <strong>subscription type</strong>?";++i;}
					if (start_date.value == "")	{error[i] = "Can you please choose a <strong>start date</strong>?";++i;}
					if (end_date.value == "")	{error[i] = "Can you please choose a <strong>end date</strong>?";++i;}
				break;
			case "subscribe_pmb":
			case "subscribe_cmb":
			case "subscribe_cmbplus":
					var first_name		= document.forms[0].cp_first_name;
					var last_name		= document.forms[0].cp_last_name;
					var phone			= document.forms[0].cp_telephone;
					var email			= document.forms[0].cp_email;
					var company_name	= document.forms[0].ci_company_name;
					if (document.forms[0].ci_number_employees) {var employees	= document.forms[0].ci_number_employees;}
					var country			= document.forms[0].ci_country;
					var agree			= document.forms[0].ci_agreement;
					if (first_name.value == "")		{error[i] = "Can you please add the contact person's <strong>first name</strong>?";++i;}
					if (last_name.value == "")		{error[i] = "Can you please add the contact person's <strong>last name</strong>?";++i;}
					if (phone.value == "")			{error[i] = "Can you please add the contact person's <strong>telephone number</strong>?";++i;}
					if (email.value == "" || !emailCheck(email.value)) {error[i] = "Can you please add an <strong>email address</strong> or a <strong>valid</strong> one?";++i;}
					if (company_name.value == "")	{error[i] = "Can you please add an <strong>organisation name</strong>?";++i;}
					if (document.forms[0].ci_number_employees) {if (employees.selectedIndex == 0) {error[i] = "Can you please choose the <strong>number of employees</strong>?";++i;}}
					if (country.selectedIndex == 0)	{error[i] = "Can you please select a <strong>country</strong>?";++i;}
					if (agree.checked == false)		{error[i] = 'Can you please agree to <strong>ProvenModel\'s terms of use</strong>?';++i;}
				break;
			case "subscribe_pm":
					var first_name		= document.forms[0].cp_first_name;
					var last_name		= document.forms[0].cp_last_name;
					var phone			= document.forms[0].cp_telephone;
					var email			= document.forms[0].cp_email;
					var country			= document.forms[0].ci_country;
					var occupation		= document.forms[0].pi_occupation;
					var age				= document.forms[0].pi_age;
					var user_name		= document.forms[0].user_name;
					var password1		= document.forms[0].new_password;
					var password2		= document.forms[0].password2;
					var agree			= document.forms[0].ci_agreement;
					var company_name	= document.forms[0].pi_company_name;

					if (first_name.value == "")		{error[i] = "Can you please add your <strong>first name</strong>?";++i;}
					if (last_name.value == "")		{error[i] = "Can you please add your <strong>last name</strong>?";++i;}
					if (phone.value == "")		{error[i] = "Can you please add your <strong>telephone number</strong>";++i;}
					if (email.value == "" || !emailCheck(email.value)) {error[i] = "Can you please enter an <strong>email address</strong> or a <strong>valid</strong> one?";++i;}
					if (country.selectedIndex == 0)	{error[i] = "Can you please select your <strong>country</strong>?";++i;}
					if (company_name.value == "")	{error[i] = "Can you please add an <strong>organisation name</strong>?";++i;}
					if (occupation.selectedIndex == 0)	{error[i] = "Can you please select your <strong>occupation</strong>?";++i;}
					if (age.selectedIndex == 0)	{error[i] = "Can you please select your <strong>age bracket</strong>?";++i;}
					if (user_name.value == "")	{error[i] = "Can you please add a <strong>user name</strong>?";++i;}
					if (password1.value == "")	{error[i] = "Can you please add a <strong>password</strong>?";++i;}
					if (password2.value == "")	{error[i] = "Can you please confirm your <strong>password</strong>?";++i;}
					if (password1.value != "" && password1.value != password2.value) {error[i] = "Can you please enter the <strong>same password</strong> twice?";++i;}
					if (agree.checked == false)		{error[i] = 'Can you please agree to <strong>ProvenModel\'s terms of use</strong>?';++i;}
				break;
			case "contactus":
					var first_name		= document.forms[0].cu_first_name;
					var last_name		= document.forms[0].cu_last_name;
					var email			= document.forms[0].cu_email;
					var company_name	= document.forms[0].cu_organisation;
					var message			= document.forms[0].message;
					if (first_name.value == "")		{error[i] = "Can you please add your <strong>first name</strong>?";++i;}
					if (last_name.value == "")		{error[i] = "Can you please add your <strong>last name</strong>?";++i;}
					if (email.value == "" || !emailCheck(email.value)) {error[i] = "Can you please  enter an <strong>email address</strong> or a <strong>valid</strong> one?";++i;}
					if (company_name.value == "")	{error[i] = "Can you please add your <strong>organisation's name</strong>?";++i;}
					if (message.value == "")	{error[i] = "Can you please leave us your <strong>question</strong> or <strong>comment</strong>?";++i;}
				break;
			case "commentmodel":
				var description			= document.forms["comment_descr"].comment_descr;
				if (description.value == "")	{error[i] = "Can you please state your <strong>comment</strong>?";++i;}
				break;
			case "reviewmodel":
				var description			= document.forms[0].review_message;
				if (description.value == "")	{error[i] = "Can you please <strong>leave a message</strong> for this model's submitter?";++i;}
				break;
			case "admincontenttopic":
					var topic_name		= document.forms[1].topic_name;
					var definition		= document.forms[1].definition;
					if (topic_name.value == "") {error[i] = "Can you please add the <strong>topic name</strong>";++i;}
					if (definition.value == "") {error[i] = "Can you please add the topic's <strong>definition</strong>?";++i;}
				break;
			case "admincontentauthor":
			case "admincontentsubmittor":
					var first_name			= document.forms[1].first_name;
					var last_name			= document.forms[1].last_name;
					if (last_name.value == "") {error[i] = "Can you please add a <strong>last name</strong>?";++i;}
				break;
			case "admincontentorganisation":
					var organisation		= document.forms[1].organisation_name;
					if (organisation.value == "") {error[i] = "Can you please add an <strong>organisation name</strong>?";++i;}
				break;
			case "admincontentpublisher":
					var organisation 		= document.forms[1].organisation;
					if (organisation.value == "") {error[i] = "Can you please add an <strong>organisation</strong>?";++i;}
				break;
			case "admincontentjournal":
					var journaltitle 		= document.forms[1].title;
					if (journaltitle.value == "") {error[i] = "Can you please add a <strong>title</strong>?";++i;}
				break;
			case "adminaccount":
					var els		= document.forms[1].getElementsByTagName("input");
					var regexp	= new RegExp("^begin_iprange_");
					var ip		= new RegExp("^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$");
					var invalid = false;
					for (r = 1; r < els.length; ++r) {
						if (els[r].id.match(regexp)) {
							if (els[r].value != "" ^ els[r+1].value != "") {invalid=true;error[i] = "Can you please enter either a start value for an ip range or an end value?";++i;break;}
							else if (els[r].value != "" && els[r+1].value != "") {if (els[r].value.match(ip) == null || els[r+1].value.match(ip) == null) {invalid = true;error[i] = "the entered <strong>ip address range</strong> ("+els[r].value+" - "+els[r+1].value+") is invalid.<br />the correct syntax is '###.###.###.###' where all values must be 255 or less";++i;break;}}
						}
					}
					if (!invalid) {
						for (r = 1; r < els.length; ++r) {
							if (els[r].id.match(regexp)) {
								if (els[r].value != "" && els[r+1].value != "") {
									tmp1 = els[r].value.split(".");
									for (t = 0; t < 4; ++t) {
										tmp1[t] = strPad(tmp1[t], 3, "0");
									}
									tmp1 = tmp1.join("");
									tmp2 = els[r+1].value.split(".");
									for (t = 0; t < 4; ++t) {
										tmp2[t] = strPad(tmp2[t], 3, "0");
									}
									tmp2 = tmp2.join("");
									if (tmp2 <= tmp1) {error[i] = "the entered <strong>ip range</strong> ("+els[r].value+" - "+els[r+1].value+")is not valid.<br />the end value is less or the same as the start value";++i;}
								}
							}
						}
					}
				break;
		}
		if (error.length > 0) {
			msg	= "some information we require was left blank or invalid.<br />please read the following:<ul>";
			for (i = 0; i < error.length; ++i) msg += "<li><nobr>"+error[i]+"</nobr></li>";
			msg += "</ul>";
			showAlert(msg);
			return false;
		} else {
			if (section == "adminuser" && matchFormAction(document.forms[0], "/admin/user/edit/")) document.forms[0].action = "/admin/user/new";
			else if (section == "systemclient" && matchFormAction(document.forms[0], "/admin/system/client/edit/")) document.forms[0].action = "/admin/system/client/new";
		}
		return true;
	}

	function matchFormAction(form, action)
	{
		var form_action = form.action;

		return form.action.substring(form.action.length - action.length) == action;
	}

	function strPad(value, length, string) {
		var displayNumber = length;
		while (value.length < length) value = "0" + value;
		return value;
	}

	function emailCheck(emailStr) {
		var emailPat=new RegExp("^(.+)@(.+)$");
		var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]";
		var validChars="\[^\\s" + specialChars + "\]";
		var quotedUser="(\"[^\"]*\")";
		var ipDomainPat=new RegExp("^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$");
		var atom=validChars + '+';
		var word="(" + atom + "|" + quotedUser + ")";
		var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
		var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");
		var matchArray=emailStr.match(emailPat);
		if (matchArray==null) return false;
		var user=matchArray[1];
		var domain=matchArray[2];
		if (user.match(userPat)==null) return false;
		var IPArray=domain.match(ipDomainPat);
		if (IPArray!=null) {
			for (var i=1;i<=4;i++) if (IPArray[i]>255) return false;
			return true;
		}
		var domainArray=domain.match(domainPat)
		if (domainArray==null) return false;
		var atomPat=new RegExp(atom,"g");
		var domArr=domain.match(atomPat);
		var len=domArr.length;
		if (domArr[domArr.length-1].length<2 || domArr[domArr.length-1].length>3) return false;
		if (len<2) return false;
		return true;
	}

	function validateInput(formname) {

		var error	= new Array();
		var msg;
		var i		= 0;
		var jumpto	= false;

		switch (formname) {
			case "author":
					/* new author: last name or organisation */
					var lastname		= document.forms[0].author_item_2;
					/*var organisation	= document.forms[0].author_item_3;
					var organisation2	= document.forms[0].author_item_4;
					&& organisation.value == "" && organisation2.value == ""*/
					if (lastname.value == "" ) {error[i] = "a <strong>last name</strong> is essential for an author. please add one.";++i;}
				break;
			case "author_reference":
					/* new author: last name or organisation */
					var lastname		= document.forms[0].author_reference_item_2;
					/*var organisation	= document.forms[0].author_reference_item_3;
					var organisation2	= document.forms[0].author_reference_item_4;
					&& organisation.value == "" && organisation2.value == ""*/
					if (lastname.value == "" ) {error[i] = "a <strong>last name</strong> is essential for an author. please add one.";++i;}
				break;
			case "topic":
					/* new topic: name and definition */
					var name		= document.forms[0].topic_item_1;
					var definition	= document.forms[0].topic_item_2;
					if (name.value == "") {error[i] = "a <strong>name</strong> is essential for a topic. please add one.";++i;}
					if (definition.value == "") {error[i] = "a <strong>definition</strong> is essential for a topic. please add one.";++i;}
				break;
			case "publisher":
					/* new publisher: organisation */
					var organisation	= document.forms[0].publisher_item_1;
					if (organisation.value == "") {error[i] = "an <strong>organisation</strong> is essential for a publisher. please add one.";++i;}
				break;
			case "journal":
					/* new publisher: organisation */
					var journal	= document.forms[0].journal_item_1;
					if (journal.value == "") {error[i] = "a <strong>title</strong> is essential for a journal. please add one.";++i;}
				break;
			case "submittor":
					/* new submittor: current user �r last name or organisation */
					var currentuser		= document.forms[0].submittor_item_1;
					var lastname		= document.forms[0].submittor_item_3;
					/*var organisation	= document.forms[0].submittor_item_4;
					var organisation2	= document.forms[0].submittor_item_5;
					&& organisation.value == "" && organisation2.value == ""*/
					if (currentuser.selectedIndex <= 0 && lastname.value == "" ) {error[i] = "a <strong>current user</strong> or a <strong>last name</strong> is essential for a submitter. please add one.";++i;}
				break;
			case "asset":
					/* title and file */
					var title	= document.forms[0].asset_title;
					var file	= document.forms[0].asset_file;
					var file2	= document.forms[0].asset_file_hidden;
					if (title.value == "") {error[i] = "a <strong>title</strong> is essential for an asset. please add one.";++i;}
					if (file.value == "" && file2.value == "") {error[i] = "a <strong>file</strong> is essential for an asset. please add one.";++i;}
				break;
			case "reference":
					/* title */
					var title	= document.forms[0].publication_title;
					if (title.value == "") {error[i] = "a <strong>title</strong> is essential for a reference. please add one.";++i;}
				break;
			case "savereference":
					/* check reference is saved */
					var publication_title = trim(document.forms[0].publication_title.value);
					if( publication_title != '') {
						error[i] = "please save or delete your <strong>reference details</strong> before continuing.";

						++i;
						msg	= "Some information has not been saved.<br /><ul>";
					}
				break;
			case "saveasset":
					/* check asset is saved */
					var asset_title = trim(document.forms[0].asset_title.value);
					if( asset_title != '') {
						error[i] = "please save or delete your <strong>asset details</strong> before continuing.";
						++i;
						msg	= "Some information has not been saved.<br /><ul>";
					}
				break;
			case "acceptmodal":
				/* this validation is used by the ok button of the showAlert, this is called by the storeContent functions which calls the validation. */
				break;
			case "description":
			default:
					/* model: title and description */
					var title		= document.forms[0].model_title;
					if(document.getElementById('modeldescr')){
						var desc_value = document.forms[0].model_descr.value	= tinyMCE.get('modeldescr').getContent();
					}else{
						var desc_value = document.forms[0].model_descr.value;
					}

					if (title.value == "") {error[i] = "a <strong>title</strong> is essential for a model. please add one.";++i;}
					if ( strip_tags(desc_value) == "" ) {error[i] = "a <strong>description</strong> is essential for a model. please add one.";++i;}

					// Check file extenstion
					if (document.forms[0].model_image) {
						var uploadfield = document.forms[0].model_image;
						var filename = uploadfield.value;
						var filelength = parseInt(filename.length) - 3;
						var fileext = filename.substring(filelength, filelength + 3);
						if (fileext != ''  && fileext != 'gif' && fileext != 'jpg' && fileext != 'png') { error[i] = "an <strong>image</strong> upload must be of the extension .gif, .jpg or .png. please correct.";++i;	}
					}
					var jumpto	= (location.href.indexOf("/model/add")!=-1)?"/model/add/description":((location.href.indexOf("/edit")!=-1)?"./":"./edit/description");
					if (location.href.substring(location.href.indexOf(jumpto)) != jumpto) {
						if (title.value == "" || strip_tags(desc_value) == "" ) {
							error[i] = "you will be taken to  page '1. description' where you can add the missing information.";++i;
						}
					}
				break;
		}

		if (error.length > 0) {
			if(!msg)
				msg	= "some required information was left blank or incorrect.<br />please read the following:<ul>";

			for (i = 0; i < error.length; ++i) msg += "<li><nobr>"+error[i]+"</nobr></li>";
			msg += "</ul>";
			if (location.href.substring(location.href.indexOf(jumpto)) != jumpto) {
				showAlert(msg, jumpto);
			}else{
				showAlert(msg);
			}
			document.forms[0].publish.value='';
			return false;
		}

		if (formname == "author" || formname == "topic" || formname == "author_reference" || formname == "publisher" || formname == "journal" || formname == "submittor"){
			saveRecord(formname);
		}
		return true;
	}

	function strip_tags(str) {
	   return str.replace(/<\/?[^>]+>/gi, "");
	}

	function saveRecord(formname)
	{
		switch (formname) {
			case "author":
				var author_item_1		= $("author_item_1").serialize(true);
				var author_item_2		= $("author_item_2").serialize(true);
				var author_item_3		= $("author_item_3").serialize(true);
				var author_item_4		= $("author_item_4").serialize(true);
				var author_item_5		= $("author_item_5").serialize(true);
				var author_item_6		= $("author_item_6").serialize(true);
				var author_item_7		= $("author_item_7").serialize(true);
				var postValues = author_item_1+'&'+author_item_2+'&'+author_item_3+'&'+author_item_4+'&'+author_item_5+'&'+author_item_6+'&'+author_item_7;
				break;
			case "author_reference":
				var author_reference_item_1		= $("author_reference_item_1").serialize(true);
				var author_reference_item_2		= $("author_reference_item_2").serialize(true);
				var author_reference_item_3		= $("author_reference_item_3").serialize(true);
				var author_reference_item_4		= $("author_reference_item_4").serialize(true);
				var author_reference_item_5		= $("author_reference_item_5").serialize(true);
				var author_reference_item_6		= $("author_reference_item_6").serialize(true);
				var author_reference_item_7		= $("author_reference_item_7").serialize(true);

				var postValues = author_reference_item_1+'&'+author_reference_item_2+'&'+author_reference_item_3+'&'+author_reference_item_4+'&'+author_reference_item_5+'&'+author_reference_item_6+'&'+author_reference_item_7;
				break;
			case "topic":
				var topic_item_1		= $("topic_item_1").serialize(true);
				var topic_item_2		= $("topic_item_2").serialize(true);
				var topic_item_3		= $("topic_item_3").serialize(true);
				var topic_item_4		= $("topic_item_4").serialize(true);
				var topic_item_5		= $("topic_item_5").serialize(true);
				var topic_item_6		= $("topic_item_6").serialize(true);
				var postValues = topic_item_1+'&'+topic_item_2+'&'+topic_item_3+'&'+topic_item_4+'&'+topic_item_5+'&'+topic_item_6;
				break;
			case "publisher":
				/* new publisher: organisation */
				var publisher_item_1		= $("publisher_item_1").serialize(true);
				var publisher_item_2		= $("publisher_item_2").serialize(true);
				var publisher_item_3		= $("publisher_item_3").serialize(true);
				var postValues = publisher_item_1+'&'+publisher_item_2+'&'+publisher_item_3;
				break;
			case "journal":
				/* new publisher: organisation */
				var journal_item_1		= $("journal_item_1").serialize(true);
				var journal_item_2		= $("journal_item_2").serialize(true);
				var journal_item_3		= $("journal_item_3").serialize(true);
				var journal_item_4		= $("journal_item_4").serialize(true);
				var postValues = journal_item_1+'&'+journal_item_2+'&'+journal_item_3+'&'+journal_item_4;
				break;
			case "submittor":
				/* new submittor: current user �r last name or organisation */
				var submittor_item_1		= $("submittor_item_1").serialize(true);
				var submittor_item_2		= $("submittor_item_2").serialize(true);
				var submittor_item_3		= $("submittor_item_3").serialize(true);
				var submittor_item_4		= $("submittor_item_4").serialize(true);
				var submittor_item_5		= $("submittor_item_5").serialize(true);
				var submittor_item_6		= $("submittor_item_6").serialize(true);
				var postValues = submittor_item_1+'&'+submittor_item_2+'&'+submittor_item_3+'&'+submittor_item_4+'&'+submittor_item_5+'&'+submittor_item_6;
				break;
		}

		// prepare post options and fields
		var saveRecordOptions = {
		    method : 	'post',
		    encoding:   'UTF-8',
		    postBody: 	'event=save_'+formname+'&'+postValues,
			onSuccess:	handlerFunc,
			onFailure:	errFunc
		};

		// do request
		new Ajax.Request('/savepart.php', saveRecordOptions);

		return;
	}
		var handlerFunc = function(t) {
			try {
//var textResponse  	= t.responseText;
//alert(textResponse);
					var xmlResponse  	= t.responseXML.documentElement;
			} catch(e) {
				var errormsg	= e.message;
			}

			// handle error
			var errormsg		= nodeValue(xmlResponse, "errormsg");
			if(errormsg)
			{
				showAlert(errormsg);
				return;
			}

//var sql		= nodeValue(xmlResponse, "sql");
//alert(sql);

			var exists	= nodeValue(xmlResponse, "exists");
			if(exists)
			{
				showAlert(exists);
				return;
			}

			var id				= nodeValue(xmlResponse, "id");
			var formname		= nodeValue(xmlResponse, "formname");

//alert('ID:' + id +';formname'+ formname);
			if (formname == "author" || formname == "topic")
			{
				addItemToList(formname, true,id);
			}
			else if(formname == "author_reference" || formname == "publisher" || formname == "journal" || formname == "submittor"){
				addItemToList(formname, false,id);
			}
			return;
		}

		var errFunc = function(t) {
			alert('Error ' + t.status + ' -- ' + t.statusText);
		}

		function nodeValue(node, name) {
		var childs = node.getElementsByTagName(name);
		if (childs.length > 0 && childs.item(0).childNodes.length > 0)
			return childs.item(0).childNodes.item(0).nodeValue;
		return "";
	}

	function checkISBNStatus()
	{
		var r = document.getElementById('journalcontainer').getElementsByTagName('select');
		var journal = null;
		for (i = 0; i < r.length; i++) {
			if(r[i].selectedIndex > 0){
				journal = true;
			}
		}
		if(journal){
			document.references.publication_isbn.disabled = true;
		}else{
			document.references.publication_isbn.disabled = false;
		}
	}
