function ccp(b,a){var c=new YAHOO.widget.ColorPicker(b,{showhexcontrols:true,showhexsummary:false,showrgbcontrols:false,images:{PICKER_THUMB:"/img/common/color/picker_thumb.png",HUE_THUMB:"/img/common/color/hue_thumb.png"}});changeColorPicker(c,a);return c}function changeColorPicker(b,c){try{var a=YAHOO.util.Color.hex2rgb(c);b.setValue(a,true)}catch(d){}}function setTemplateOption1(a){setAndHightlight(a,"option1Template","option1_")}function setAndHightlight(e,c,b){var a=getInputValue(c);if(a!=""&&a!=undefined){var d=document.getElementById(b+a);d.style.backgroundColor="#FFFFFF"}d=document.getElementById(b+e);d.style.backgroundColor="#F0D8D8";setInputValue(c,e)}function setTemplateOption2(a){setAndHightlight(a,"option2Template","option2_")}function setTemplateOption3(a){setAndHightlight(a,"option3Template","option3_")}function selectColorSelection(a){setAndHightlight(a,"option2Selection","option2_Table_")}function copyOverSelections(b){setAndHightlight(b,"option3Selection","option3_Table_");var a=getInputValue("option3_primary"+b);changeColorPicker(bgCP,a);a=getInputValue("option3_secondary"+b);changeColorPicker(sCP,a);a=getInputValue("option3_url"+b);changeColorPicker(uCP,a);a=getInputValue("option3_text"+b);changeColorPicker(tCP,a);a=getInputValue("option3_hover"+b);changeColorPicker(uHCP,a);a=getInputValue("option3_font"+b);setSelected("option3_siteFont",a);a=getInputValue("option3_fontSize"+b);setSelected("option3_fontSize",a);a=getInputValue("option3_titleSize"+b);setSelected("option3_titleSize",a)}function setSelected(b,d){var a=document.getElementById(b);for(var c=0;c<a.options.length;c++){if(d==a.options[c].value){a.options[c].selected=true}}}function seeMySiteOption1(){var c=getInputValue("option1Template");if(c==""){alert("Please select a Web Site Template")}else{try{pageTracker._trackEvent("Demo","Option 1")}catch(b){}var a="http://www.thebridalbell.com/demo/weddingwebsite/homepage.htm?originalSchemeSubmitted=true&subdomain="+c;window.open(a,"Website","width=990,height=600,scrollbars=1")}}function seeMySiteOption2(){var i=getInputValue("option2Template");if(i==""){alert("Please select a Web Site Template")}else{try{pageTracker._trackEvent("Demo","Option 2")}catch(f){}var c=getInputValue("option2Selection");var e=getInputValue("option2_primary"+c);var j=getInputValue("option2_secondary"+c);var g=getInputValue("option2_url"+c);var k=getInputValue("option2_text"+c);var h=getInputValue("option2_hover"+c);var d=getInputValue("option2_font"+c);var l=getInputValue("option2_fontSize"+c);var b=getInputValue("option2_titleSize"+c);var a="http://www.thebridalbell.com/demo/weddingwebsite/homepage.htm?subdomain="+i+"&fontSizeSet=true&titleSizeSet=true&backgroundColor="+e+"&secondaryColor="+j+"&urlColor="+g+"&textColor="+k+"&urlHoverColor="+h+"&font="+d+"&fontSize="+l+"&titleSize="+b;window.open(a,"Website","width=990,height=650,scrollbars=1")}}function seeMySiteOption3(){var h=getInputValue("option3Template");if(h==""){alert("Please select a Web Site Template")}else{try{pageTracker._trackEvent("Demo","Option 3")}catch(e){}var d=bgCP.get("hex");var i=sCP.get("hex");var f=uCP.get("hex");var j=tCP.get("hex");var g=uHCP.get("hex");var c=getInputValue("option3_siteFont");var k=getInputValue("option3_fontSize");var b=getInputValue("option3_titleSize");var a="http://www.thebridalbell.com/demo/weddingwebsite/homepage.htm?subdomain="+h+"&fontSizeSet=true&titleSizeSet=true&backgroundColor="+d+"&secondaryColor="+i+"&urlColor="+f+"&textColor="+j+"&urlHoverColor="+g+"&font="+c+"&fontSize="+k+"&titleSize="+b;window.open(a,"Website","width=990,height=650,scrollbars=1")}}function saveRSVPTemplate(d){var b="/wedding/website/member/editRSVPTemplate.htm";var f=getInputValue("title");var c=getInputValue("message");var e="id="+d+"&title="+f+"&message="+c;var a="rsvpTemplate";ajaxPostAction(a,"Save Failed",b,e)}function removeFoodChoice(e,c){var b="/wedding/website/member/removeFoodChoice.htm";var d="food.id="+e+"&rsvpTemplate.id="+c;var a="food_"+e;ajaxPostAction(a,"Remove Failed",b,d)}function showAddFoodChoiceForm(d){var b="/wedding/website/member/addFoodChoice.htm";var e="rsvpTemplate.id="+d;var c="Failed to load Food Form";var a="foodForm";getLoading(a,c,b,e)}function addFoodChoice(f){var b=getInputValue("food.name");var i=getInputValue("food.description");var h=getInputValue("food.price");var g="rsvpTemplate.id="+f+"&food.name="+b+"&food.description="+i+"&food.price="+h;var c="Save Failed";var d="foodForm";var e="addedFoodChoices";var a="/wedding/website/member/addFoodChoice.htm";doAppendPost(d,e,c,a,g)}function addGuestTextBox(a){var b=getInputValue(a);b++;divReveal("guestId_"+b);setInputValue(a,b)}function showGuestForm(d){var a="/wedding/website/member/addGuest.htm";var e="rsvpRequest.id="+d;var c="Failed to load Guest Form";var b="guestForm_"+d;getLoading(b,c,a,e)}function addGuest(i){var j=getInputValue("rsvpFirstName_"+i);var k=getInputValue("rsvpLastName_"+i);var h=getInputValue("rsvpGuestAgeClassification_"+i);var g=getInputValue("rsvpWillAttend_"+i);var f="rsvpRequest.id="+i+"&guest.firstName="+j+"&guest.lastName="+k+"&guest.ageClassificationCode="+h+"&guest.rsvp.willAttend="+g;var c="Save Failed";var e="rsvpRequest_"+i;var b="guestForm_"+i;var d="addedGuests_"+i;var a="/wedding/website/member/addGuest.htm";doAppendPost(b,d,c,a,f);showLoading(b)}function removeGuestTextBox(a){var b=getInputValue(a);divHide("guestId_"+b);b--;setInputValue(a,b)}function removeRSVPRequest(c){var a="/wedding/website/member/removeRSVPRequest.htm";var d="id="+c;var b="rsvpRequest_"+c;ajaxPostAction(b,"Remove Failed",a,d)}function removeGuest(c,b){var a="/wedding/website/member/removeGuest.htm";var e="guest.id="+c+"&rsvpRequest.id="+b;var d="guest_"+c;ajaxPostAction(d,"Remove Failed",a,e)}function updateGuest(f){var e=getInputValue("guestFormFirstName_"+f);var d=getInputValue("guestFormLastName_"+f);var c=getInputValue("guestFormAgeClassification_"+f);var a=getInputValue("guestFormWillAttend_"+f);var h="id="+f+"&firstName="+e+"&lastName="+d+"&ageClassificationCode="+c+"&rsvp.willAttend="+a;var b="/wedding/website/member/updateGuest.htm";var g="guestInput_"+f;ajaxPostAction(g,"Update Failed",b,h)}function getGiftForm(c){var d="guest.id="+c;var b="/wedding/website/member/addGift.htm";var a="guestGifts_"+c;ajaxPostAction(a,"Unable Retrieve Gift Form",b,d)}function addGift(e){var d=getInputValue("guestGiftName_"+e);var c=getInputValue("guestGiftDescription_"+e);var a=getInputValue("guestGiftPrice_"+e);var h=getInputValue("guestGiftType_"+e);var g="guest.id="+e+"&gift.name="+d+"&gift.description="+c+"&gift.price="+a+"&gift.giftTypeCode="+h;var b="/wedding/website/member/addGift.htm";var f="guestGifts_"+e;ajaxPostAction(f,"Unable To Save Gift",b,g)}function editGift(b){var e=getInputValue("giftName_"+b);var d=getInputValue("giftDescription_"+b);var a=getInputValue("giftPrice_"+b);var h=getInputValue("giftType_"+b);var g="id="+b+"&name="+e+"&description="+d+"&price="+a+"&giftTypeCode="+h;var c="/wedding/website/member/editGift.htm";var f="gift_"+b;ajaxPostAction(f,"Unable To Update Gift",c,g)}function removeGift(c,a){var e="guest.id="+c+"&gift.id="+a;var b="/wedding/website/member/removeGift.htm";var d="gift_"+a;ajaxPostAction(d,"Delete Failed",b,e)}function getLoading(b,c,a,d){doGet(b,c,a,d);showLoading(b)}function postLoading(b,c,a,d){doPost(b,c,a,d);showLoading(b)}function showLoading(a){var b=document.getElementById(a);b.innerHTML="<center><img src='/img/free/personal/wedding/website/barloader.gif'></center>"};