// opens a window for terms of business
function openWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function setListeners(){
	inputList = document.getElementsByTagName("INPUT");
	for(i=0;i<inputList.length;i++){
		inputList[i].attachEvent("onpropertychange",restoreStyles);
		inputList[i].style.backgroundColor = "";
	}
	selectList = document.getElementsByTagName("SELECT");
	for(i=0;i<selectList.length;i++){
	  selectList[i].attachEvent("onpropertychange",restoreStyles);
	  selectList[i].style.backgroundColor = "";
	}
}

// solves ie & google bar colouring certain fields yellow
function restoreStyles(){
if(event.srcElement.style.backgroundColor != "")
	event.srcElement.style.backgroundColor = "";
}



// new show / hide
/* http://blog.movalog.com/a/javascript-toggle-visibility/ */
function clickclear(thisfield, defaulttext) {
if (thisfield.value == defaulttext) {
thisfield.value = "";
}
}

function clickrecall(thisfield, defaulttext) {
if (thisfield.value == "") {
thisfield.value = defaulttext;
}
}
