function checkEmail(myForm) {
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(myForm.email.value)){
return (true)
}
alert("Invalid E-mail Address! Please re-enter.")
return (false)
}

function mmLoadMenus(site_url) {

  if (window.mm_menu_0) return;

  window.mm_menu_0 = new Menu("root",150,20,"Arial, Helvetica, sans-serif",11,"#BD7800","#FAE9D0","#FAE9D0","#BD7800","left","middle",0,0,500,0,0,true,true,true,8,true,true);
  
 // 
 // mm_menu_0.addMenuItem("LIPO-DISSOLVE","location='"+"meso_faq.html'");
 // mm_menu_0.addMenuItem("FRAXEL","location='"+"fraxel.html'");
 //  
 //  
//
mm_menu_0.addMenuItem("LASER LIPOSUCTION","location='"+"slimlipo.html'");
mm_menu_0.addMenuItem("LASER HAIR REMOVAL","location='"+"laser_Hair_Removal.html'");
 mm_menu_0.addMenuItem("BRAZILIAN BUTT LIFT","location='"+"Brazilian_Butt_Lift.html'");
mm_menu_0.addMenuItem("FRAXEL","location='"+"Fraxel.html'");
  mm_menu_0.addMenuItem("IPL/PHOTOFACIAL","location='"+"ipl.html'");
 mm_menu_0.addMenuItem("VEIN TREATMENT","location='"+"vein.html'");
 mm_menu_0.addMenuItem("BOTOX &reg;","location='"+"botox.html'");
   mm_menu_0.fontWeight="bold";
   mm_menu_0.hideOnMouseOut=true;
   mm_menu_0.menuBorder=1;
   mm_menu_0.menuLiteBgColor='#FAE9D0';
   mm_menu_0.menuBorderBgColor='#BD7800';
   mm_menu_0.bgColor='#FAE9D0';

  window.mm_menu_1 = new Menu("root",100,20,"Arial, Helvetica, sans-serif",11,"#BD7800","#FAE9D0","#FAE9D0","#BD7800","left","middle",0,0,500,0,0,true,true,true,8,true,true);
  
  //mm_menu_1.addMenuItem("PROCEDURE","location='"+"photos.html'");
  mm_menu_1.addMenuItem("BEFORE & AFTER","location='"+"beforeafter.html'");
  

   mm_menu_1.fontWeight="bold";
   mm_menu_1.hideOnMouseOut=true;
   mm_menu_1.menuBorder=1;
   mm_menu_1.menuLiteBgColor='#FAE9D0';
   mm_menu_1.menuBorderBgColor='#BD7800';
   mm_menu_1.bgColor='#FAE9D0';
 

  window.mm_menu_2 = new Menu("root",150,20,"Arial, Helvetica, sans-serif",11,"#BD7800","#FAE9D0","#FAE9D0","#BD7800","left","middle",0,0,500,0,0,true,true,true,8,true,true);
  
  //mm_menu_2.addMenuItem("ATLANTA","location='"+"pricelist_atlanta.html'");
 // mm_menu_2.addMenuItem("BOSTON","location='"+"pricelist_boston.html'");
  // mm_menu_2.addMenuItem("CHICAGO","location='"+"pricelist_chicago.html'");
 
 // mm_menu_2.addMenuItem("DALLAS","location='"+"pricelist_dallas.html'");
  mm_menu_2.addMenuItem("Laser Liposuction","location='"+"pricelist_dc.html'");
   mm_menu_2.addMenuItem("Laser Hair Removal","location='"+"Laser_Hair_Removal_PriceList.html'");
   
  
 //mm_menu_2.addMenuItem("DELAWARE","location='"+"pricelist_delaware.html'");
  // mm_menu_2.addMenuItem("HOUSTON","location='"+"pricelist_houston.html'");
 // mm_menu_2.addMenuItem("MIAMI","location='"+"pricelist_Miami.html'");

 //mm_menu_2.addMenuItem("DETROIT","location='"+"pricelist_detroit.html'");
  // mm_menu_2.addMenuItem("NASHVILLE","location='"+"pricelist_Nashville.html'");
 // mm_menu_2.addMenuItem("NEW YORK","location='"+"pricelist_newyork.html'");
//  mm_menu_2.addMenuItem("PHILADELPHIA","location='"+"pricelist_philly.html'");

 
  
 
  //mm_menu_2.addMenuItem("TEXAS","location='"+"texas_jumper.html'");
 

   mm_menu_2.fontWeight="bold";
   mm_menu_2.hideOnMouseOut=true;
   mm_menu_2.menuBorder=1;
   mm_menu_2.menuLiteBgColor='#FAE9D0';
   mm_menu_2.menuBorderBgColor='#BD7800';
   mm_menu_2.bgColor='#FAE9D0';
 
   window.mm_menu_3 = new Menu("root",155,20,"Arial, Helvetica, sans-serif",11,"#BD7800","#FAE9D0","#FAE9D0","#BD7800","left","middle",0,0,500,0,0,true,true,true,8,true,true);
  
  mm_menu_3.addMenuItem("DR. SEGEV","location='"+"drsegev.html'");
  mm_menu_3.addMenuItem("DR. APPLET","location='"+"drapplet.html'");


   mm_menu_3.fontWeight="bold";
   mm_menu_3.hideOnMouseOut=true;
   mm_menu_3.menuBorder=1;
   mm_menu_3.menuLiteBgColor='#FAE9D0';
   mm_menu_3.menuBorderBgColor='#BD7800';
   mm_menu_3.bgColor='#FAE9D0';
   
  window.mm_menu_4 = new Menu("root",120,20,"Arial, Helvetica, sans-serif",11,"#BD7800","#FAE9D0","#FAE9D0","#BD7800","left","middle",0,0,500,0,0,true,true,true,8,true,true);
                                      
                                    
                                    

                         
                                    
      mm_menu_4.addMenuItem("Boston","location='"+"locations_Boston.html'");                              
    mm_menu_4.addMenuItem("Georgia","location='"+"locations_Georgia.html'");   
  mm_menu_4.addMenuItem("Northern Virginia","location='"+"locations_va.html'");
 mm_menu_4.addMenuItem("Maryland","location='"+"locations_MD.html'");
  mm_menu_4.addMenuItem("Washington D.C.","location='"+"locations_DC.html'");
 mm_menu_4.addMenuItem("Virginia Beach","location='"+"locations_vabeach.html'");
  mm_menu_4.addMenuItem("Richmond","location='"+"locations_Richmond.html'");
 mm_menu_4.addMenuItem("Texas - Dallas","location='"+"locations_Dallas.html'"); 
  mm_menu_4.addMenuItem("Texas - Houston","location='"+"locations_Houston.html'");
  mm_menu_4.addMenuItem("Florida - Miami","location='"+"locations_miami.html'");
//  mm_menu_4.addMenuItem("HOUSTON","location='"+"locations_houston.html'");


  //mm_menu_4.addMenuItem("DETROIT","location='"+"locations_detroit.html'");
//mm_menu_4.addMenuItem("NASHVILLE","location='"+"locations_NASHVILLE.html'");
 // mm_menu_4.addMenuItem("NEW YORK","location='"+"locations_ny.html'");
  
  //  mm_menu_4.addMenuItem("RICHMOND","location='"+"locations_richmond.html'");

  //mm_menu_4.addMenuItem("VIRGINIA BEACH","location='"+"'");

//  mm_menu_4.addMenuItem("PHILADELPHIA","location='"+"locations_philly.html'");
   
   
  
  //mm_menu_4.addMenuItem("TEXAS","location='"+"locations_tx.html'");

   mm_menu_4.fontWeight="bold";
   mm_menu_4.hideOnMouseOut=true;
   mm_menu_4.menuBorder=1;
   mm_menu_4.menuLiteBgColor='#FAE9D0';
   mm_menu_4.menuBorderBgColor='#BD7800';
   mm_menu_4.bgColor='#FAE9D0';
      



  mm_menu_4.writeMenus();
} // mmLoadMenus()


var popup;
var height=570;
var width=525;
var left=0;
var top=0;
function linkpop(filename){
popup = window.open(filename, "","height="+height+",width="+width+",top="+top+",left="+left+",location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=no,toolbar=no,directories=no");
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  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 && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


function Rollover(imgName,imgSrc) { document.images[''+imgName+''].src = imgSrc; }

function button_roll(button,wax)
{
 button.style.backgroundColor=(wax=="on")?"#FFFFFF":"#e4ded8";
 button.style.color=(wax=="on")?"#000000":"000000";
}

// this might need translating, if so, move it to the page and use definitions in place of error texts...
function CheckContent()
{
	var errs = '';
	if (document.content_form.title.value == '') 		errs = errs+'\nPlease enter a Title'
	if (document.content_form.category.value == '') 	errs = errs+'\nPlease choose a Category'
	if (document.content_form.status.value == '') 	errs = errs+'\nPlease choose a Status'
	if (document.content_form.summary.value == '') 	errs = errs+'\nPlease enter a Summary'
	if (document.content_form.article_type[2].checked && document.content_form.url.value=='') 	errs = errs+'\nPlease enter a valid Internet URL for the article type chosen'
	if (errs == '') document.content_form.submit();
	else alert(errs);
}

function CheckPhoneLen(num)
{
	// alert(num);
	if (num.length != 12 && num.length != "0") alert('Please enter only a ten digit phone number, formatted ###-###-####');
	
}


function printDate()
{
  today = new Date();
  mnt=today.getMonth()+1;
  day=today.getDate();
  if (mnt=="1"){month="January"}
  if (mnt=="2"){month="February"}
  if (mnt=="3"){month="March"}
  if (mnt=="4"){month="April"}
  if (mnt=="5"){month="May"}
  if (mnt=="6"){month="June"}
  if (mnt=="7"){month="July"}
  if (mnt=="8"){month="August"}
  if (mnt=="9"){month="September"}
  if (mnt=="10"){month="October"}
  if (mnt=="11"){month="November"}
  if (mnt=="12"){month="December"}
  if (day=="1"){end="st"}
  if (day=="2"){end="nd"}
  if (day=="3"){end="rd"}

  document.write(""+month+" "+day+", "+today.getYear());
}

function popwindow(address,width,height)
{
    var window_url = address;
    var window_name = "window_name";
    var window_features = "height="+height+",width="+width+",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,copyhistory=0,top=100,left=100";
	window.open(window_url,window_name,window_features);
}

function changeto(highlightcolor)
{
	source=event.srcElement
	if (source.tagName=="TR"||source.tagName=="TABLE")
	return
	while(source.tagName!="TD")
	source=source.parentElement
	if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
	source.style.backgroundColor=highlightcolor
}

function changeback(originalcolor)
{
	if (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")
	return
	if (event.toElement!=source)
	source.style.backgroundColor=originalcolor
}



 function CountDown()
 {
	warnTime = 60000 * 119;
	warnMe = setTimeout('RunDown()', warnTime);
 }

 function RunDown()
 {
	popwindow("../includes/expire_warning.php",260,120);
 }

 function Continue()
 {
 	self.close();
	opener.location.reload();
 }

 function LastMinute()
 {
 	closeMe = setTimeout('EndNow()', 60000);
 }

 function EndNow()
 {
 	self.close();
	opener.location = "../cms/index.php?action=do_logout&auto=1"; // take out the cms part if you wanted to go to the public site
 }
 
 
// below here is the date picker code... hate putting all that html in it, but what the heck it was free right?

 
// Title: Timestamp picker
// Description: See the demo at url
// URL: http://us.geocities.com/tspicker/
// Script featured on: http://javascriptkit.com/script/script2/timestamp.shtml
// Version: 1.0
// Date: 12-05-2001 (mm-dd-yyyy)
// Author: Denis Gritcyuk <denis@softcomplex.com>; <tspicker@yahoo.com>
// Notes: Permission given to use this script in any kind of applications if
//    header lines are left unchanged. Feel free to contact the author
//    for feature requests and/or donations

function show_calendar(str_target, str_datetime) 
{
	site_url = "../";

	if (str_datetime=="mm-dd-yyyy") str_datetime = "";
	var arr_months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
	var week_days = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
	var n_weekstart = 1; // day week starts from (normally 0 or 1)

	var dt_datetime = (str_datetime == null || str_datetime =="" ?  new Date() : str2dt(str_datetime));
	var dt_prev_month = new Date(dt_datetime);
	dt_prev_month.setMonth(dt_datetime.getMonth()-1);
	var dt_next_month = new Date(dt_datetime);
	dt_next_month.setMonth(dt_datetime.getMonth()+1);
	var dt_firstday = new Date(dt_datetime);
	dt_firstday.setDate(1);
	dt_firstday.setDate(1-(7+dt_firstday.getDay()-n_weekstart)%7);
	var dt_lastday = new Date(dt_next_month);
	dt_lastday.setDate(0);
	
	// html generation (feel free to tune it for your particular application)
	// print calendar header
	var str_buffer = new String (
		"<html>\n"+
		"<head>\n"+
		"	<title>Calendar</title>\n"+
		"</head>\n"+
		"<body bgcolor=\"White\">\n"+
		"<table class=\"clsOTable\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n"+
		"<tr><td bgcolor=\"#4682B4\">\n"+
		"<table cellspacing=\"1\" cellpadding=\"3\" border=\"0\" width=\"100%\">\n"+
		"<tr>\n	<td bgcolor=\"#4682B4\"><a href=\"javascript:window.opener.show_calendar('"+
		str_target+"', '"+ dt2dtstr(dt_prev_month)+"');\">"+
		"<img src=\""+site_url+"/images/prev.gif\" width=\"16\" height=\"16\" border=\"0\""+
		" alt=\"previous month\"></a></td>\n"+
		"	<td bgcolor=\"#4682B4\" colspan=\"5\">"+
		"<font color=\"white\" face=\"tahoma, verdana\" size=\"2\">"
		+arr_months[dt_datetime.getMonth()]+" "+dt_datetime.getFullYear()+"</font></td>\n"+
		"	<td bgcolor=\"#4682B4\" align=\"right\"><a href=\"javascript:window.opener.show_calendar('"
		+str_target+"', '"+dt2dtstr(dt_next_month)+"');\">"+
		"<img src=\""+site_url+"/images/next.gif\" width=\"16\" height=\"16\" border=\"0\""+
		" alt=\"next month\"></a></td>\n</tr>\n"
	);

	var dt_current_day = new Date(dt_firstday);
	// print weekdays titles
	str_buffer += "<tr>\n";
	for (var n=0; n<7; n++)
		str_buffer += "	<td bgcolor=\"#87CEFA\">"+
		"<font color=\"white\" face=\"tahoma, verdana\" size=\"2\">"+
		week_days[(n_weekstart+n)%7]+"</font></td>\n";
	// print calendar table
	str_buffer += "</tr>\n";
	while (dt_current_day.getMonth() == dt_datetime.getMonth() ||
		dt_current_day.getMonth() == dt_firstday.getMonth()) {
		// print row heder
		str_buffer += "<tr>\n";
		for (var n_current_wday=0; n_current_wday<7; n_current_wday++) {
				if (dt_current_day.getDate() == dt_datetime.getDate() &&
					dt_current_day.getMonth() == dt_datetime.getMonth())
					// print current date
					str_buffer += "	<td bgcolor=\"#FFB6C1\" align=\"right\">";
				else if (dt_current_day.getDay() == 0 || dt_current_day.getDay() == 6)
					// weekend days
					str_buffer += "	<td bgcolor=\"#DBEAF5\" align=\"right\">";
				else
					// print working days of current month
					str_buffer += "	<td bgcolor=\"white\" align=\"right\">";

				if (dt_current_day.getMonth() == dt_datetime.getMonth())
					// print days of current month
					str_buffer += "<a href=\"javascript:window.opener."+str_target+
					".value='"+dt2dtstr(dt_current_day)+"'; window.close();\">"+
					"<font color=\"black\" face=\"tahoma, verdana\" size=\"2\">";
				else 
					// print days of other months
					str_buffer += "<a href=\"javascript:window.opener."+str_target+
					".value='"+dt2dtstr(dt_current_day)+"'; window.close();\">"+
					"<font color=\"gray\" face=\"tahoma, verdana\" size=\"2\">";
				str_buffer += dt_current_day.getDate()+"</font></a></td>\n";
				dt_current_day.setDate(dt_current_day.getDate()+1);
		}
		// print row footer
		str_buffer += "</tr>\n";
	}
	// print calendar footer
	str_buffer +=
		"<form name=\"cal\">\n<tr><td colspan=\"7\" bgcolor=\"#87CEFA\">"+
		"<font color=\"White\" face=\"tahoma, verdana\" size=\"2\">"+
		//"Time: <input type=\"text\" name=\"time\" value=\""+dt2tmstr(dt_datetime)+
		//"\" size=\"8\" maxlength=\"8\">
		"</font></td></tr>\n</form>\n" +
		"</table>\n" +
		"</tr>\n</td>\n</table>\n" +
		"</body>\n" +
		"</html>\n";

	var vWinCal = window.open("", "Calendar", 
		"width=200,height=200,status=no,resizable=yes,top=200,left=200");
	vWinCal.opener = self;
	var calc_doc = vWinCal.document;
	calc_doc.write (str_buffer);
	calc_doc.close();
}
// datetime parsing and formatting routimes. modify them if you wish other datetime format
function str2dt (str_datetime) {
	
	var re_date = /^(\d+)\-(\d+)\-(\d+)$/;	
	//var re_date = /^(\d+)\-(\d+)\-(\d+)\s+(\d+)\:(\d+)\:(\d+)$/;
	
	if (!re_date.exec(str_datetime))
		return alert("Invalid Datetime format: "+ str_datetime);
	return (new Date (RegExp.$3, RegExp.$1-1, RegExp.$2, RegExp.$4, RegExp.$5, RegExp.$6));
}
function dt2dtstr (dt_datetime) {
	return (new String (
			// dt_datetime.getFullYear()+"-"+(dt_datetime.getMonth()+1)+"-"+dt_datetime.getDate()+" "));
			(dt_datetime.getMonth()+1)+"-"+dt_datetime.getDate()+"-"+dt_datetime.getFullYear()));
}
function dt2tmstr (dt_datetime) {
	return (new String (
			dt_datetime.getHours()+":"+dt_datetime.getMinutes()+":"+dt_datetime.getSeconds()));
}

