//Send to Friend Bookmark Us

function bookmarksite(){
var myloc = location.href;
var title = "Cityscape - Obstetrics and Gynecology";
// check if active
// alert (title+"\r\n"+myloc);
if (document.all)
window.external.AddFavorite(myloc,title);
else if (window.sidebar)
window.sidebar.addPanel(title, myloc,"")
}

function sendtofriend() {
	// alert (URL);
	var URL 
	URL = location.href;
	window.open('sendtofriend.html?page='+URL, 'EmailWindow', 'scrollbars=yes,width=650,height=355');
}



function submitAppR() {
	var aForm = document.frmAppointment;
	var ctr = 0;
	if (aForm.txtFName.value=="") {
		alert("Please type in your First Name.");
		aForm.txtFName.focus();
		var ctr = 1;
	}
	
	else if (aForm.txtLName.value=="") {
		alert("Please type in your Last Name.");
		aForm.txtLName.focus();
		var ctr = 1;
	}
	
	else if (aForm.txtAddress.value=="") {
	alert("Please type in your Address.");
	aForm.txtAddress.focus();
	var ctr = 1;
	}

	else if (aForm.txtCity.value=="") {
	alert("Please type in your City.");
	aForm.txtCity.focus();
	var ctr = 1;
	}

	else if (aForm.txtZip.value=="") {
	alert("Please type in your Zip or Postal Code.");
	aForm.txtZip.focus();
	var ctr = 1;
	}

	else if (aForm.txtPhone.value=="") {
	alert("Please type in your Phone Number.");
	aForm.txtPhone.focus();
	var ctr = 1;
	}
	
	else if(aForm.txtEmail.value=="") {
		alert("Please type in your Email Address.");
		aForm.txtEmail.focus();
		var ctr = 1;
	}
		
	else if (CheckEmail(aForm.txtEmail.value)==false) {
		alert("Please check your Email Address.");
		aForm.txtEmail.focus();
		var ctr = 1;
	}
	
		
	else if(aForm.security_code.value=="") {
		alert("Please type in the Verification Code.");
		aForm.security_code.focus();
		var ctr = 1;
	}
	
	if(ctr == 0){
	aForm.CConfirm.value="submitApp";
	aForm.submit();
	
	}
}



function submitFeed() {
	var cForm = document.frmFeedback;
	var ctr = 0;
	if (cForm.tFName.value=="") {
		alert("Please type in your First Name.");
		cForm.tFName.focus();
		var ctr = 1;
	}
	
	else if (cForm.tLName.value=="") {
		alert("Please type in your Last Name.");
		cForm.tLName.focus();
		var ctr = 1;
	}
	
	else if (cForm.tAddress.value=="") {
	alert("Please type in your Address.");
	cForm.tAddress.focus();
	var ctr = 1;
	}

	else if (cForm.tCity.value=="") {
	alert("Please type in your City.");
	cForm.tCity.focus();
	var ctr = 1;
	}

	else if (cForm.tZip.value=="") {
	alert("Please type in your Zip or Postal Code.");
	cForm.tZip.focus();
	var ctr = 1;
	}

	else if (cForm.tPhone.value=="") {
	alert("Please type in your Phone Number.");
	cForm.tPhone.focus();
	var ctr = 1;
	}
	
	else if(cForm.tEmail.value=="") {
		alert("Please type in your Email Address.");
		cForm.tEmail.focus();
		var ctr = 1;
	}
		
	else if (CheckEmail(cForm.tEmail.value)==false) {
		alert("Please check your Email Address.");
		cForm.tEmail.focus();
		var ctr = 1;
	}
	
	else if(cForm.security_code.value=="") {
		alert("Please type in the Verification Code.");
		cForm.security_code.focus();
		var ctr = 1;
	}
	
	if(ctr == 0){
	cForm.ConfirmM.value="submitFeed";
	cForm.submit();
	
	}
}



//################################################
//				To Check the Email
//################################################

function CheckEmail(Email){
 if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(Email)) {
  return true
 }
 
 return (false)
}
