//This is for the rollover menu 

<!--
// window.onload=montre;
// function montre(id) {
// var d = document.getElementById(id);
//	for (var i = 1; i<=10; i++) {
//		if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
//	}
// if (d) {d.style.display='block';}
//}

//function show(id) {
	//	document.getElementById('item'+ID).style.display='block';
//}


// This is the src code for the rollover menus on the main page

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function setBackgroundColor(id, bgcolor) {
    if (document.getElementById) {
        document.getElementById(id).style.backgroundColor = bgcolor;
    }
}

/*******************************************************************************************************************************
	validateAddUser()        onClick="javascript: return validateAddUser(this.form);"
	
	Description:
	Test the given input to determine if all required fields have been entered correctly.
*******************************************************************************************************************************/
function validateAddUser(obj)
{
var error = "";

// PERSONAL INFORMATION --------------------------------------------------------------------------

if (obj.contact.value == "")
    {
      error += "Please fill in the contact name." + "\n";
    }
if (obj.company.value == "")
    {
      error += "Please fill in the company name." + "\n";
    }
if (obj.city.value == "")
    {
      error += "Please fill in the city." + "\n";
    }  
if (obj.state.value == "")
    {
      error += "Please fill in the state." + "\n";
    }  
if (obj.zip.value == "")
    {
      error += "Please fill in the zip." + "\n";
    }
if (obj.username.value == "")
    {
      error += "Please fill in the username." + "\n";
    }  
// ERROR -------------------------------
if (error != "")
  { 
    alert(error);
    return (false);
  } else {
    return (true);
  }

}

/*******************************************************************************************************************************
	validateAddNews()        onClick="javascript: return validateAddUser(this.form);"
	
	Description:
	Test the given input to determine if all required fields have been entered correctly.
*******************************************************************************************************************************/
function validateAddNews(obj)
{
var error = "";

// PERSONAL INFORMATION --------------------------------------------------------------------------

if (obj.type.value == 0)
    {
      error += "Please fill in the news type." + "\n";
    }
if (obj.title.value == "")
    {
      error += "Please fill in the title." + "\n";
    }
if (obj.dateadded.value == "")
    {
      error += "Please fill in the date of the article." + "\n";
    }  
// ERROR -------------------------------
if (error != "")
  { 
    alert(error);
    return (false);
  } else {
    return (true);
  }

}

/*******************************************************************************************************************************
	validatePatientEdit()        onClick="javascript: return validateAddUser(this.form);"
	
	Description:
	Test the given input to determine if all required fields have been entered correctly.
*******************************************************************************************************************************/
function validatePatientEdit(obj)
{
var error = "";

// PERSONAL INFORMATION --------------------------------------------------------------------------

if (obj.p_fname.value == "")
    {
      error += "Please fill in the first name." + "\n";
    }
if (obj.p_lname.value == "")
    {
      error += "Please fill in the last name." + "\n";
    }

// ERROR -------------------------------
if (error != "")
  { 
    alert(error);
    return (false);
  } else {
    return (true);
  }

}