function textLimit(field, maxlen, errlabelid, errlabelmsg) {
	if (field.value.length > maxlen) {
		field.value = field.value.substring(0, maxlen);
		//Form1.Bib_addcomp1_dbError.value = 'bla';		
		//alert('your input has been truncated!');
		window.document.getElementById(errlabelid).innerHTML = errlabelmsg;
	}
}

function validateLTGT(field, errlabelid, errlabelmsg)
{
	ilt = field.value.indexOf("<");
	igt = field.value.indexOf(">");
	
	if(ilt == -1)
	{
		window.document.getElementById(errlabelid).innerHTML = "Please remove all occurences of < or >";
	}
	
	if(igt ==-1)
	{
		window.document.getElementById(errlabelid).innerHTML = "Please remove all occurences of < or >";
	}
	
}

/*
function windowValue(theValue) {
	alert('bla');
	qs = new Querystring();
	alert('bla');
	value = qs.get("formname","default");
	alert(value);
	window.opener.document.getElementById(value).value = theValue;
	window.close();
}

function Querystring()
{
// get the query string, ignore the ? at the front.
	var querystring=location.search.substring(1,location.search.length);

// parse out name/value pairs separated via &amp;
	var args = querystring.split('&amp;');

// split out each name = value pair
	for (var i=0;i&lt;args.length;i++)
	{
		var pair = args[i].split('=');

		// Fix broken unescaping
		temp = unescape(pair[0]).split('+');
		name = temp.join(' ');

		temp = unescape(pair[1]).split('+');
		value = temp.join(' ');

		this[name]=value;
	}

	this.get=Querystring_get;
}


function Querystring_get(strKey,strDefault)
{
	var value=this[strKey];
	if (value==null)
	{
		value=strDefault;
	}

	return value;
}*/



