function help(name) {
	url = '/cgi-bin/question.cgi?task=show&area=' + name;
	window.open(url,'question','toolbar=no,location=no,scrollbars=yes,width=450,height=270');
}
function disablecheckbox(myelement) {
	  if (document.hostingform.elements[myelement].checked == true) {
	     myoption = document.hostingform.elements[myelement].value;
	     alert(myoption + ' is not available for ' + document.hostingform.osys.value);
	  }
          document.hostingform.elements[myelement].disabled = true;
          document.hostingform.elements[myelement].checked = false;	
}
function enablecheckbox(myelement) {
          document.hostingform.elements[myelement].disabled = false;
}

function setextracookie () {
  document.cookie = "extras2=0"; 
}

function format ( expr, decPlaces ) {
	var str= "" + Math.round ( eval ( expr ) * Math.pow ( 10, decPlaces ) );
	while ( str.length <= decPlaces ) { str = "0" + str }
	var decpoint = str.length - decPlaces;
	var value=str.substring ( 0, decpoint ) + "." + str.substring ( decpoint, str.length );
	return value.toString();
}

function newWin(url) {
	window.open(url,'question','width=500,height=200');
	window.close();
}

function getCookie(name) {
  var dc = document.cookie;
  var prefix = name + "=";
  var begin = dc.indexOf("; " + prefix);
  if (begin == -1) {
    begin = dc.indexOf(prefix);
    if (begin != 0) return null;
  } else
    begin += 2;
  var end = document.cookie.indexOf(";", begin);
  if (end == -1)
    end = dc.length;
  return unescape(dc.substring(begin + prefix.length, end));
}

function printvars() {


for (var i=0;i<document.hostingform.length;i++)
{
	current = document.hostingform.elements[i];
	document.write('<TR><TD>' + i);
	document.write('<TD>' + current.name);
	document.write('<TD>' + current.type);
	document.write('<TD>' + current.value + '</TR>');
}


}

function right(e) {
if (navigator.appName == 'Netscape' && 
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' && 
(event.button == 2 || event.button == 3)) {
if (confirm("See FAQ?"))
  help('');
return false;
}
return true;
}

document.onmousedown=right;
document.onmouseup=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
window.onmousedown=right;
window.onmouseup=right;

