//show
function show(name) {
if(document.getElementById(name).style.display == "none") {
document.getElementById(name).style.display = "block";
} else {
document.getElementById(name).style.display = "none";
}
}
//menu_s
img1 = "images/max.gif";
img2 = "images/min.gif";
function change_img(c_img) {
if (document.getElementById(c_img).src.indexOf(img1)!= -1)
document.getElementById(c_img).src = img2; 
else document.getElementById(c_img).src = img1;
}
//Ajax.Request1
function ajaxRequest1(url) {
  var aj = new Ajax.Request(
  url, {
   method:'post' 
   }
  );
}
//Ajax.Request2
function ajaxRequest2(url) {
  var aj = new Ajax.Request(url, {
  method:'get',
  requestHeaders: {Accept: 'application/json'},
  onSuccess: function(transport){
    var json = transport.responseText.evalJSON(true);
    alert(json.message);
    if(json.ipbun == "yes"){
    $(json.vcasobj).innerHTML = json.nrv;
    }
  }
});
}
//Ajax.Requestbrok
function ajaxRequestbrok(url) {
if(confirm("Are you sure you want to report this link as broken ?")) {
  var aj = new Ajax.Request(
  url, {
   method:'post' 
   }
  );
}
}
//check all boxes
function SetAllCheckBoxes(FormName, FieldName, CheckValue)
{
	if(!document.forms[FormName])
		return;
	var objCheckBoxes = document.forms[FormName].elements[FieldName];
	if(!objCheckBoxes)
		return;
	var countCheckBoxes = objCheckBoxes.length;
	if(!countCheckBoxes)
		objCheckBoxes.checked = CheckValue;
	else
		// set the check value for all check boxes
		for(var i = 0; i < countCheckBoxes; i++)
			objCheckBoxes[i].checked = CheckValue;
}


