
function changer(path, from, to) {
	if(document.images) {
		document.images[from].src =  path + "images/" + to;
		
	}
}

function NavigateWindow(URL)
{
	window.open('http://'+URL,'','toolbar=1,status=1,menubar=1,location=yes,resizable=yes,scrollbars=yes,width=800,height=600');
}

function NavigateSameWindow(URL)
{
	window.location.href = URL;
}

function NavigateProWindow(URL)
{
	window.open(URL,'','toolbar=1,status=1,menubar=1,resizable=yes,scrollbars=yes,width=620,height=480');
}

function addbookmark(URL,TITLE)
{
	bookmarkurl= URL;
	bookmarktitle= TITLE;
	if (document.all)
	window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

function openwindow(URL,myWidth,myHeight)
{
	url = URL;
	windowName = "Image";
	var myTop = parseInt(window.screen.height/2 - myHeight/2);
	var myLeft = parseInt(window.screen.width/2 - myWidth/2);
	var windowFeatures = "toolbar=no,status=no,location=no,directories=no,menubar=no,scrollbars=yes,resizable=yes,width=" + 
	myWidth.toString() + ",height=" + myHeight.toString() + ",top=" + myTop.toString() + ",left=" + myLeft.toString();    
	var windowReplace=true;        
	wREPORT= window.open(url, windowName, windowFeatures, windowReplace);

}
	
function navigateParent(url) {
	if(window.opener != null){
	window.opener.location.href = url;
	window.close();
	}
}

function updateParent() {
	if(window.opener != null){
	window.opener.location.reload();
	window.close();
	}
}

function refreshParentUnload() {
	if(window.opener != null){
	window.opener.location.reload();
	}
}

function printWindow() {
	bV = parseInt(navigator.appVersion);
	if (bV >= 4) window.print();
}

function confirmDeletePopup(sName)
{
	var agree=confirm("Are you sure you wish to delete this "+sName+"?");
	if (agree){
		return true ;
	}else{
		return false ;
	}
}
function uncheckAll() 
{
	for (var i = 1; i <= 84; i++) {
		box = eval("document.myform.CategoryID" + i); 
		//if (box.checked == true) box.checked = false;
		if (box.checked == false) box.checked = true;
	}
	document.myform.CategoryID84.checked = true
}

function uncheckEverything() {
	box = eval("document.myform.CategoryID84"); 
	if (box.checked == true) box.checked = false;
}



// --- SEATING CHART FUNCTIONS

var m_fMouseDown = false;	// mouse down flag
var m_fMouseMoved = false;	// mouse moved flag
var m_cxOffset = 0;			// x offset of mouse from left of drag part
var m_cyOffset = 0;			// y offset of mouse from top of drag part
var m_prtSrc = null;		// ref to source of the part drag
var m_prtDrag = null;		// ref to drag part
var m_zoneLast = null;		// last active zone
var m_idxInsert = 0;		// position at which to insert dropped part

// This function resets any table attributes
// which may have been lost during browser reload.

function CleanUpTables()
{ 	
	document.all.OuttermostContentBodyTable.width = "40px";	 // 40px is an arbitrary number
	document.all.OuttermostContentBodyTable.width = "100%";
}

function Document_OnMouseDown()
{
	if (window.event.srcElement.className == 'LayoutWebPart')
	{
		m_fMouseDown = true;

		m_cxOffset = window.event.clientX - GetAbsoluteLeft(window.event.srcElement);
		m_cyOffset = window.event.clientY - GetAbsoluteTop(window.event.srcElement);

		m_prtSrc = GetPartElement(window.event.srcElement);
		m_prtDrag = m_prtSrc.cloneNode(true);

		m_prtDrag.style.position = 'absolute';
		m_prtDrag.style.filter = 'alpha(opacity=50)';
		m_prtDrag.style.left = (window.event.x - m_cxOffset) + 'px';
		m_prtDrag.style.top = (window.event.y - m_cyOffset) + 'px';
		m_prtDrag.style.width = m_prtSrc.offsetWidth;

		document.body.insertAdjacentElement('beforeEnd', m_prtDrag);

		divMouse.setCapture();
	}
}

function DivMouse_OnMouseMove()
{
	if (m_fMouseDown)
	{
		var zoneTarget;

		m_fMouseMoved = true;
		
		m_prtDrag.style.left = window.event.x - m_cxOffset + document.body.scrollLeft + 'px';
		m_prtDrag.style.top = window.event.y - m_cyOffset + document.body.scrollTop + 'px';

		zoneTarget = GetZoneFromPoint(window.event.x, window.event.y, m_prtDrag, tblIBeam);

		if (FIsZone(zoneTarget))
		{
			// We are over a zone
			// If the class name is just "Zone" this is a new zone
			// and we need to switch the last drop zone
			if (m_zoneLast)
			{
				SetAsDropTarget(m_zoneLast, false);
			}

			SetAsDropTarget(zoneTarget, true);
			
			PositionIBeam(window.event.x, window.event.y, tblIBeam, zoneTarget);
		}
		else
		{
			// Not over a zone at all. Reset last zone and clear it
			if (m_zoneLast)
			{
				SetAsDropTarget(m_zoneLast, false);
			}
			tblIBeam.style.display = 'none';
		}
	}        
}

function AddPartsInfoForSave(node, zone)
{
	var nIndex;
	var partCount = node.children.length;
	for (nIndex = 0; nIndex < partCount; nIndex++)
	{
		saveToServer.partLayout.value += 
			'<WebPart>' +
			'  <WebPartID>' + node.children[nIndex].id.substr(0) + '</WebPartID>' +
			'  <Zone>' + zone + '</Zone>' +
			'  <PartOrder>' + nIndex + '</PartOrder>' +
			'</WebPart>';
			
	}
}

// Positions the IBeam element at the right insertion point
function PositionIBeam(x, y, elemIBeam, zoneTarget)
{
	var nParts;
	var prtFirst;
	var prtTemp;
	var idxPart;

	nParts = zoneTarget.children.length;
	if (nParts > 0)
	{
		// get the first part in the zone
		prtFirst = zoneTarget.children(0);

		// set the ibeam width to the part width
		elemIBeam.style.width = prtFirst.offsetWidth + 1

		// get the part before which we should display the ibeam
		for(m_idxInsert = 0; m_idxInsert < nParts; m_idxInsert++)
			{
				prtTemp = zoneTarget.children(m_idxInsert);
				if (y <= (GetAbsoluteTop(prtTemp) + ((prtTemp.offsetHeight + (parseInt(prtTemp.cellSpacing) * 2)) / 2)))
				{
					break;
				}
			}

		// if the part index is beyond the last part,
		// move the ibeam to after the last part
		if (m_idxInsert >= nParts)
		{
			m_idxInsert = nParts;
			prtTemp = zoneTarget.children(m_idxInsert - 1);
			elemIBeam.style.top = String(((GetAbsoluteTop(prtTemp) + 
				(prtTemp.offsetHeight + (parseInt(prtTemp.cellSpacing) * 2))) - 
				(elemIBeam.offsetHeight / 2))) + 'px';
			elemIBeam.style.left = String(GetAbsoluteLeft(prtTemp)) + 'px';
		}
		else
		{
			prtTemp = zoneTarget.children(m_idxInsert);
			elemIBeam.style.top = String((GetAbsoluteTop(prtTemp) - 
				(elemIBeam.offsetHeight / 2) + 1)) + 'px';
			elemIBeam.style.left = String(GetAbsoluteLeft(prtTemp)) + 'px'
		}

		// show it
		elemIBeam.style.display = 'inline';
	}
	else
	{
		elemIBeam.style.display = 'none';
		m_idxInsert = -1;
	}
}

// Navigates up from an element until it finds the element
// of type LayoutWebPartFrame (the whole table representing the WebPart)
function GetPartElement(subElem)
{
	var partFrame = subElem
	while (partFrame.className != 'LayoutWebPartFrame')
	{
		partFrame = partFrame.parentElement;
	}
	return partFrame;
}

// Gets real Top value with respect to client area
function GetAbsoluteTop(elem)
{
	var topPosition = 0
	//document.body.scrollTop;
	//event.clientX
	while (elem)
	{
		if (elem.tagName == 'BODY')
		{
			break;
		}
		topPosition += elem.offsetTop;
		elem = elem.offsetParent;
	}
	topPosition -= document.body.scrollTop;
	return topPosition;
}

// Get real Left value with respect to client area
function GetAbsoluteLeft(elem)
{
	var leftPosition = 0
	//document.body.scrollLeft;
	//event.clientX
	while (elem)
	{
		if (elem.tagName == 'BODY')
		{
			break;
		}
		leftPosition += elem.offsetLeft;
		elem = elem.offsetParent;
	}
	leftPosition -= document.body.scrollLeft;
	return leftPosition;
}

// Returns true if the given element is one of our zones.
function FIsZone(elem)
{
	var fRet = false;
	var strClass;
	var ich;
	
	if (elem)
	{
		strClass = elem.className;
		ich = strClass.indexOf(' ');
		if (ich != -1)
		{
			strClass = strClass.substr(0, ich);
		}
		
		// Add the entire list of Zones
		fRet = strClass == 'LayoutZoneTop' || 
				strClass == 'LayoutZoneLeft' || 
				strClass == 'LayoutZoneCenter' || 
				strClass == 'LayoutZoneRight' || 
				strClass == 'LayoutZoneBottom';
	}

	return fRet;
}

// Sets or clears elem as the drop target.
function SetAsDropTarget(elem, fSet)
{
	var strClass;
	var ich;
		
	if (fSet)
	{
		strClass = elem.className;
		if (strClass.indexOf(' LayoutDropZone') == -1)
		{
			elem.className = strClass + ' LayoutDropZone';
			m_zoneLast = elem;
		}
	}
	else
	{
		strClass = elem.className;
		ich = strClass.indexOf(' LayoutDropZone');
		if (ich != -1)
		{
			elem.className = strClass.substr(0, ich);
			m_zoneLast = null;
		}
	}
}


// Gets the zone underneath the x,y or returns Nothing if not over a zone
function GetZoneFromPoint(x, y, prtDrag, elemIBeam)
{
	var prtDragZIndexOld = prtDrag.style.zIndex;
	var elemIBeamZIndexOld = elemIBeam.style.zIndex;

	prtDrag.style.zIndex = -1;
	elemIBeam.style.zIndex = -1;
		
	var zone = document.elementFromPoint(x, y);
	prtDrag.style.zIndex = prtDragZIndexOld;
	elemIBeam.style.zIndex = elemIBeamZIndexOld;

	// Now the element we just got might be another part sitting in
	// the zone, so check to see if the class name is "LayoutWebPart". If it
	// is then go up the parent chain until we get its zone

	if (zone != null){
		if ((zone.className == 'LayoutWebPart') || (zone.className == 'LayoutWebPartFrame'))
		{
			while ((!FIsZone(zone)) && 
					(zone.className != 'LayoutDropZone') &&
					(zone.tagName != 'BODY'))
			{
				zone = zone.parentElement;
			}
		}

		// Last check is that we might be over the body or something
		// else that is not a zone at all. If the current return pointer
		// is not of className = "Zone" or "LayoutDropZone" then return Nothing
		if ((!FIsZone(zone)) && (zone.className != 'LayoutDropZone'))
		{
			//zone = null;
			zone = zone.parentElement;
		}
		return zone;
	}	
}
function DivMouse_OnMouseUp()
{
	if (m_fMouseDown)
	{
		if (m_fMouseMoved)
		{
			var zoneTarget;
			var prtTemp;

			zoneTarget = GetZoneFromPoint(window.event.x, window.event.y, m_prtDrag, tblIBeam);
			if (zoneTarget)
			{
				switch (m_idxInsert)
				{
				case -1:
					{
					zoneTarget.insertAdjacentElement('afterBegin', m_prtSrc.removeNode(true));
					break;
					}
				case zoneTarget.children.length:
					{
						// inserting part at the end of the zone
						prtTemp = zoneTarget.children(zoneTarget.children.length - 1);

						// check to make sure the source and target are not the same part
						if (prtTemp != m_prtSrc)
						{
							prtTemp.insertAdjacentElement('afterEnd', m_prtSrc.removeNode(true));
						}
						break;
					}
				default:
					{
						if (zoneTarget.children(m_idxInsert)){
							// inserting part before indexed child
							prtTemp = zoneTarget.children(m_idxInsert);

							// check to make sure the source and target are not the same
							if (prtTemp != m_prtSrc)
							{
								prtTemp.insertAdjacentElement('beforeBegin', m_prtSrc.removeNode(true));
							}
						}
					}
				}
				saveToServer.partLayout.value = '<Dashboard>';
				//AddPartsInfoForSave(tdZoneTop, 4);
				AddPartsInfoForSave(tdZoneLeft, 1);
				//AddPartsInfoForSave(tdZoneCenter, 2);
				AddPartsInfoForSave(tdZoneRight, 3);
				//AddPartsInfoForSave(tdZoneBottom, 5);
				saveToServer.partLayout.value += '</Dashboard>';
			}

			tblIBeam.style.display = 'none';
		}
		
		m_prtDrag.style.position = '';
		m_prtDrag.removeNode(true);
		m_prtDrag = null;

		if (m_zoneLast)
		{
			SetAsDropTarget(m_zoneLast, false);
		}

		divMouse.releaseCapture();
		m_fMouseDown = false;
		m_fMouseMoved = false;
	}
}
function arrangeListMember( down, intSide ) {
		intSide = 'sel' + intSide;
		sl = document.form1[intSide].selectedIndex;
		if (sl != -1) {
		oText = document.form1[intSide].options[sl].text;
		oValue = document.form1[intSide].options[sl].value;
		if (oValue == "-1") 
		{
			alert("Please select a member first");		
			return false;
		}	
		if (sl > 0 && down == 0) {
			document.form1[intSide].options[sl].text = document.form1[intSide].options[sl-1].text;
			document.form1[intSide].options[sl].value = document.form1[intSide].options[sl-1].value;
			document.form1[intSide].options[sl-1].text = oText;
			document.form1[intSide].options[sl-1].value = oValue;
			document.form1[intSide].selectedIndex--;
		} else if (sl < document.form1[intSide].length-1 && down == 1 && document.form1[intSide].options[sl+1].value != "-1") {
			document.form1[intSide].options[sl].text = document.form1[intSide].options[sl+1].text;
			document.form1[intSide].options[sl].value = document.form1[intSide].options[sl+1].value;
			document.form1[intSide].options[sl+1].text = oText;
			document.form1[intSide].options[sl+1].value = oValue;
			document.form1[intSide].selectedIndex++;
		}
		doSubmit();
		} else {
		alert("Please select a member first");
		}
		return false;
	}
function addSrcToDestList() {
	destList = window.document.forms[0].sel1;
	srcList = window.document.forms[0].sel0; 
	var len = destList.length;
	for(var i = 0; i < srcList.length; i++) {
		if ((srcList.options[i] != null) && (srcList.options[i].selected)) {
			//Check if this value already exist in the destList or not
			//if not then add it otherwise do not add it.
			var found = false;
			for(var count = 0; count < len; count++) {
				if (destList.options[count] != null) {
					if (srcList.options[i].text == destList.options[count].text) {
						found = true;
						break;
						
					}
				}
				
			}
			if (found != true) {
			destList.options[len] = new Option(srcList.options[i].text, srcList.options[i].value); 
			len++;
			
			}
		
		}
	}
	doSubmit();
}
// Deletes from the destination list.
function deleteFromDestList() {
var destList  = window.document.forms[0].sel1;
var len = destList.options.length;
	for(var i = (len-1); i >= 0; i--) {
		if ((destList.options[i] != null) && (destList.options[i].selected == true)) {
			destList.options[i] = null;
	    }
	}
}
function SwitchMenu(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("masterdiv").getElementsByTagName("span"); 
		if(el.style.display != "block"){ 
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="submenu") 
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}
function validateCalcForm(form) { //This is the name of the function

if (!IsNumeric(form.txtBrideBand.value)) 

      if (form.txtBrideBand.value != "" && !IsNumeric(form.txtBrideBand.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Brides Band field') 
      form.txtBrideBand.focus(); 
      return false; 
      } 
	  
	   if (form.txtBrideBandBudget.value != "" && !IsNumeric(form.txtBrideBandBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Brides Band Budget field') 
      form.txtBrideBandBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtGroomsBand.value != "" && !IsNumeric(form.txtGroomsBand.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Grooms Band field') 
      form.txtGroomsBand.focus(); 
      return false; 
      } 
	  
	   if (form.txtGroomsBandBudget.value != "" && !IsNumeric(form.txtGroomsBandBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Grooms Band Budget field') 
      form.txtGroomsBandBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtSiteRental.value != "" && !IsNumeric(form.txtSiteRental.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Site Rental field') 
      form.txtSiteRental.focus(); 
      return false; 
      } 
	  
	   if (form.txtSiteRentalBudget.value != "" && !IsNumeric(form.txtSiteRentalBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Site Rental Budget field') 
      form.txtSiteRentalBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtOfficiate.value != "" && !IsNumeric(form.txtOfficiate.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Officiate Fee field') 
      form.txtOfficiate.focus(); 
      return false; 
      } 
	  
	   if (form.txtOfficiateBudget.value != "" && !IsNumeric(form.txtOfficiateBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Officiate Fee Budget field') 
      form.txtOfficiateBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtMargLic.value != "" && !IsNumeric(form.txtMargLic.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Marriage Licsense field') 
      form.txtMargLic.focus(); 
      return false; 
      } 
	  
	  if (form.txtMargLicBudget.value != "" && !IsNumeric(form.txtMargLicBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Marriage Licsense Budget field') 
      form.txtMargLicBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtBrideGown.value != "" && !IsNumeric(form.txtBrideGown.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Bride Gown field') 
      form.txtBrideGown.focus(); 
      return false; 
      } 
	  
	  if (form.txtBrideGownBudget.value != "" && !IsNumeric(form.txtBrideGownBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Bride Gown Budget field') 
      form.txtBrideGownBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtBrideVeil.value != "" && !IsNumeric(form.txtBrideVeil.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Bride Veil field') 
      form.txtBrideVeil.focus(); 
      return false; 
      } 
	  
	  if (form.txtBrideVeilBudget.value != "" && !IsNumeric(form.txtBrideVeilBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Bride Veil Budget field') 
      form.txtBrideVeilBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtAlterations.value != "" && !IsNumeric(form.txtAlterations.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Bride Alterations field') 
      form.txtAlterations.focus(); 
      return false; 
      } 
	  
	  if (form.txtAlterationsBudget.value != "" && !IsNumeric(form.txtAlterationsBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Bride Alterations Budget field') 
      form.txtAlterationsBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtBrideShoes.value != "" && !IsNumeric(form.txtBrideShoes.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Bride Shoes field') 
      form.txtBrideShoes.focus(); 
      return false; 
      } 
	  
	  if (form.txtBrideShoesBudget.value != "" && !IsNumeric(form.txtBrideShoesBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Bride Shoes Budget field') 
      form.txtBrideShoesBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtBrideStockings.value != "" && !IsNumeric(form.txtBrideStockings.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Bride Stockings field') 
      form.txtBrideStockings.focus(); 
      return false; 
      } 
	  
	  if (form.txtBrideStockingsBudget.value != "" && !IsNumeric(form.txtBrideStockingsBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Bride Stockings Budget field') 
      form.txtBrideStockingsBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtLingerie.value != "" && !IsNumeric(form.txtLingerie.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Bride Lingerie field') 
      form.txtLingerie.focus(); 
      return false; 
      } 
	  
	  if (form.txtLingerieBudget.value != "" && !IsNumeric(form.txtLingerieBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Bride Lingerie Budget field') 
      form.txtLingerieBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtGarter.value != "" && !IsNumeric(form.txtGarter.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Bride Garter field') 
      form.txtGarter.focus(); 
      return false; 
      } 
	  
	  if (form.txtGarterBudget.value != "" && !IsNumeric(form.txtGarterBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Bride Garter Budget field') 
      form.txtGarterBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtBrideJewels.value != "" && !IsNumeric(form.txtBrideJewels.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Bride Jewelery field') 
      form.txtBrideJewels.focus(); 
      return false; 
      } 
	  
	  if (form.txtBrideJewelsBudget.value != "" && !IsNumeric(form.txtBrideJewelsBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Bride Jewelery Budget field') 
      form.txtBrideJewelsBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtPreservation.value != "" && !IsNumeric(form.txtPreservation.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Bride Preservation field') 
      form.txtPreservation.focus(); 
      return false; 
      } 
	  
	  if (form.txtPreservationBudget.value != "" && !IsNumeric(form.txtPreservationBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Bride Preservation Budget field') 
      form.txtPreservationBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtReceptionSite.value != "" && !IsNumeric(form.txtReceptionSite.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Reception Site field') 
      form.txtReceptionSite.focus(); 
      return false; 
      } 
	  
	  if (form.txtReceptionSiteBudget.value != "" && !IsNumeric(form.txtReceptionSiteBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Reception Site Budget field') 
      form.txtReceptionSiteBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtReceptionFood.value != "" && !IsNumeric(form.txtReceptionFood.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Reception Food field') 
      form.txtReceptionFood.focus(); 
      return false; 
      } 
	  
	  if (form.txtReceptionFoodBudget.value != "" && !IsNumeric(form.txtReceptionFoodBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Reception Food Budget field') 
      form.txtReceptionFoodBudget.focus(); 
      return false; 
      } 
	 
	  if (form.txtReceptionDance.value != "" && !IsNumeric(form.txtReceptionDance.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Dance Lesson field') 
      form.txtReceptionDance.focus(); 
      return false; 
      } 
	  
	  if (form.txtReceptionDanceBudget.value != "" && !IsNumeric(form.txtReceptionDanceBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Dance Lesson Budget field') 
      form.txtReceptionDanceBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtPhotographyPhoto.value != "" && !IsNumeric(form.txtPhotographyPhoto.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Wedding Photo field') 
      form.txtPhotographyPhoto.focus(); 
      return false; 
      } 
	  
	  if (form.txtPhotographyPhotoBudget.value != "" && !IsNumeric(form.txtPhotographyPhotoBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Wedding Photo Budget field') 
      form.txtPhotographyPhotoBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtPhotographyWeddingPort.value != "" && !IsNumeric(form.txtPhotographyWeddingPort.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Wedding Portrait field') 
      form.txtPhotographyWeddingPort.focus(); 
      return false; 
      } 
	  
	  if (form.txtPhotographyWeddingPortBudget.value != "" && !IsNumeric(form.txtPhotographyWeddingPortBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Wedding Portrait Budget field') 
      form.txtPhotographyWeddingPortBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtPhotographyWeddingPhoto.value != "" && !IsNumeric(form.txtPhotographyWeddingPhoto.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Wedding Photographs field') 
      form.txtPhotographyWeddingPhoto.focus(); 
      return false; 
      } 
	  
	  if (form.txtPhotographyWeddingPhotoBudget.value != "" && !IsNumeric(form.txtPhotographyWeddingPhotoBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Wedding Photographs Budget field') 
      form.txtPhotographyWeddingPhotoBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtPhotographyWeddingAlbum.value != "" && !IsNumeric(form.txtPhotographyWeddingAlbum.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Wedding Album field') 
      form.txtPhotographyWeddingAlbum.focus(); 
      return false; 
      } 
	  
	  if (form.txtPhotographyWeddingAlbumBudget.value != "" && !IsNumeric(form.txtPhotographyWeddingAlbumBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Wedding Album Budget field') 
      form.txtPhotographyWeddingAlbumBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtM_E_BandCeremony.value != "" && !IsNumeric(form.txtM_E_BandCeremony.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Band Ceremony field') 
      form.txtM_E_BandCeremony.focus(); 
      return false; 
      } 
	  
	  if (form.txtM_E_BandCeremonyBudget.value != "" && !IsNumeric(form.txtM_E_BandCeremonyBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Band Ceremony Budget field') 
      form.txtM_E_BandCeremonyBudget.focus(); 
      return false; 
      } 
	 
	  if (form.txtM_E_DJCeremony.value != "" && !IsNumeric(form.txtM_E_DJCeremony.value)) 
      { 
      alert('Please enter only numbers or decimal points in the DJ Ceremony field') 
      form.txtM_E_DJCeremony.focus(); 
      return false; 
      } 
	  
	  if (form.txtM_E_DJCeremonyBudget.value != "" && !IsNumeric(form.txtM_E_DJCeremonyBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the DJ Ceremony Budget field') 
      form.txtM_E_DJCeremonyBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtM_E_BandReception.value != "" && !IsNumeric(form.txtM_E_BandReception.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Band Reception field') 
      form.txtM_E_BandReception.focus(); 
      return false; 
      } 
	  
	  if (form.txtM_E_BandReceptionBudget.value != "" && !IsNumeric(form.txtM_E_BandReceptionBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Band Reception Budget field') 
      form.txtM_E_BandReceptionBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtM_E_DJReception.value != "" && !IsNumeric(form.txtM_E_DJReception.value)) 
      { 
      alert('Please enter only numbers or decimal points in the DJ Reception field') 
      form.txtM_E_DJReception.focus(); 
      return false; 
      } 
	  
	  if (form.txtM_E_DJReceptionBudget.value != "" && !IsNumeric(form.txtM_E_DJReceptionBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the DJ Reception Budget field') 
      form.txtM_E_DJReceptionBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtVideography_VideoTaping.value != "" && !IsNumeric(form.txtVideography_VideoTaping.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Videotaping field') 
      form.txtVideography_VideoTaping.focus(); 
      return false; 
      } 
	  
	  if (form.txtVideography_VideoTapingBudget.value != "" && !IsNumeric(form.txtVideography_VideoTapingBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Videotaping Budget field') 
      form.txtVideography_VideoTapingBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtVideography_Editing.value != "" && !IsNumeric(form.txtVideography_Editing.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Vidoe Edtiting field') 
      form.txtVideography_Editing.focus(); 
      return false; 
      } 
	  
	  if (form.txtVideography_EditingBudget.value != "" && !IsNumeric(form.txtVideography_EditingBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Vidoe Edtiting Budget field') 
      form.txtVideography_EditingBudget.focus(); 
      return false; 
      } 
	 
	  if (form.txtStationery_Invitations.value != "" && !IsNumeric(form.txtStationery_Invitations.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Wedding Invitations field') 
      form.txtStationery_Invitations.focus(); 
      return false; 
      } 
	  
	  if (form.txtStationery_InvitationsBudget.value != "" && !IsNumeric(form.txtStationery_InvitationsBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Wedding Invitations Budget field') 
      form.txtStationery_InvitationsBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtStationery_WedAnnounce.value != "" && !IsNumeric(form.txtStationery_WedAnnounce.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Wedding Announcements field') 
      form.txtStationery_WedAnnounce.focus(); 
      return false; 
      } 
	  
	  if (form.txtStationery_WedAnnounceBudget.value != "" && !IsNumeric(form.txtStationery_WedAnnounceBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Wedding Announcements Budget field') 
      form.txtStationery_WedAnnounceBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtStationery_WedProgram.value != "" && !IsNumeric(form.txtStationery_WedProgram.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Wedding Program field') 
      form.txtStationery_WedProgram.focus(); 
      return false; 
      } 
	  
	  if (form.txtStationery_WedProgramBudget.value != "" && !IsNumeric(form.txtStationery_WedProgramBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Wedding Program Budget field') 
      form.txtStationery_WedProgramBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtStationery_ThankNotes.value != "" && !IsNumeric(form.txtStationery_ThankNotes.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Wedding Thank You Notes field') 
      form.txtStationery_ThankNotes.focus(); 
      return false; 
      } 
	  
	  if (form.txtStationery_ThankNotesBudget.value != "" && !IsNumeric(form.txtStationery_ThankNotesBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Wedding Thank You Notes Budget field') 
      form.txtStationery_ThankNotesBudget.focus(); 
      return false; 
      } 
	 
	  if (form.txtStationery_Maps.value != "" && !IsNumeric(form.txtStationery_Maps.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Wedding Maps field') 
      form.txtStationery_Maps.focus(); 
      return false; 
      } 
	  
	  if (form.txtStationery_MapsBudget.value != "" && !IsNumeric(form.txtStationery_MapsBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Wedding Maps Budget field') 
      form.txtStationery_MapsBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtStationery_Postage.value != "" && !IsNumeric(form.txtStationery_Postage.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Wedding Postage field') 
      form.txtStationery_Postage.focus(); 
      return false; 
      } 
	  
	  if (form.txtStationery_PostageBudget.value != "" && !IsNumeric(form.txtStationery_PostageBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Wedding Postage Budget field') 
      form.txtStationery_PostageBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtStationery_Napkins.value != "" && !IsNumeric(form.txtStationery_Napkins.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Wedding Napkins field') 
      form.txtStationery_Napkins.focus(); 
      return false; 
      } 
	  
	  if (form.txtStationery_NapkinsBudget.value != "" && !IsNumeric(form.txtStationery_NapkinsBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Wedding Napkins Budget field') 
      form.txtStationery_NapkinsBudget.focus(); 
      return false; 
      } 
	  	  
	  if (form.txtRehearsal_Food.value != "" && !IsNumeric(form.txtRehearsal_Food.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Reheasal Food field') 
      form.txtRehearsal_Food.focus(); 
      return false; 
      } 
	  
	  if (form.txtRehearsal_FoodBudget.value != "" && !IsNumeric(form.txtRehearsal_FoodBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Reheasal Food Budget field') 
      form.txtRehearsal_FoodBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtRehearsal_Bev.value != "" && !IsNumeric(form.txtRehearsal_Bev.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Reheasal Beverage field') 
      form.txtRehearsal_Bev.focus(); 
      return false; 
      } 
	  
	  if (form.txtRehearsal_BevBudget.value != "" && !IsNumeric(form.txtRehearsal_BevBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Reheasal Beverage Budget field') 
      form.txtRehearsal_BevBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtRehearsal_RoomRental.value != "" && !IsNumeric(form.txtRehearsal_RoomRental.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Reheasal Room Rental field') 
      form.txtRehearsal_RoomRental.focus(); 
      return false; 
      } 
	  
	  if (form.txtRehearsal_RoomRentalBudget.value != "" && !IsNumeric(form.txtRehearsal_RoomRentalBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Reheasal Room Rental Budget field') 
      form.txtRehearsal_RoomRentalBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtWeddingCake_Cake.value != "" && !IsNumeric(form.txtWeddingCake_Cake.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Wedding Cake field') 
      form.txtWeddingCake_Cake.focus(); 
      return false; 
      } 
	  
	  if (form.txtWeddingCake_CakeBudget.value != "" && !IsNumeric(form.txtWeddingCake_CakeBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Wedding Cake Budget field') 
      form.txtWeddingCake_CakeBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtWeddingCake_CakeTopper.value != "" && !IsNumeric(form.txtWeddingCake_CakeTopper.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Wedding Cake Topper field') 
      form.txtWeddingCake_CakeTopper.focus(); 
      return false; 
      } 
	  
	  if (form.txtWeddingCake_CakeTopperBudget.value != "" && !IsNumeric(form.txtWeddingCake_CakeTopperBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Wedding Cake Topper Budget field') 
      form.txtWeddingCake_CakeTopperBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtWeddingCake_CakeKnife.value != "" && !IsNumeric(form.txtWeddingCake_CakeKnife.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Wedding Cake Knife field') 
      form.txtWeddingCake_CakeKnife.focus(); 
      return false; 
      } 
	  
	  if (form.txtWeddingCake_CakeKnifeBudget.value != "" && !IsNumeric(form.txtWeddingCake_CakeKnifeBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Wedding Cake Knife Budget field') 
      form.txtWeddingCake_CakeKnifeBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtWeddingCake_GroomCake.value != "" && !IsNumeric(form.txtWeddingCake_GroomCake.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Grooms Cake field') 
      form.txtWeddingCake_GroomCake.focus(); 
      return false; 
      } 
	  
	  if (form.txtWeddingCake_GroomCakeBudget.value != "" && !IsNumeric(form.txtWeddingCake_GroomCakeBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Grooms Cake Budget field') 
      form.txtWeddingCake_GroomCakeBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtFlowers_Ceremony.value != "" && !IsNumeric(form.txtFlowers_Ceremony.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Ceremony Flowers field') 
      form.txtFlowers_Ceremony.focus(); 
      return false; 
      } 
	  
	  if (form.txtFlowers_CeremonyBudget.value != "" && !IsNumeric(form.txtFlowers_CeremonyBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Ceremony Flowers Budget field') 
      form.txtFlowers_CeremonyBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtFlowers_Reception.value != "" && !IsNumeric(form.txtFlowers_Reception.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Reception Flowers field') 
      form.txtFlowers_Reception.focus(); 
      return false; 
      } 
	  
	  if (form.txtFlowers_ReceptionBudget.value != "" && !IsNumeric(form.txtFlowers_ReceptionBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Reception Flowers Budget field') 
      form.txtFlowers_ReceptionBudget.focus(); 
      return false; 
      } 
	 
	  if (form.txtFlowers_BrideBouquet.value != "" && !IsNumeric(form.txtFlowers_BrideBouquet.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Brides Bouquet field') 
      form.txtFlowers_BrideBouquet.focus(); 
      return false; 
      } 
	  
	  if (form.txtFlowers_BrideBouquetBudget.value != "" && !IsNumeric(form.txtFlowers_BrideBouquetBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Brides Bouquet Budget field') 
      form.txtFlowers_BrideBouquetBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtFlowers_AtendantBouquet.value != "" && !IsNumeric(form.txtFlowers_AtendantBouquet.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Attendants Bouquet field') 
      form.txtFlowers_AtendantBouquet.focus(); 
      return false; 
      } 
	  
	  if (form.txtFlowers_AtendantBouquetBudget.value != "" && !IsNumeric(form.txtFlowers_AtendantBouquetBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Attendants Bouquet Budget field') 
      form.txtFlowers_AtendantBouquetBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtFlowers_Boutonn.value != "" && !IsNumeric(form.txtFlowers_Boutonn.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Boutonnieres field') 
      form.txtFlowers_Boutonn.focus(); 
      return false; 
      } 
	  
	  if (form.txtFlowers_BoutonnBudget.value != "" && !IsNumeric(form.txtFlowers_BoutonnBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Boutonnieres Budget field') 
      form.txtFlowers_BoutonnBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtFlowers_FloralPreservation.value != "" && !IsNumeric(form.txtFlowers_FloralPreservation.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Floral Preservation field') 
      form.txtFlowers_FloralPreservation.focus(); 
      return false; 
      } 
	  
	  if (form.txtFlowers_FloralPreservationBudget.value != "" && !IsNumeric(form.txtFlowers_FloralPreservationBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Floral Preservation Budget field') 
      form.txtFlowers_FloralPreservationBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtFlowers_FlowerGirlRingBearer.value != "" && !IsNumeric(form.txtFlowers_FlowerGirlRingBearer.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Flower Girl/Ring Bearer field') 
      form.txtFlowers_FlowerGirlRingBearer.focus(); 
      return false; 
      } 
	  
	  if (form.txtFlowers_FlowerGirlRingBearerBudget.value != "" && !IsNumeric(form.txtFlowers_FlowerGirlRingBearerBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Flower Girl/Ring Bearer Budget field') 
      form.txtFlowers_FlowerGirlRingBearerBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtGroomAttire_TuxSuit.value != "" && !IsNumeric(form.txtGroomAttire_TuxSuit.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Grooms Attire field') 
      form.txtGroomAttire_TuxSuit.focus(); 
      return false; 
      } 
	  
	  if (form.txtGroomAttire_TuxSuitBudget.value != "" && !IsNumeric(form.txtGroomAttire_TuxSuitBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Grooms Attire Budget field') 
      form.txtGroomAttire_TuxSuitBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtTransportation_Limo.value != "" && !IsNumeric(form.txtTransportation_Limo.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Limosuine field') 
      form.txtTransportation_Limo.focus(); 
      return false; 
      } 
	  
	  if (form.txtTransportation_LimoBudget.value != "" && !IsNumeric(form.txtTransportation_LimoBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Limosuine Budget field') 
      form.txtTransportation_LimoBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtTransportation_Valet.value != "" && !IsNumeric(form.txtTransportation_Valet.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Valet field') 
      form.txtTransportation_Valet.focus(); 
      return false; 
      } 
	  
	   if (form.txtTransportation_ValetBudget.value != "" && !IsNumeric(form.txtTransportation_ValetBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Valet Budget field') 
      form.txtTransportation_ValetBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtBeauty_Facial.value != "" && !IsNumeric(form.txtBeauty_Facial.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Facial field') 
      form.txtBeauty_Facial.focus(); 
      return false; 
      } 
	  
	  if (form.txtBeauty_FacialBudget.value != "" && !IsNumeric(form.txtBeauty_FacialBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Facial Budget field') 
      form.txtBeauty_FacialBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtBeauty_Manicure.value != "" && !IsNumeric(form.txtBeauty_Manicure.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Manicure field') 
      form.txtBeauty_Manicure.focus(); 
      return false; 
      } 
	  
	  if (form.txtBeauty_ManicureBudget.value != "" && !IsNumeric(form.txtBeauty_ManicureBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Manicure Budget field') 
      form.txtBeauty_ManicureBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtBeauty_Pedicure.value != "" && !IsNumeric(form.txtBeauty_Pedicure.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Pedicure field') 
      form.txtBeauty_Pedicure.focus(); 
      return false; 
      } 
	  
	  if (form.txtBeauty_PedicureBudget.value != "" && !IsNumeric(form.txtBeauty_PedicureBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Pedicure Budget field') 
      form.txtBeauty_PedicureBudget.focus(); 
      return false; 
      } 
	  
	  if (form.txtBeauty_Massage.value != "" && !IsNumeric(form.txtBeauty_Massage.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Massage field') 
      form.txtBeauty_Massage.focus(); 
      return false; 
      }
	  
	  if (form.txtBeauty_MassageBudget.value != "" && !IsNumeric(form.txtBeauty_MassageBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Massage Budget field') 
      form.txtBeauty_MassageBudget.focus(); 
      return false; 
      }
	  
	  if (form.txtBeauty_Hair.value != "" && !IsNumeric(form.txtBeauty_Hair.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Beauty Hair field') 
      form.txtBeauty_Hair.focus(); 
      return false; 
      }
	  
	  if (form.txtBeauty_HairBudget.value != "" && !IsNumeric(form.txtBeauty_HairBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Beauty Hair Budget field') 
      form.txtBeauty_HairBudget.focus(); 
      return false; 
      }
	  
	  if (form.txtBeauty_Makeup.value != "" && !IsNumeric(form.txtBeauty_Makeup.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Makeup field') 
      form.txtBeauty_Makeup.focus(); 
      return false; 
      }
	  
	  if (form.txtBeauty_MakeupBudget.value != "" && !IsNumeric(form.txtBeauty_MakeupBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Makeup Budget field') 
      form.txtBeauty_MakeupBudget.focus(); 
      return false; 
      }
	  
	  if (form.txtHoneyMoon_WeddingNight.value != "" && !IsNumeric(form.txtHoneyMoon_WeddingNight.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Wedding Night field') 
      form.txtHoneyMoon_WeddingNight.focus(); 
      return false; 
      }  
	  
	  if (form.txtHoneyMoon_WeddingNightBudget.value != "" && !IsNumeric(form.txtHoneyMoon_WeddingNightBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Wedding Night Budget field') 
      form.txtHoneyMoon_WeddingNightBudget.focus(); 
      return false; 
      }  
	  
	  if (form.txtHoneyMoon_HotelResort.value != "" && !IsNumeric(form.txtHoneyMoon_HotelResort.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Hotel Resort field') 
      form.txtHoneyMoon_HotelResort.focus(); 
      return false; 
      }  
	  
	  if (form.txtHoneyMoon_HotelResortBudget.value != "" && !IsNumeric(form.txtHoneyMoon_HotelResortBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Hotel Resort Budget field') 
      form.txtHoneyMoon_HotelResortBudget.focus(); 
      return false; 
      }  
	  
	  if (form.txtHoneyMoon_Transportation.value != "" && !IsNumeric(form.txtHoneyMoon_Transportation.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Honeymoon Transpotation field') 
      form.txtHoneyMoon_Transportation.focus(); 
      return false; 
      }  
	  
	  if (form.txtHoneyMoon_TransportationBudget.value != "" && !IsNumeric(form.txtHoneyMoon_TransportationBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Honeymoon Transpotation Budget field') 
      form.txtHoneyMoon_TransportationBudget.focus(); 
      return false; 
      }  
	  
	  if (form.txtHoneyMoon_Money.value != "" && !IsNumeric(form.txtHoneyMoon_Money.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Honeymoon Money field') 
      form.txtHoneyMoon_Money.focus(); 
      return false; 
      }  
	  
	  if (form.txtHoneyMoon_MoneyBudget.value != "" && !IsNumeric(form.txtHoneyMoon_MoneyBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Honeymoon Money Budget field') 
      form.txtHoneyMoon_MoneyBudget.focus(); 
      return false; 
      }  
	  
	  if (form.txtGifts_Attendants.value != "" && !IsNumeric(form.txtGifts_Attendants.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Attendant Gifts field') 
      form.txtGifts_Attendants.focus(); 
      return false; 
      }  
	  
	  if (form.txtGifts_AttendantsBudget.value != "" && !IsNumeric(form.txtGifts_AttendantsBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Attendant Gifts Budget field') 
      form.txtGifts_AttendantsBudget.focus(); 
      return false; 
      }  
	  
	  if (form.txtGifts_EachOther.value != "" && !IsNumeric(form.txtGifts_EachOther.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Gifts to Each Other field') 
      form.txtGifts_EachOther.focus(); 
      return false; 
      }  
	  
	  if (form.txtGifts_EachOtherBudget.value != "" && !IsNumeric(form.txtGifts_EachOtherBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Gifts to Each Other Budget field') 
      form.txtGifts_EachOtherBudget.focus(); 
      return false; 
      }  
	  
	  if (form.txtGifts_Favors.value != "" && !IsNumeric(form.txtGifts_Favors.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Favors field') 
      form.txtGifts_Favors.focus(); 
      return false; 
      }  
	  
	  if (form.txtGifts_FavorsBudget.value != "" && !IsNumeric(form.txtGifts_FavorsBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Favors Budget field') 
      form.txtGifts_FavorsBudget.focus(); 
      return false; 
      }  
	  
	  if (form.txtOthers_GuestBook.value != "" && !IsNumeric(form.txtOthers_GuestBook.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Guest Book field') 
      form.txtOthers_GuestBook.focus(); 
      return false; 
      }  
	  
	  if (form.txtOthers_GuestBookBudget.value != "" && !IsNumeric(form.txtOthers_GuestBookBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Guest Book Budget field') 
      form.txtOthers_GuestBookBudget.focus(); 
      return false; 
      }  
	  
	  if (form.txtOthers_GobletFlutes.value != "" && !IsNumeric(form.txtOthers_GobletFlutes.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Goblets/Flutes field') 
      form.txtOthers_GobletFlutes.focus(); 
      return false; 
      }  
	  
	  if (form.txtOthers_GobletFlutesBudget.value != "" && !IsNumeric(form.txtOthers_GobletFlutesBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Goblets/Flutes Budget field') 
      form.txtOthers_GobletFlutesBudget.focus(); 
      return false; 
      }  
	  
	  if (form.txtOthers_RingPillow.value != "" && !IsNumeric(form.txtOthers_RingPillow.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Ring Pillow field') 
      form.txtOthers_RingPillow.focus(); 
      return false; 
      }  
	  
	  if (form.txtOthers_RingPillowBudget.value != "" && !IsNumeric(form.txtOthers_RingPillowBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Ring Pillow Budget field') 
      form.txtOthers_RingPillowBudget.focus(); 
      return false; 
      }  
	  
	  if (form.txtOthers_GuestMomentos.value != "" && !IsNumeric(form.txtOthers_GuestMomentos.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Guest Momentos field') 
      form.txtOthers_GuestMomentos.focus(); 
      return false; 
      }  
	  
	  if (form.txtOthers_GuestMomentosBudget.value != "" && !IsNumeric(form.txtOthers_GuestMomentosBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Guest Momentos Budget field') 
      form.txtOthers_GuestMomentosBudget.focus(); 
      return false; 
      }  
	  
	  if (form.txtOthers_SparkBubble.value != "" && !IsNumeric(form.txtOthers_SparkBubble.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Sparklers/Bubbles field') 
      form.txtOthers_SparkBubble.focus(); 
      return false; 
      }  
	  
	  if (form.txtOthers_SparkBubbleBudget.value != "" && !IsNumeric(form.txtOthers_SparkBubbleBudget.value)) 
      { 
      alert('Please enter only numbers or decimal points in the Sparklers/Bubbles Budget field') 
      form.txtOthers_SparkBubbleBudget.focus(); 
      return false; 
      }  
	  
	  
}


function FormRegisterVerify (emailStr) {
	if (document.myform.BrideFirstName.value == "") {
		alert("You must enter the bride's first name to qualify!");
		document.myform.BrideFirstName.focus();
		return false; }
	if (document.myform.BrideLastName.value == "") {
		alert("You must enter the bride's last name to qualify!");
		document.myform.BrideLastName.focus();
		return false; }
	if (document.myform.Address.value == "") {
		alert("You must enter the bride's address to qualify!");
		document.myform.Address.focus();
		return false; }
	if (document.myform.City.value == "") {
		alert("You must enter the bride's city to qualify!");
		document.myform.City.focus();
		return false; }
	if (document.myform.State.value == "--") {
		alert("You must enter the bride's state to qualify!");
		document.myform.State.focus();
		return false; }
	if (document.myform.Zip1.value == "") {
		alert("You must enter the bride's zip code to qualify!");
		document.myform.Zip1.focus();
		return false; }
	if (document.myform.Email.value == "") {
		alert("You must enter the bride's email address to qualify!");
		document.myform.Email.focus();
		return false; }
		else{
			/* The following pattern is used to check if the entered e-mail address
			   fits the user@domain format.  It also is used to separate the username
			   from the domain. */
			var emailPat=/^(.+)@(.+)$/
			/* The following string represents the pattern for matching all special
			   characters.  We don't want to allow special characters in the address. 
			   These characters include ( ) < > @ , ; : \ " . [ ]    */
			var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
			/* The following string represents the range of characters allowed in a 
			   username or domainname.  It really states which chars aren't allowed. */
			var validChars="\[^\\s" + specialChars + "\]"
			/* The following pattern applies if the "user" is a quoted string (in
			   which case, there are no rules about which characters are allowed
			   and which aren't; anything goes).  E.g. "jiminy cricket"@disney.com
			   is a legal e-mail address. */
			var quotedUser="(\"[^\"]*\")"
			/* The following pattern applies for domains that are IP addresses,
			   rather than symbolic names.  E.g. joe@[123.124.233.4] is a legal
			   e-mail address. NOTE: The square brackets are required. */
			var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
			/* The following string represents an atom (basically a series of
			   non-special characters.) */
			var atom=validChars + '+'
			/* The following string represents one word in the typical username.
			   For example, in john.doe@somewhere.com, john and doe are words.
			   Basically, a word is either an atom or quoted string. */
			var word="(" + atom + "|" + quotedUser + ")"
			// The following pattern describes the structure of the user
			var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
			/* The following pattern describes the structure of a normal symbolic
			   domain, as opposed to ipDomainPat, shown above. */
			var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")


			/* Finally, let's start trying to figure out if the supplied address is
			   valid. */

			/* Begin with the coarse pattern to simply break up user@domain into
			   different pieces that are easy to analyze. */
			var matchArray=emailStr.match(emailPat)
			if (matchArray==null) {
			  /* Too many/few @'s or something; basically, this address doesn't
			     even fit the general mould of a valid e-mail address. */
				alert("Email address seems incorrect.")
				return false;
			}
			var user=matchArray[1]
			var domain=matchArray[2]

			// See if "user" is valid 
			if (user.match(userPat)==null) {
			    // user is not valid
			    alert("The username doesn't seem to be valid.")
			    return false;
			}

			/* if the e-mail address is at an IP address (as opposed to a symbolic
			   host name) make sure the IP address is valid. */
			var IPArray=domain.match(ipDomainPat)
			if (IPArray!=null) {
			    // this is an IP address
				  for (var i=1;i<=4;i++) {
				    if (IPArray[i]>255) {
				        alert("Destination IP address is invalid!")
					return false;
				    }
			    }
			    return true;
			}

			// Domain is symbolic name
			var domainArray=domain.match(domainPat)
			if (domainArray==null) {
				alert("The domain name doesn't seem to be valid.")
			    return false;
			}

			/* domain name seems valid, but now make sure that it ends in a
			   three-letter word (like com, edu, gov) or a two-letter word,
			   representing country (uk, nl), and that there's a hostname preceding 
			   the domain or country. */

			/* Now we need to break up the domain to get a count of how many atoms
			   it consists of. */
			var atomPat=new RegExp(atom,"g")
			var domArr=domain.match(atomPat)
			var len=domArr.length
			if (domArr[domArr.length-1].length<2 || 
			    domArr[domArr.length-1].length>3) {
			   // the address must end in a two letter or three letter word.
			   alert("The address must end in a three-letter domain, or two letter country.")
			   return false;
			}

			// Make sure there's a host name preceding the domain.
			if (len<2) {
			   var errStr="This address is missing a hostname!"
			   alert(errStr)
			   return false;
			}

			// If we've gotten this far, everything's valid!
			//return true;
		}
	if (document.myform.Email2.value == "") {
		alert("You must REENTER the bride's email address to qualify!");
		document.myform.Email2.focus();
		return false; }
	if (document.myform.Email.value != document.myform.Email2.value) {
		alert("Your email address entries don't match! Please make sure your email address is entered accurately in both fields!");
		document.myform.Email.focus();
		return false; }
	if (document.myform.Password.value == "") {
		alert("You must Enter a Password!");
		document.myform.Password.focus();
		return false; }
	if (document.myform.Password.value != document.myform.Password2.value) {
		alert("Your password entries don't match! Please make sure your password is entered accurately in both fields!");
		document.myform.Email.focus();
		return false; }
	if (document.myform.GroomFirstName.value == "") {
		alert("You must enter the groom's first name to qualify!");
		document.myform.GroomFirstName.focus();
		return false; }
	if (document.myform.GroomLastName.value == "") {
		alert("You must enter the groom's last name to qualify!");
		document.myform.GroomLastName.focus();
		return false; }
	if (document.myform.WeddingMonth.value == "--") {
		alert("You must enter the bride's wedding date to qualify!");
		document.myform.WeddingMonth.focus();
		return false; }
	if (document.myform.WeddingDay.value == "--") {
		alert("You must enter the bride's wedding date to qualify!");
		document.myform.WeddingDay.focus();
		return false; }
	if (document.myform.WhichCity.value == "") {
		alert("You must choose a City that you're getting married in.");
		document.myform.WhichCity.focus();
		return false; }
}
//  End -->

function IsNumeric(strString)
   //  check for valid numeric strings	
   {
   var strValidChars = "0123456789.-";
   var strChar;
   var blnResult = true;

   if (strString.length == 0) return false;

   //  test strString consists of valid characters listed above
   for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
         blnResult = false;
         }
      }
   return blnResult;
   }

  // -->
  
  function maskKeyPress(objEvent){
	var iKeyCode;  	
	iKeyCode = objEvent.keyCode;			
	if(iKeyCode>=48 && iKeyCode<=57) return true;
	return false;
	}
	function autoTab(fieldName,numChar,moveToField){
	var thisField = eval("document.myform."+fieldName);
	var nextField = eval("document.myform."+moveToField);
	if (thisField.value.length >= numChar){
		nextField.focus();
		return;
	}
}




/* BEGIN NEW 2007  */

// returns domain of browser url
function getThisDomain(){ return window.location.href.substr(0, window.location.href.indexOf("/",8)); }
// returns page path portion of browser url
function getThisPath(){ return window.location.href.substr(window.location.href.indexOf("/",8)); }
// returns false if the url points outside the domain of the browser 
function isThisDomain(sUrl){
    if(!/^https?:\/\//i.test(sUrl)) return true;
    var domain = getThisDomain().toLowerCase();
    return sUrl.toLowerCase().substr(0,domain.length) == domain;
}
// finds all external links and attaches call back url to onclick //example: <a href="http://www.vitaminzrecords.com" name="websiteLink">test</a> will log when linked from a profile page having LID in the referer url
function clickTrackBacks(handlerUrl){
    var anchors = document.getElementsByTagName( "A" );
    var page = escape(getThisPath());
    for( var i=0; i<anchors.length;i++){
        var href = anchors[i].href;
        if(!isThisDomain(href)){
            Event.observe( anchors[i], "click", function(){
                var rnd=parseInt(Math.random()*99999999); // cache buster
                var sUrl=handlerUrl;
                sUrl+=(sUrl.indexOf("?")>-1)?"&":"?";
                sUrl+="clickTrackPage="+page;
                if(this.id)sUrl+="&linkid="+this.id;
                if(this.name)sUrl+="&linkname="+this.name;
                sUrl+="&targetUrl="+escape(anchors[i])+"&r="+rnd;
                var oImg = new Image();
                oImg.src = sUrl;
                return true;
            });
        }
    }
}

function phpads_deliverActiveX(content) {
	document.write(content);	
}

// writes the javascript necessary to show an ad //requires: <script language='JavaScript' type='text/javascript' src='http://www.perfectweddingguide.com/advert/adx.js'></script>
function writeAdvert( selectionString, width, height ){
	if (!document.phpAds_used) document.phpAds_used = ',';
	phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
	
    var m3_u = (location.protocol=='https:'?'https://shop.perfectweddingguide.com/advert/www/delivery/ajs.php':'http://www.perfectweddingguide.com/advert/www/delivery/ajs.php');
   
    var m3_r = Math.floor(Math.random()*99999999999);
    if (!document.MAX_used) document.MAX_used = ',';
   
    var m3_qs = '?zoneid=' + selectionString;
    m3_qs += '&amp;cb=' + m3_r;
    if (document.MAX_used != ',') m3_qs += '&amp;exclude=' + document.MAX_used;
    m3_qs += '&amp;loc=' + escape(window.location);
    //if (document.referrer) m3_qs += '&amp;referer=' + escape(document.referrer);
    if (document.context) m3_qs += '&context=' + escape(document.context);
    if (document.mmm_fo) m3_qs += '&amp;mmm_fo=1';
	
	var handlerUrl = m3_u + m3_qs;
	
	var url = "/advertising.htm?url=" + escape(handlerUrl);
	var iframeid = "ad_" + m3_r;
	var iframe = "<iframe id='" + iframeid + "' name='" + iframeid + "' src='" + url + "' allowtransparency='true' framespacing='0' frameborder='no' scrolling='no' style='padding: 0; margin: 0; overflow:hidden;' width='" + width + "' height='" + height + "'><" + "/iframe>";
	document.write ( iframe );
}



