cols=new Array() // default hover visited 
cols[0]=new Array("#000070","d2ddbf","orange") 
cols[1]=new Array("red","#c6e0ea","green") 
//cols[2]=new Array("#bbb096","#e7e6dd","#e9dac6") 
//cols[3]=new Array("#6f7a52","#b2be94","#edecec") 

LastID = "" 
LeftID = ""
function m_over(id,num){ 
if(LastID != id){ 
document.getElementById(id).style.backgroundColor = cols[num][1] //onmouseover colour 
}
} 

function m_out(id,num){ 
if(LastID != id){ 
document.getElementById(id).style.backgroundColor = cols[num][0] // onmouseout colour 
} 
} 

function ChangeForeGroundColour(id,num){
document.getElementById(id).style.color  = cols[num][2] // onclick 
if (LastID != id && LastID != ""){ 
document.getElementById(LastID).style.color = cols[lastcol][0] // colour back to default 
} 

LastID = id 
lastcol=num 
}
function ChangeLeftForeGroundColour(id,num){
document.getElementById(id).style.color  = cols[num][2] // onclick 
if (LeftID != id && LeftID != ""){//alert(LeftLastCol);alert(id);
document.getElementById(LeftID).style.color = cols[LeftLastCol][0] // colour back to default 
} 

LeftID = id 
LeftLastCol=num 
} 

//
LastID1 = "" 
function ChangeBackGroundColour(id,num){
document.getElementById(id).style.backgroundColor = cols[num][2] // onclick 
if (LastID1 != id && LastID1 != ""){ 
document.getElementById(LastID1).style.backgroundColor = cols[lastcol1][0] // colour back to default 
} 

LastID1 = id 
lastcol1=num 
}
 
window.onerror=SuppressError
function SuppressError()
{
	return false;
	
}
function expand(sec)
{
     thisSec = eval('e' + sec);
     if (thisSec != null){
          if (thisSec.length){
               if (thisSec[0].style.display != 'none'){
                    for (var i=0;i<thisSec.length;i++) {thisSec[i].style.display = 'none'}
               }
               else{
                    for (var i=0;i<thisSec.length;i++) {thisSec[i].style.display = 'inline'}
               }
          }
          else{
                         if (thisSec.style.display != 'none')     {thisSec.style.display = 'none'}
               else{thisSec.style.display = 'inline'
               					for (var i=0;i<50;i++) {
               						thisSec2 = eval('e' + i);
               						if(thisSec != thisSec2){
               							
               							thisSec2.style.display = 'none'
               							//alert(thisSec2);
               						}
               						//else{alert('thisSec2');}

								}
               
               }
          }
     }
}
function expand2(sec)
{
     thisSec = eval('E' + sec);
     if (thisSec != null){
          if (thisSec.length){
               if (thisSec[0].style.display != 'none'){
                    for (var i=0;i<thisSec.length;i++) {thisSec[i].style.display = 'none'}
               }
               else{
                    for (var i=0;i<thisSec.length;i++) {thisSec[i].style.display = 'inline'}
               }
          }
          else{
                         if (thisSec.style.display != 'none')     {thisSec.style.display = 'none'}
               else{thisSec.style.display = 'inline'
               					for (var i=0;i<50;i++) {
               						thisSec2 = eval('E' + i);
               						if(thisSec != thisSec2){
               							
               							thisSec2.style.display = 'none'
               							//alert(thisSec2);
               						}
               						//else{alert('thisSec2');}

								}
               
               }
          }
     }
}
function expand4(sec)
{
     thisSec = eval('a' + sec);
     if (thisSec != null){
          if (thisSec.length){
               if (thisSec[0].style.display != 'none'){
                    for (var i=0;i<thisSec.length;i++) {thisSec[i].style.display = 'none'}
               }
               else{
                    for (var i=0;i<thisSec.length;i++) {thisSec[i].style.display = 'inline'}
               }
          }
          else{
                         if (thisSec.style.display != 'none')     {thisSec.style.display = 'none'}
               else{thisSec.style.display = 'inline'
               					for (var i=0;i<50;i++) {
               						thisSec2 = eval('a' + i);
               						if(thisSec != thisSec2){
               							
               							thisSec2.style.display = 'none'
               							//alert(thisSec2);
               						}
               						//else{alert('thisSec2');}

								}
               
               }
          }
     }
}

function isEmailAddr(email)
{
  var result = false
  var theStr = new String(email)
  var index = theStr.indexOf("@");
  if (index > 0)
  {
    var pindex = theStr.indexOf(".",index);
    if ((pindex > index+1) && (theStr.length > pindex+1))
	result = true;
  }
  return result;
}

function FormValidatorPremiumListing(theForm)
{
 if (theForm.DoctorsName.value == "")
  {
    alert("Please enter a value for the \"Doctors Name\" field.");
    theForm.DoctorsName.focus();
    return (false);
  }
  if (theForm.PracticeName.value == "")
  {
    alert("Please enter a value for the \"Practice Name\" field.");
    theForm.PracticeName.focus();
    return (false);
  }    
  if (theForm.Address.value == "")
  {
    alert("Please enter a value for the \"Address\" field.");
    theForm.Address.focus();
    return (false);
  }

  if (theForm.City.value == "")
  {
    alert("Please enter a value for the \"City\" field.");
    theForm.City.focus();
    return (false);
  }
  if (theForm.State.value == "")
  {
    alert("Please enter a value for the \"State\" field.");
    theForm.State.focus();
    return (false);
  }
  if (theForm.Zip.value == "")
  {
    alert("Please enter a value for the \"Zip\" field.");
    theForm.Zip.focus();
    return (false);
  }
      
      
  if (theForm.phone.value.length < 10)
  {
    alert("Please enter your \"Phone no\" .");
    theForm.phone.focus();
    return (false);
  }
if (theForm.chkPremiumListing.checked) {
  if (theForm.email.value == "")
  {
    alert("Please enter a value for the \"email\" field.");
    theForm.email.focus();
    return (false);
  }

  if (!isEmailAddr(theForm.email.value))
  {
    alert("Please enter a complete email address in the form: yourname@yourdomain.com");
    theForm.email.focus();
    return (false);
  }
   
  if (theForm.email.value.length < 3)
  {
    alert("Please enter at least 3 characters in the \"email\" field.");
    theForm.email.focus();
    return (false);
  }
}
  return (true);
}


function FormValidator(theForm)
{
 if (theForm.name.value == "")
  {
    alert("Please enter a value for the \"Name\" field.");
    theForm.name.focus();
    return (false);
  }
  if (theForm.email.value == "")
  {
    alert("Please enter a value for the \"email\" field.");
    theForm.email.focus();
    return (false);
  }

  if (!isEmailAddr(theForm.email.value))
  {
    alert("Please enter a complete email address in the form: yourname@yourdomain.com");
    theForm.email.focus();
    return (false);
  }
   
  if (theForm.email.value.length < 3)
  {
    alert("Please enter at least 3 characters in the \"email\" field.");
    theForm.email.focus();
    return (false);
  }    
  if (theForm.subject.value == "")
  {
    alert("Please enter a value for the \"Subject\" field.");
    theForm.subject.focus();
    return (false);
  }
    
  if (theForm.phone.value.length < 10)
  {
    alert("Please enter your \"Phone no\" .");
    theForm.phone.focus();
    return (false);
  }
   
  if (theForm.comments.value == "")
  {
    alert("Please enter a value for the \"Comments\" field.");
    theForm.comments.focus();
    return (false);
  }
  return (true);
}


function popUpWindow(URL) {
var look='toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=480,height=540,'
popwin=window.open(URL,'',look)
}
function popUpWindowSmall(URL) {
var look='toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=400,height=400,'
popwin=window.open(URL,'',look)
}
function popUpWindowPDF(URL) {
var look='toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=950,height=800,'
popwin=window.open(URL,'',look)
}
function popUpWindowMap(URL) {
var look='toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=740,height=700,'
popwin=window.open(URL,'',look)
}
function popupwindowEditor(URL) {
var look = 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=600,height=580,'
popwin = window.open(URL, '', look)
}
function popUpWindowBig(URL) {
var look='toolbar=1,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=950,height=800,'
popwin=window.open(URL,'',look)
}
/*function popUpWindowSmall(URL) {
var look='toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=650,height=520,'
popwin=window.open(URL,'',look)
}*/
function popUpWindowPDF(URL) {
var look='toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=950,height=800,'
popwin=window.open(URL,'',look)
}
function popUpWindowSurvey(URL) {
var look='toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=800,height=1024,'
popwin=window.open(URL,'',look)
}
function popupwindowtemplates(URL) {
var look='toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=600,height=460,'
popwin=window.open(URL,'',look)
}
//<!--No right Mouse Click-->
function noRightClick(){
	if (event.button==2){
	alert('You may not right mouse click on this page.')
	}
}
document.onmousedown=noRightClick

function noRightClickMozilla()
{                if (document.onContextmenu = true)
                {
                alert('You may not right mouse click on this page.');
                return false;
                }
}
document.oncontextmenu=noRightClickMozilla;

function RightExpand(sec){
thisSec = eval('TopMenuExpand' + sec);
	if(thisSec != eval('TopMenuExpand2')){//Not Index Page
		RightToggle0.style.display='inline'
	}
	else{//alert(thisSec);
	RightToggle0.style.display='none'}	
}

function TopMenuExpand(sec)
{RightExpand(sec) //Disabled, Enable this to hide the Right Include when the Template page loads
	TopLeftToggle1.style.display = 'none'
	TopLeftToggle0.style.display = 'inline'
	//alert(TopMenuExpand1.style.display);
	
     thisSec = eval('TopMenuExpand' + sec);
	     
     if (thisSec != null){
			if (thisSec.style.display != 'none'){
				thisSec.style.display = 'inline'//Just for this menu, we don't want the user to be able to hide the page
			}
            else{        
				if(thisSec !=eval('TopMenuExpand999')){//Not Index Page
					thisMainSec = eval('TopMenuExpandFrame');
					thisMainSec.style.display = 'inline'
					thisShowImage = eval('TopMenuShowImage' + sec);
					thisShowImage.style.display = 'inline'
					TopMenuExpand999.style.display = 'none'
				}
				else{
					thisMainSec.style.display = 'none' //Do not show the frame below the menu
				}
                thisSec.style.display = 'inline'
				for (var i=0;i<10;i++){
               		thisSec2 = eval('TopMenuExpand' + i);
               		thisShowImageCompare = eval('TopMenuShowImage' + i);
               		if(thisSec != thisSec2){
               			thisSec2.style.display = 'none'
               		}
               		if(thisShowImage !=thisShowImageCompare){
               			thisShowImageCompare.style.display='none'
               		}
				}
			}
     }
}

function LeftMenuExpand(sec)
{	//Disabled, Enable this to hide the Right Include when the Clients page loads
	if(RightToggle0.style.display='none'){//This for the Right Include File. Display the file if it is not displayed.
		RightToggle0.style.display='inline'}
	
	TopLeftToggle0.style.display = 'none'//Disable the display for the Top Menu Items
	TopLeftToggle1.style.display = 'inline'//Enable the display the Left Menu Items
     thisSec = eval('LeftMenuExpand' + sec);

     if (thisSec != null){
			if (thisSec.style.display != 'none'){
				//thisSec.style.display = 'none'
				thisSec.style.display = 'inline'//Just for this menu, we don't want the user to be able to hide the page
			}
            else{if(thisSec !=eval('TopMenuExpand999')){//Not Index Page
					thisMainSec = eval('TopMenuExpandFrame');
					thisMainSec.style.display = 'inline'
					//thisShowImage = eval('TopMenuShowImage2');
					//thisShowImage.style.display = 'inline'
					TopMenuExpand999.style.display = 'none'
				}
				else{
					thisMainSec.style.display = 'none' //Do not show the frame below the menu
				}
               thisSec.style.display = 'inline'
				for (var i=0;i<10;i++){
               		thisSec2 = eval('LeftMenuExpand' + i);
               		if(thisSec != thisSec2){
               			thisSec2.style.display = 'none'
               		}
				}
               
			}
     }
}
function popupwindowEditor(URL) {
    var look = 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=600,height=580,'
    popwin = window.open(URL, '', look)
}

