
function clearText(thefield) {
  if (thefield.defaultValue==thefield.value) { thefield.value = "" }
}

function replaceText(thefield) {
  if (thefield.value=="") { thefield.value = thefield.defaultValue }
}

function CheckRequiredFields() {

		if (document.miniContact.name.value=='*Name') {
			alert('Your name is required to submit this form.');
			return false;
		}
		
		if (document.miniContact.phone.value=='*Phone Number') {
			alert('Your phone number is required to submit this form.');
			return false;
		}
		
		if (document.miniContact.email.value=='*Email') {
			alert('A valid email address is required to submit this form.');
			return false;
		}
		
		return true;
}



function CheckMainRequiredFields() {

		if (document.mainContact.first_name.value=='*First Name') {
			alert('Your first name is required to submit this form.');
			return false;
		}
		
		if (document.mainContact.last_name.value=='*Last Name') {
			alert('Your last name is required to submit this form.');
			return false;
		}
		
		if (document.mainContact.email.value=='*Email') {
			alert('A valid email address is required to submit this form.');
			return false;
		}
		
		if (document.mainContact.phone.value=='*Phone Number') {
			alert('Your phone number is required to submit this form.');
			return false;
		}
		
		return true;
}




function emailCheck (emailStr) {
	var checkTLD=1;
	var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/;
	var emailPat=/^(.+)@(.+)$/;
	var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";
	var validChars="\[^\\s" + specialChars + "\]";
	var quotedUser="(\"[^\"]*\")";
	var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;
	var atom=validChars + '+';
	var word="(" + atom + "|" + quotedUser + ")";
	var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
	var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");
	var matchArray=emailStr.match(emailPat);

	if (matchArray==null) {
		alert("Email address seems incorrect (check @ and .'s)");
		return false;
	}
	
	var user=matchArray[1];
	var domain=matchArray[2];

	for (i=0; i<user.length; i++) {
		if (user.charCodeAt(i)>127) {
				alert("Ths username contains invalid characters.");
				return false;
  		}
	}
	
	for (i=0; i<domain.length; i++) {
		if (domain.charCodeAt(i)>127) {
				alert("Ths domain name contains invalid characters.");
				return false;
   		}
	}

	if (user.match(userPat)==null) {
		alert("The username doesn't seem to be valid.");
		return false;
	}

	var IPArray=domain.match(ipDomainPat);
	
	if (IPArray!=null) {
		for (var i=1;i<=4;i++) {
			if (IPArray[i]>255) {
				alert("Destination IP address is invalid!");
				return false;
   			}
		}
		return true;
	}
 
	var atomPat=new RegExp("^" + atom + "$");
	var domArr=domain.split(".");
	var len=domArr.length;

	for (i=0;i<len;i++) {
		if (domArr[i].search(atomPat)==-1) {
			alert("The domain name does not seem to be valid.");
			return false;
  		}
	}

	if (checkTLD && domArr[domArr.length-1].length!=2 && domArr[domArr.length-1].search(knownDomsPat)==-1) {
		alert("The address must end in a well-known domain or two letter " + "country.");
		return false;
	}

	if (len<2) {
		alert("This address is missing a hostname!");
		return false;
	}

	return true;
}

function toggleEpage(id){
	formEl = document.getElementById(id);
	if (formEl){
		if (formEl.className == 'epageInactive'){
			formEl.className = "epageActive";
		} else {
			formEl.className = "epageInactive";
		}
	}
}
function toggleEpageLyr() {
		epageLyr = document.getElementById("epageForm");
		if (epageLyr) {
		if (epageLyr.style.visibility == 'hidden'){
			epageLyr.style.visibility = "visible";
		} else {
			epageLyr.style.visibility = "hidden";
		}
	}
}


// email this page
function CheckRequiredFieldsEpage() {

		if (document.epageFormEl.epageRecipEmail.value=='') {
			alert('A valid email address for the recipient is required to use this form.');
			return false;
		}
		else if (document.epageFormEl.epageRecipEmail.value=='* Recipient Email') {
			alert('A valid email address for the recipient is required to use this form.');
			return false;
		}
		
		if (document.epageFormEl.epageName.value=='') {
			alert('Your name is required to use this form.');
			return false;
		}
		else if (document.epageFormEl.epageName.value=='* Your Name') {
			alert('Your name is required to use this form.');
			return false;
		}
		
		if (document.epageFormEl.epageEmail.value=='') {
			alert('A valid email address for you is required to use this form.');
			return false;
		}
		else if (document.epageFormEl.epageEmail.value=='* Your Email') {
			alert('A valid email address for you is required to use this form.');
			return false;
		}

		return true;
}



//embed flash and movies

function movie01Get() {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="786" height="345"><param name="movie" value="flash/header.swf" /><param name="quality" value="high" /><param name="LOOP" value="false" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#ffffff" /><embed src="flash/header.swf" width="786" height="345" loop="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" bgcolor="#ffffff" wmode="transparent"></embed></object>');
}
function movie02Get() {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="10" height="700"><param name="movie" value="flash/gloss.swf" /><param name="quality" value="high" /><param name="LOOP" value="true" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#ffffff" /><embed src="flash/gloss.swf" width="10" height="700" loop="true" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" bgcolor="#ffffff" wmode="transparent"></embed></object>');
}
function movie03Get() {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="786" height="345"><param name="movie" value="flash/header2.swf" /><param name="quality" value="high" /><param name="LOOP" value="false" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#ffffff" /><embed src="flash/header2.swf" width="786" height="345" loop="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" bgcolor="#ffffff" wmode="transparent"></embed></object>');
}



// mmLoadMenus()
function mmLoadMenus() {
  if (window.mm_menu_0924085158_0) return;
        window.mm_menu_0924085158_0 = new Menu("root",217,18,"Arial, Helvetica, sans-serif",12,"#FFFFFF","#D49C6B","#D49C6B","#FFFFFF","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);
  mm_menu_0924085158_0.addMenuItem("Eyelid Surgery","location='eyelid.html'");
  mm_menu_0924085158_0.addMenuItem("Face Lift","location='facelift.html'");
  mm_menu_0924085158_0.addMenuItem("Brow Lift","location='browlift.html'");
  mm_menu_0924085158_0.addMenuItem("Endoscopic Mid Face Lift","location='endoscopic_mid_facelift.html'");
  mm_menu_0924085158_0.addMenuItem("Neck Lift","location='necklift.html'");
  mm_menu_0924085158_0.addMenuItem("Lip Enhancement","location='lip_enhancement.html'");
  mm_menu_0924085158_0.addMenuItem("Otoplasty","location='otoplasty.html'");
  mm_menu_0924085158_0.addMenuItem("Pre- & Post-Surgical Skin Care","location='pre_post_surgical.html'");
  mm_menu_0924085158_0.addMenuItem("Cheek Implants","location='cheek_implants.html'");
  mm_menu_0924085158_0.addMenuItem("Chin&nbsp;Implants","location='chin_implants.html'");
  mm_menu_0924085158_0.addMenuItem("Reconstructive&nbsp;Surgery","location='reconstructive_surgery.html'");
   mm_menu_0924085158_0.fontWeight="bold";
   mm_menu_0924085158_0.hideOnMouseOut=true;
   mm_menu_0924085158_0.bgColor='#E1BA98';
   mm_menu_0924085158_0.menuBorder=1;
   mm_menu_0924085158_0.menuLiteBgColor='#E1BA98';
   mm_menu_0924085158_0.menuBorderBgColor='#D49C6D';

  window.mm_menu_0924150615_0 = new Menu("root",135,18,"Arial, Helvetica, sans-serif",12,"#FFFFFF","#D49C6B","#D49C6B","#FFFFFF","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);
  mm_menu_0924150615_0.addMenuItem("Botox&reg;","location='botox.html'");
   mm_menu_0924150615_0.addMenuItem("Juvederm&reg;","location='juvederm.html'");
  mm_menu_0924150615_0.addMenuItem("Restylane&reg;","location='restylane.html'");
  mm_menu_0924150615_0.addMenuItem("Radiesse&#8482;","location='radiesse.html'");
  mm_menu_0924150615_0.addMenuItem("Sculptra&#8482;","location='sculptra.html'");
  mm_menu_0924150615_0.addMenuItem("Fat&nbsp;Graft/Injection","location='fat_injection.html'");
  mm_menu_0924150615_0.addMenuItem("Alloderm","location='alloderm.html'");
   mm_menu_0924150615_0.fontWeight="bold";
   mm_menu_0924150615_0.hideOnMouseOut=true;
   mm_menu_0924150615_0.bgColor='#E1BA98';
   mm_menu_0924150615_0.menuBorder=1;
   mm_menu_0924150615_0.menuLiteBgColor='#E1BA98';
   mm_menu_0924150615_0.menuBorderBgColor='#D49C6D';

  window.mm_menu_0924151232_0 = new Menu("root",236,18,"Arial, Helvetica, sans-serif",12,"#FFFFFF","#D49C6B","#D49C6B","#FFFFFF","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);
  mm_menu_0924151232_0.addMenuItem("Aesthetic&nbsp;Services","location='aesthetic_services.html'");
  mm_menu_0924151232_0.addMenuItem("Laser&nbsp;Collagen&nbsp;Replacement","location='collagen.html'");
  mm_menu_0924151232_0.addMenuItem("Micro&nbsp;Laser&nbsp;Peel","location='micro_laser_peel.html'");
  mm_menu_0924151232_0.addMenuItem("Laser&nbsp;Hair&nbsp;Removal","location='hair_removal.html'");
  mm_menu_0924151232_0.addMenuItem("ClearScan&nbsp;Vein&nbsp;Redness&nbsp;Reduction","location='laser_vein.html'");
  mm_menu_0924151232_0.addMenuItem("Photo-Rejuvenation&nbsp;BBL","location='photo_rejuvenation_bbl.html'");
  mm_menu_0924151232_0.addMenuItem("ProFractional&nbsp;Laser&#8482;","location='profractional_laser.html'");
   mm_menu_0924151232_0.fontWeight="bold";
   mm_menu_0924151232_0.hideOnMouseOut=true;
   mm_menu_0924151232_0.bgColor='#E1BA98';
   mm_menu_0924151232_0.menuBorder=1;
   mm_menu_0924151232_0.menuLiteBgColor='#E1BA98';
   mm_menu_0924151232_0.menuBorderBgColor='#D49C6D';

  window.mm_menu_0924151745_0 = new Menu("root",143,18,"Arial, Helvetica, sans-serif",12,"#FFFFFF","#D49C6B","#D49C6B","#FFFFFF","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);
  mm_menu_0924151745_0.addMenuItem("Aesthetic&nbsp;Services","location='aesthetic_services.html'");
  mm_menu_0924151745_0.addMenuItem("Lunchtime&nbsp;Peel","location='lunchtime_peel.html'");
  mm_menu_0924151745_0.addMenuItem("Microdermabrasion","location='microdermabrasion.html'");
  mm_menu_0924151745_0.addMenuItem("Prescription&nbsp;Facial","location='prescription_facial.html'");
  mm_menu_0924151745_0.addMenuItem("Facial&nbsp;Rejuvenation","location='facial_rejuvenation.html'");
  mm_menu_0924151745_0.addMenuItem("Skin&nbsp;Care&nbsp;Products","location='skin_products.html'");
   mm_menu_0924151745_0.fontWeight="bold";
   mm_menu_0924151745_0.hideOnMouseOut=true;
   mm_menu_0924151745_0.bgColor='#E1BA98';
   mm_menu_0924151745_0.menuBorder=1;
   mm_menu_0924151745_0.menuLiteBgColor='#E1BA98';
   mm_menu_0924151745_0.menuBorderBgColor='#D49C6D';

mm_menu_0924151745_0.writeMenus();
} 



