/*<!---
||BEGIN
 
||PAGE name||
general.js
 
|| AUTHOR ||
Mark Shilliday	
mark.shilliday@biznet-solutions.com
 
||DATE CREATED||
 24 08 2005
 
|| PURPOSE OF PAGE ||
Description:
 
 
 
|| REVISION HISTORY ||
date modified | developer name | Descriptions of modifications made
 
||END
 
--->
*/

function clearDefault (fieldid, defaultValue) {
	fieldojb = document.getElementById(fieldid);
	
	if (fieldojb.value == defaultValue){
		fieldojb.value = '';
	}
}



function listToArrray (list, delimiters)
{
	var listArray = new Array();
	var listValue = '';
	
	for (i=0; i < list.length; i ++){
		letter = list.charAt(i);
		if (letter == delimiters){
			listArray[listArray.length] = listValue;
			listValue = ''
		}
		else listValue = listValue + letter
		if (i+1 == list.length){
			listValue = listValue + list.charAt(list.length)
			listArray[listArray.length] = listValue;
		}
	}
	return listArray;
}

function disable (list, color){
	disablearray = listToArrray(list, ',');
	
	for (i = 0; i < disablearray.length; i++){
		formojb = document.getElementById(disablearray[i]);
		formojb.disabled = true;
		formojb.style.background = color;
	}
}

function enable (list, color){
	disablearray = listToArrray(list, ',');
	
	for (i = 0; i < disablearray.length; i++){
		formojb = document.getElementById(disablearray[i]);
		formojb.disabled = false;
		formojb.style.background = color;
	}
}
