//document.write('<style type="text/css">TR.subdiv{display:none;}</style>');

function Agent(){
  this.agent=navigator.userAgent.toLowerCase();
  this.opera = (this.agent.indexOf('opera')!=-1) ? true:false;
  this.ie = (this.agent.indexOf('msie')>=0) ? true:false;
  this.ns6 = ((this.agent.indexOf('gecko')>=0) && (this.agent.indexOf('opera')==-1)) ? true:false;
  this.ns4 = ((this.agent.indexOf('mozilla')>=0) && (this.agent.indexOf('gecko')==-1) && (this.agent.indexOf('msie')==-1)) ? true:false;
  return(1);
}
var is = new Agent();

function SwapImage(id,mode){
  var img = document.images[id].src;
  if(mode==1) document.images[id].src=img.substr(0,img.length-4)+'_o.'+img.substr(img.length-3,img.length);
  if(mode==0) document.images[id].src=img.substr(0,img.length-6)+'.'+img.substr(img.length-3,img.length);  
}


var param="";
function par()
{
	param=location.search.substring(1);
}


function opendiv(id){
	if (id=="") return;
	
	var display='none';
	with(document.getElementById("subdiv"+id)){
		if(style.display=='none' || style.display=='') 
			display=(is.ie)?'block':'table-row';
		style.display=display;
	}
}

function select(obj,over){
	var cl=obj.className;
	switch (over){
	case 1:
		cl+="-hover";
		break;
	case 0:
		cl=cl.substr(0,cl.lastIndexOf("-hover"));
		break;
	}
	obj.className=cl;
}

function select_process_other(obj){
	if((pos=obj.name.lastIndexOf("]"))==-1)
		other_name=obj.name+"_other";
	else
		other_name=obj.name.substr(0,pos)+"_other"+obj.name.substr(pos);
	if (obj.selectedIndex==obj.length-1){
	 	var br=document.createElement("br");
	 	obj.parentNode.appendChild(br)
	 	var field = document.createElement("input");
		field.type = "text";
		field.name=other_name;
		field.className="text";
		field.style.width="100%"
		obj.parentNode.appendChild(field);
		field.focus();
	}else if (obj.parentNode.lastChild.name==other_name){
		obj.parentNode.removeChild(obj.parentNode.lastChild);
	}
}

