
function handleError(msg, URL, lineNum) {
	var errWind = window.open("","errors","HEIGHT=270,WIDTH=400")
	errWind.focus();
	var wintxt = "<HTML><BODY BGCOLOR=RED>"
	wintxt += "<B>An error has occurred on this page.  Please report it to Tech Support.</B>"
	wintxt += "<FORM METHOD=POST ENCTYPE='text/plain' ACTION=mailTo:support4@dannyg.com >"
	wintxt += "<TEXTAREA NAME='errMsg' COLS=45 ROWS=8 WRAP=VIRTUAL>"
	wintxt += "Error: " + msg + "\n"
	wintxt += "URL: " + URL + "\n"
	wintxt += "Line: " + lineNum + "\n"
	wintxt += "Client: " + navigator.userAgent + "\n"
	wintxt += "-----------------------------------------\n"
	wintxt += "Please describe what you were doing when the error occurred:"
	wintxt += "</TEXTAREA><P>"
	wintxt += "<INPUT TYPE=SUBMIT VALUE='Send Error Report'>"
	wintxt += "<INPUT TYPE=button VALUE='Close' onClick='self.close()'>"
	wintxt += "</FORM></BODY></HTML>"
	errWind.document.write(wintxt)
	errWind.document.close()
	return true
}

function attachtoobj(id)
{
//alert(12);
  var ns4 = (document.layers); // this is simular as (document.layers)? true: false; if a browser contains over the document.layer class then the variable ns4 will be initialised on true.
  var ie4 = (document.all && !document.getElementById);
  var ie5 = (document.all && document.getElementById);
  var ns6 = (!document.all && document.getElementById);
  var obj
   if(ns4)
		obj = document.layers[id];
   else if(ie4) 
		obj = document.all[id];
   else if(ie5 || ns6) {
		obj = document.getElementById(id);
		}
	
   return obj;
}