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 popUpWindowGlimpse(URL) {
var look='toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=800,height=650,'
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 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)
}
