function changeval(obj) {
/* written by Aidan Thomson, 2005 for Zeta-Commerce */
   var type = obj[obj.selectedIndex].value;
   var objid = obj.id;var types; var ids;var changeid;
   if (objid == "printer_select" ) {
      var typesA = new Array(1);
      var idsA = new Array(1);
      var changeidA = new Array(1);
      typesA[0] = 'type'+type;
      idsA[0] = 'idc'+type;
      changeidA[0] = 'option_select';
      var y=0;
      if (objid == "searchFPageCountry") y=2;
      else y=1;
      var x=0;
      for (x=0; x<y; x++) {
         changeobject(objid, changeidA[x], typesA[x], idsA[x]);
      }
   }
   
   if (objid == "printer_select_f") {
 
 		var notValid=0;
 		for (i=0; i<isValid.length; i++) {
 			if (isValid[i] == type) {
 				notValid=0;
 				break;
 			}
 			else {
 				notValid=1;
 			}	
 		}
 		if (notValid==1) type=0;
   	var typesA = new Array(2);
      var idsA = new Array(2);
      var changeidA = new Array(2);
      if (type==-1) {
/*         typesA[0] = 'type01';
         idsA[0] = 'ida01';
         typesA[2] = 'typed';
         idsA[2] = 'idtd';
         typesA[1] = 'type01';
         idsA[1] = 'idt01';*/
      }
      else {
         typesA[0] = "dyeFilm"+type;
         idsA[0] = 'dyeFilm'+type;
         typesA[1] = 'printerConnection'+type;
         idsA[1] = 'printerConnection'+type;
      }
      changeidA[0] = 'dyeFilmType';
      changeidA[1] = 'connectionToPrinter';
      var y=0;
      if (objid == "searchFPageCountry") y=2;
      else y=2;
      var x=0;
      for (x=0; x<y; x++) {
         changeobject(objid, changeidA[x], typesA[x], idsA[x]);
      }
   }
}

function changeobject(objid, changeid, types, ids) {
	var valueArray=new Array;
	var optionArray=new Array;  
	valueArray = eval(ids);
   optionArray = eval(types);
//	alert(valueArray.constructor);
   for(var i=0; i<optionArray.length; i++) {
      var st = document.getElementById(changeid);
      st.options.length = 0;
      for(var j=0; j<optionArray.length; j++) {
         var val = optionArray[j];
         var val2 = valueArray[j];
         st.options[j] = new Option(val2,val);
      }
   }
}

function showInformation(obj) {
	element = obj.parentNode.htmlFor+"1";
	helpBox = document.getElementById(element);	
	if (helpBox.style.display == "none") {
		helpBox.style.display = "block";	
	}
	else if (helpBox.style.display == "block") {
		helpBox.style.display = "none";	
	}  
}

