function makeButton(btnID, action, formName, btnTitle, btnDimmed ,jsaction) {
	//btnID is Div around the buttons ID
	//action is name of the variable that the php script will be looking for.  (CAN NOT BE "submit"!!!!!)
	//formName is the name of the form it is submiting
	//btnTitle is the text that gest put in the button
	//btnDimmed if 1 disables the button.
	btnOnClick = '';
	if(jsaction){
		btnOnClick += jsaction;
	}else{
		btnOnClick += "submitForm('"+ formName +"','"+ btnID +"','" +action +"');";
	}
	btnContent ='';
	btnContent += '<div id="' + btnID + '" class="button" style="';
	if (!btnDimmed) {
		btnContent += document.all ? ' cursor:hand;"' : ' cursor:pointer;"';
	//	btnContent += ' onclick="' + btnOnClick + '"';
	}
	else {
		btnContent +='"';
	}
	btnContent +='>\n';
	btnContent += '<table cellpadding="0" cellspacing="0" border="0" class="S2Dbutton">\n';
	btnContent += '<tr>\n';
	btnContent += '<td width=12 style="';
	if (!btnDimmed) {
		btnContent += document.all ? ' cursor:hand;"' : ' cursor:pointer;"';
		btnContent += ' onclick="' + btnOnClick + '"';
	}
	else {
		btnContent += '"';
	}
	btnContent += '><img src="/images/';
	if (!btnDimmed) { btnContent += 'btn_left.gif'; } else { btnContent += 'btn_left_gray.gif'; }
	btnContent += '"></td>\n';
	btnContent += '<td style="text-align:center; background-image:url(/images/';
	if (!btnDimmed) { btnContent += 'btn_middle.gif'; } else { btnContent += 'btn_middle_gray.gif'; }
	btnContent += ');';
	if (!btnDimmed) {
		btnContent += document.all ? ' cursor:hand;"' : ' cursor:pointer;"';
		btnContent += ' onclick="' + btnOnClick + '"';
	}
	else {
		btnContent += '"';
	}
	btnContent += '>';
	btnContent += '<span class="btn_text">' + btnTitle + '</span>';
	btnContent += '</td>\n';
	btnContent += '<td width=12 style="';
	if (!btnDimmed) {
		btnContent += document.all ? ' cursor:hand;"' : ' cursor:pointer;"';
		btnContent += ' onclick="' + btnOnClick + '"';
	}
	else {
		btnContent += '"';
	}
	btnContent += '><img src="/images/';
	if (!btnDimmed) { btnContent += 'btn_right.gif'; } else { btnContent += 'btn_right_gray.gif'; }
	btnContent += '"></td>\n';
	btnContent += '</tr>\n';
	btnContent += '</table>\n';
	btnContent += '</div>\n';
	
	if (checkIt('msie')){
		btnContent += '<input id="btnID'+ btnID +'" name="' + action + '" value="' + action + '" type="submit" style="border:none; background-color:#FFFFFF; height:1px; width:1px;float:left;" />';
	}else{
		btnContent += '<input id="btnID'+ btnID +'" name="' + action + '" value="' + action + '" type="submit" style="display:none;" />';
	}
	
	document.write(btnContent);
}



var detect = navigator.userAgent.toLowerCase();
var OS,browser,version,total,thestring;
function checkIt(string)
{
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}
function submitForm(formName , btnID, action ){
	document.getElementById('btnID'+btnID).click();
}
