<!-- Begin

function checkRadio(id){
	var radioButtons = document.getElementsByTagName("selection");
	var chkFlag = 0;
	var i = id;
	//alert(e);
	//alert(id);
	while(i > 0){
		if( document.getElementById(i).checked == true ){
			chkFlag++;
			//alert(document.getElementById(i).checked);
		}//works fine
		i--;
	}
	
	function setColour(elementID) {	
		var oldID = readCookie("ID");
		if(oldID){document.getElementById(oldID).style.backgroundColor='';}
		document.getElementById(elementID).style.backgroundColor='#F1F1F1';
		if (oldID!=elementID) {
			eraseCookie("ID");
			createCookie("ID",elementID,1);
		}
		return true;
	}
	
	if(chkFlag<=0){
		alert("You have not selected a vehicle!");
		//window.location="index.php?option=com_carman&task=booking2&Itemid=26&msg=You%20did%20not%20select%20vehicle";
		return false;
	}else{
		return true;
	}
}

function dspStatus(msgStr) {
  status=msgStr;
  document.returnVal = true;
}

function popup_open(theURL,winName,features) {
  pop=window.open(theURL,winName,features)
  return false;
}

function menuShow(id) {
  if (document.getElementById(id).style.display == 'block') {
    document.getElementById(id).style.display = 'none';
    if (id == "print") {
      for (var i = 0; i < printArray.length; i++) {
        document.getElementById(printArray[i]).style.display = 'block';
      }
    }
  } else {
    document.getElementById(id).style.display = 'block';
    if (id == "print") {
      for (var i = 0; i < printArray.length; i++) {
        document.getElementById(printArray[i]).style.display = 'none';
      }
    }
  }
}

nereidFadeObjects=new Object();
nereidFadeTimers=new Object();
function nereidFade(object,destOp,rate,delta) {
  if(!document.all) return

  if(object!="[object]") 	{
    setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0);return;
  }
	
  clearTimeout(nereidFadeTimers[object.sourceIndex]);
  diff=destOp-object.filters.alpha.opacity;direction=1;
	
  if(object.filters.alpha.opacity>destOp) {
    direction=-1;
  }
	
  delta=Math.min(direction*diff,delta);
  object.filters.alpha.opacity+=direction*delta;
  if(object.filters.alpha.opacity!=destOp) {
    nereidFadeObjects[object.sourceIndex]=object;
    nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
  }
}

function confirmLink(theLink, theSqlQuery)
{
    // Confirmation is not required in the configuration file
    if (confirmMsg == '') {
        return true;
    }

    var is_confirmed = confirm(confirmMsg + ' :\n' + theSqlQuery);
    if (is_confirmed) {
        theLink.href += '&is_js_confirmed=1';
    }

    return is_confirmed;
} // end of the 'confirmLink()' function

/**
 * Checks/unchecks all rows
 *
 * @param   string   the form name
 * @param   boolean  whether to check or to uncheck the element
 * @param   string   basename of the element
 * @param   integer  min element count
 * @param   integer  max element count
 *
 * @return  boolean  always true
 */
// modified 2004-05-08 by Michael Keck <mail_at_michaelkeck_dot_de>
// - set the other checkboxes (if available) too
function setCheckboxesRange(the_form, do_check, basename, min, max)
{
    for (var i = min; i < max; i++) {
        if (typeof(document.forms[the_form].elements[basename + i]) != 'undefined') {
            document.forms[the_form].elements[basename + i].checked = do_check;
        }
        if (typeof(document.forms[the_form].elements[basename + i + 'r']) != 'undefined') {
            document.forms[the_form].elements[basename + i + 'r'].checked = do_check;
        }
    }

    return true;
} // end of the 'setCheckboxesRange()' function

-->
