function ismaxlength(obj){
	var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
	if (obj.getAttribute && obj.value.length>mlength)
	obj.value=obj.value.substring(0,mlength)
}
function popup(url,wh) {
	newwindow=window.open(url,'name',wh);
	if (window.focus) {newwindow.focus()}
	return false;
}
function roll_over(img_name, img_src){
   document[img_name].src = img_src;
}

function clearbox (b) {
   	var b,i;
	var select=document.getElementById(b);
	var options=select.getElementsByTagName("option");
		   
	for (i=options.length-1; i>=0; i--) {
	  select.removeChild(options[i]);
	}
}
function add_options(x,b) {
	if (x == "1") { 		

	option0 = new Option("Please Select",0);
	option1 = new Option("Value 1",1);
	option2 = new Option("Value 2",2);

	document.getElementById(b).options[0] = option0;
	document.getElementById(b).options[1] = option1;
	document.getElementById(b).options[2] = option2;
	return;
	}
}

function set_person($a){
	var $name = document.getElementById("name_" + $a).value;
	var $surname = document.getElementById("surname_" + $a).value;
	document.getElementById("person_" + $a).innerHTML = $name + ' ' + $surname;	
}

