var browserType="IE";function noop(i){}YAHOO.namespace("weddingwire");function onMenuItemClick(p_sType,p_aArgs,p_oItem){document.location.href=p_oItem.value;}String.prototype.trim=function(){return this.replace(/^\s*/,"").replace(/\s*$/,"");};function readOnlyCheckBox(){return false;}function getBrowserType(){if(navigator.userAgent.indexOf("Opera")!=-1&&document.getElementById){browserType="OP";
}if(document.all){browserType="IE";}if(document.layers){browserType="NN";}if(!document.all&&document.getElementById){browserType="MO";}}function hideLayer(tid){document.getElementById(tid).style.display="none";}function hideLayerByVisibility(tid){document.getElementById(tid).style.visibility="hidden";
}function showLayer(tid){document.getElementById(tid).style.display="block";}function showLayerByVisibility(tid){document.getElementById(tid).style.visibility="visible";}var startTop,startLeft;var effectDone=false;function toggleEffect(e,text){if(!effectDone){fadeIn(e,text);effectDone=true;}else{fadeOut();
effectDone=false;}}function fadeIn(e,text){if(document.all){e=event;}var obj=document.getElementById("bubble_tooltip");var obj2=document.getElementById("bubble_tooltip_content");startTop=obj.offsetTop;startLeft=obj.offsetLeft;obj2.innerHTML=text;obj.style.display="block";var st=Math.max(document.body.scrollTop,document.documentElement.scrollTop);
var leftPos=e.clientX-100;if(leftPos<0){leftPos=0;}obj.style.left=leftPos+"px";obj.style.top=e.clientY-obj.offsetHeight-1+st+"px";new Rico.Effect.FadeTo(obj,1,200,4);}function fadeOut(){var obj=document.getElementById("bubble_tooltip");startTop=obj.offsetTop;startLeft=obj.offsetLeft;new Rico.Effect.FadeTo(obj,0,50,2);
}function resetEffect(){new Rico.Effect.FadeTo("bubble_tooltip",1,50,2);}function isPhoneNumber(s){rePhoneNumber=new RegExp(/^\([1-9]\d{2}\)\s?\d{3}\-\d{4}$/);if(!rePhoneNumber.test(s)){alert("Phone Number Must Be Entered As: (555) 555-1234");return false;}return true;}function checkPhone(TheNumber){var GoodChars="0123456789-";
var i=0;for(i=0;i<=TheNumber.length-1;i++){if(GoodChars.indexOf(TheNumber.charAt(i))==-1){alert("Phone number contains Invalid characters");return false;}}if(TheNumber.charAt(3)!="-"||TheNumber.charAt(7)!="-"||TheNumber.length!=12){alert("Phone Number should be of Format 'XXX-YYY-ZZZZ' ");return false;
}return true;}function checkZip(zip){var GoodChars="0123456789-";var i=0;for(i=0;i<=zip.length-1;i++){if(GoodChars.indexOf(zip.charAt(i))==-1){alert("Zip code contains Invalid characters");return false;}}if(zip.length!=5){if(zip.length!=10){alert("Enter 5 or 9 digit zip code of format XXXXX or XXXXX-YYYY "+zip.length);
return false;}if(zip.length==10&&zip.charAt(5)!="-"){alert("zip code should be of format XXXXX or XXXXX-YYYY");return false;}}}function genericDeleteWarning(item){if(confirm("Are you sure you want to remove this"+item)==false){return false;}}function openWindow(url){window.open(url);}function openWindow(url,winName){window.open(url,winName);
}function openPopUp(url,mbar,wid,ht,tbar,scrollbar){window.open(url,"wireWin","menubar="+mbar+",width="+wid+",height="+ht+",toolbar="+tbar+",scrollbars="+scrollbar+",resizable=yes");}function showContainer(toggle,item){if(toggle.checked){document.getElementById(item).style.display="block";}else{document.getElementById(item).style.display="none";
}}function toggleDivShowChecked(toggle,item){if(toggle.checked){document.getElementById(item).style.display="block";}else{document.getElementById(item).style.display="none";}}function toggleDivHideChecked(toggle,item){if(toggle.checked){document.getElementById(item).style.display="none";}else{document.getElementById(item).style.display="block";
}}function toggleDivSelectBox(toggle,matchVal,item){if(toggle.value==matchVal){document.getElementById(item).style.display="block";}else{document.getElementById(item).style.display="none";}}function toggleUserNavBar(){el=document.getElementById("moreNav");if(el.style.display=="none"){el.style.display="block";
createCookie("userNavMore","on","5");document.getElementById("toggleText").innerHTML="hide tools";}else{el.style.display="none";createCookie("userNavMore","off","5");document.getElementById("toggleText").innerHTML="show tools";}}function checkAll(startId,endId,flag){for(i=startId;i<=endId;i++){document.getElementById(i).checked=flag;
}}function getRandomNum(lbound,ubound){return(Math.floor(Math.random()*(ubound-lbound))+lbound);}function getRandomChar(number,lower,upper,other,extra){var numberChars="0123456789";var lowerChars="abcdefghijklmnopqrstuvwxyz";var upperChars="ABCDEFGHIJKLMNOPQRSTUVWXYZ";var otherChars="`~!@#$%^&*()-_=+[{]}\\|;:'\",<.>/? ";
var charSet=extra;if(number==true){charSet+=numberChars;}if(lower==true){charSet+=lowerChars;}if(upper==true){charSet+=upperChars;}if(other==true){charSet+=otherChars;}return charSet.charAt(getRandomNum(0,charSet.length));}function getPassword(length,extraChars,firstNumber,firstLower,firstUpper,firstOther,latterNumber,latterLower,latterUpper,latterOther){var rc="";
if(length>0){rc=rc+getRandomChar(firstNumber,firstLower,firstUpper,firstOther,extraChars);}for(var idx=1;idx<length;++idx){rc=rc+getRandomChar(latterNumber,latterLower,latterUpper,latterOther,extraChars);}return rc;}function bookmark(url,description){netscape="Press CTRL+D to add a bookmark to this site.";
if(navigator.appName=="Microsoft Internet Explorer"){window.external.AddFavorite(url,description);}else{if(navigator.appName=="Netscape"){alert(netscape);}}}var dlgConfirmationLoaded=null;function myalert(str){if(dlgConfirmationLoaded==null||!dlgConfirmationLoaded){alert(str);}else{showConfirmationDialogAlert(str);
}}charCount=1;maxCharCount=2000;function displayLeftLength(fieldName){remField=document.getElementById(fieldName);remField.innerHTML=(maxCharCount-charCount>0)?maxCharCount-charCount:0;}function evalEntryLength(curField,maxLimit,discardXtra,errClass,normalClass){maxCharCount=maxLimit;var fieldLength=getCharCount(curField);
if(fieldLength>maxLimit){if(errClass!=""){curField.className=errClass;}if(discardXtra){showAllowedLength(curField,maxLimit);}}else{if(normalClass!=""){curField.className=normalClass;}}}function getCharCount(curField){charCount=curField.value.length;return charCount;}function showAllowedLength(curField,maxLimit){curField.value=curField.value.substr(0,maxLimit);
window.status=curField.value;}function showErr(elem,msg){document.getElementById(elem+"errrow").style.display="";document.getElementById(elem+"err").innerHTML="<font color='red'>"+msg+"</font>";}function hideErr(elem){document.getElementById(elem+"errrow").style.display="none";document.getElementById(elem+"err").innerHTML="";
}function showDivErr(elem,msg){document.getElementById(elem+"_err").style.display="";document.getElementById(elem+"_err").innerHTML="<span class='error'>"+msg+"</font>";}function hideDivErr(elem){document.getElementById(elem+"_err").style.display="none";document.getElementById(elem+"_err").innerHTML="";
}function buildRowMessage(theTable,msg,colspan){row=theTable.insertRow(theTable.rows.length);td=row.insertCell(0);td.align="center";td.colSpan=colspan;td.className="greyText strong";td.innerHTML=msg;}function clearTable(theTable,index){var rowlength=theTable.rows.length;for(var i=index;i<rowlength;++i){theTable.deleteRow(index);
}}function convertDate(date){var year;var month;var day;var datestr=date+"";var datesplit=datestr.split(",");year=datesplit[0];month=datesplit[1];day=datesplit[2];if(month.length==1){month="0"+month;}if(day.length==1){day="0"+day;}return month+"/"+day+"/"+year;}function convertDateObj(date){var year;
var month;var day;var datestr=date+"";var datesplit=datestr.split(",");year=datesplit[0];month=parseInt(datesplit[1])-1;day=datesplit[2];var newdate=new Date(year,month,day);return newdate;}function formatCurrency(num){num=num.toString().replace(/\$|\,/g,"");if(isNaN(num)){num="0";}sign=(num==(num=Math.abs(num)));
num=Math.floor(num*100+0.50000000001);cents=num%100;num=Math.floor(num/100).toString();if(cents<10){cents="0"+cents;}for(var i=0;i<Math.floor((num.length-(1+i))/3);i++){num=num.substring(0,num.length-(4*i+3))+","+num.substring(num.length-(4*i+3));}return(((sign)?"":"-")+"$"+num+"."+cents);}function validateCurrency(num){var val=num.replace(/\$|\,/g,"");
if(isNaN(parseFloat(val))){return false;}return true;}function isFloat(num){if(isNaN(parseFloat(num))){return false;}return true;}function stripCurrency(num){num=num.replace(/\$|\,/g,"");return num;}function getFloatCurrency(num){var val=num.replace(/\$|\,/g,"");if(isNaN(parseFloat(val))){return 0;}else{return parseFloat(val);
}}function getRowCell(row,cellcount){var childnode;var foundcount=0;for(var i=0;i<row.childNodes.length;++i){childnode=row.childNodes[i];if(childnode!=null){if(childnode.nodeName=="TD"){++foundcount;if(foundcount==cellcount){return childnode;}}}}return null;}function getTableFromCell(cell){var childnode;
var foundcount=0;for(var i=0;i<cell.childNodes.length;++i){childnode=cell.childNodes[i];if(childnode!=null){if(childnode.nodeName=="TABLE"){return childnode;}}}return null;}function getElementByIdFromNode(mynode,id){var childnode;var foundcount=0;for(var i=0;i<mynode.childNodes.length;++i){childnode=mynode.childNodes[i];
if(childnode!=null){if(childnode.id==id){return childnode;}}}return null;}function getRowCellCount(row){var childnode;var cellcount=0;for(var i=0;i<row.childNodes.length;++i){childnode=row.childNodes[i];if(childnode!=null){if(childnode.nodeName=="TD"){++cellcount;}}}return cellcount;}function deleteRowById(theTable,id){var rowlength=theTable.rows.length;
var row;for(var i=0;i<rowlength;++i){row=theTable.rows[i];if(row.id==id){theTable.deleteRow(i);break;}}}function getRowIndexById(theTable,id){var rowlength=theTable.rows.length;var row;for(var i=0;i<rowlength;++i){row=theTable.rows[i];if(row.id==id){return i;}}return -1;}function inArray(myArray,value){for(var i=0;
i<myArray.length;++i){if(myArray[i]==value){return true;}}return false;}function indexOf(myArray,value){for(var i=0;i<myArray.length;++i){if(myArray[i]==value){return i;}}return -1;}function removeArrayIndex(array,index){array.splice(index,1);}function stringLimit(theString,length){if(theString.length>length){theString=theString.substring(0,length-3);
theString+="...";}return theString;}function getObject(objectName){if(navigator.appName.indexOf("Microsoft")!=-1){return window[objectName];}else{return document.embeds[objectName];}}function updateObject(objName,str){var FCObject=getObject(objName);FCObject.SetVariable("_root.isNewData","1");FCObject.SetVariable("_root.newData",str);
FCObject.TGotoLabel("/","JavaScriptHandler");}function removeComma(str){return str.replace(/,/g,"");}function convertBoolToYesNo(str){return str=="true"?"Yes":"No";}function getCategoryImage(cat){if(cat=="1"){return"band.gif";}if(cat=="7"){return"discjockey.gif";}if(cat=="8"){return"florist.gif";}if(cat=="4"){return"ceremonymusic.gif";
}if(cat=="5"){return"ceremonyvenue.gif";}if(cat=="11"){return"venue.gif";}if(cat=="6"){return"rehearsaldinner.gif";}if(cat=="3"){return"catering.gif";}if(cat=="9"){return"officiant.gif";}if(cat=="10"){return"photography.gif";}if(cat=="14"){return"videography.gif";}if(cat=="15"){return"weddingplanner.gif";
}if(cat=="12"){return"rentals.gif";}if(cat=="13"){return"transportation.gif";}if(cat=="2"){return"weddingcake.gif";}if(cat=="16"){return"beauty.gif";}if(cat=="18"){return"invitations.gif";}if(cat=="17"){return"dress.gif";}if(cat=="19"){return"jewelry.gif";}if(cat=="20"){return"other.gif";}return"other.gif";
}var dtCh="/";var minYear=1900;var maxYear=2900;function isInteger(s){var i;for(i=0;i<s.length;i++){var c=s.charAt(i);if(((c<"0")||(c>"9"))){return false;}}return true;}function stripCharsInBag(s,bag){var i;var returnString="";for(i=0;i<s.length;i++){var c=s.charAt(i);if(bag.indexOf(c)==-1){returnString+=c;
}}return returnString;}function daysInFebruary(year){return(((year%4==0)&&((!(year%100==0))||(year%400==0)))?29:28);}function DaysArray(n){for(var i=1;i<=n;i++){this[i]=31;if(i==4||i==6||i==9||i==11){this[i]=30;}if(i==2){this[i]=29;}}return this;}function getWindowHeight(){var myHeight=0;if(typeof(window.innerWidth)=="number"){myHeight=window.innerHeight;
}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){myHeight=document.documentElement.clientHeight;}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){myHeight=document.body.clientHeight;}}}return myHeight;}function fadeTab(newTab,oldTab){if(newTab.anim&&newTab.anim.isAnimated()){newTab.anim.stop(true);
}newTab.set("contentVisible",true);YAHOO.util.Dom.setStyle(newTab.get("contentEl"),"opacity",0);newTab.anim=newTab.anim||new YAHOO.util.Anim(newTab.get("contentEl"));newTab.anim.attributes.opacity={to:1};oldTab.set("contentVisible",false);newTab.anim.animate();}function isDate(dtStr){var daysInMonth=DaysArray(12);
var pos1=dtStr.indexOf(dtCh);var pos2=dtStr.indexOf(dtCh,pos1+1);var strMonth=dtStr.substring(0,pos1);var strDay=dtStr.substring(pos1+1,pos2);var strYear=dtStr.substring(pos2+1);strYr=strYear;if(strDay.length!=2||strMonth.length!=2||strYear.length!=4){return"The date format should be : mm/dd/yyyy";}if(strDay.charAt(0)=="0"&&strDay.length>1){strDay=strDay.substring(1);
}if(strMonth.charAt(0)=="0"&&strMonth.length>1){strMonth=strMonth.substring(1);}for(var i=1;i<=3;i++){if(strYr.charAt(0)=="0"&&strYr.length>1){strYr=strYr.substring(1);}}month=parseInt(strMonth);day=parseInt(strDay);year=parseInt(strYr);if(pos1==-1||pos2==-1){return"The date format should be : mm/dd/yyyy";
}if(strMonth.length<1||month<1||month>12){return"Please enter a valid month";}if(strDay.length<1||day<1||day>31||(month==2&&day>daysInFebruary(year))||day>daysInMonth[month]){return"Please enter a valid day";}if(strYear.length!=4||year==0||year<minYear||year>maxYear){return"Please enter a valid 4 digit year between "+minYear+" and "+maxYear;
}if(dtStr.indexOf(dtCh,pos2+1)!=-1||isInteger(stripCharsInBag(dtStr,dtCh))==false){return"Please enter a valid date";}return"true";}function DWRerr(msg){if(msg.length>0){window.location=msg;}else{alert("There was an error processing your data, please contact wedding wire support at support@weddingwire.com.");
}}function getboolean(str){if(str=="false"){return false;}else{return true;}}function getElementsByName_fix(tag,name){var elem=document.getElementsByTagName(tag);var arr=new Array();var iarr=0;for(var i=0;i<elem.length;i++){att=elem[i].getAttribute("name");if(att==name){arr[iarr]=elem[i];iarr++;}}return arr;
}function makeRequest(url){var httpRequest;if(window.XMLHttpRequest){httpRequest=new XMLHttpRequest();if(httpRequest.overrideMimeType){httpRequest.overrideMimeType("text/xml");}}else{if(window.ActiveXObject){try{httpRequest=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{httpRequest=new ActiveXObject("Microsoft.XMLHTTP");
}catch(e){}}}}if(!httpRequest){alert("Giving up :( Cannot create an XMLHTTP instance");return false;}httpRequest.onreadystatechange=function(){alertContents(httpRequest);};httpRequest.open("GET",url,true);httpRequest.send("");}function changeImage(imgName,imgSrc){document[imgName].src=imgSrc;}function fixpng(){var arVersion=navigator.appVersion.split("MSIE");
var version=parseFloat(arVersion[1]);if((version>=5.5)&&(document.body.filters)){for(var i=0;i<document.images.length;i++){var img=document.images[i];var imgName=img.src.toUpperCase();if(imgName.substring(imgName.length-3,imgName.length)=="PNG"){var imgID=(img.id)?"id='"+img.id+"' ":"";var imgClass=(img.className)?"class='"+img.className+"' ":"";
var imgTitle=(img.title)?"title='"+img.title+"' ":"title='"+img.alt+"' ";var imgStyle="display:inline-block;"+img.style.cssText;if(img.align=="left"){imgStyle="float:left;"+imgStyle;}if(img.align=="right"){imgStyle="float:right;"+imgStyle;}if(img.parentElement.href){imgStyle="cursor:hand;"+imgStyle;}var strNewHTML="<span "+imgID+imgClass+imgTitle+' style="'+"width:"+img.width+"px; height:"+img.height+"px;"+imgStyle+";"+"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"+"(src='"+img.src+"', sizingMethod='scale');\"></span>";
img.outerHTML=strNewHTML;i=i-1;}}}}function checkAll(name,check){var chks=document.getElementsByName(name);for(var i=0;i<chks.length;++i){chks[i].checked=check.checked;}}function createCookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();
}else{var expires="";}document.cookie=name+"="+value+expires+"; path=/";}function readCookie(name){var nameEQ=name+"=";var ca=document.cookie.split(";");for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==" "){c=c.substring(1,c.length);}if(c.indexOf(nameEQ)==0){return c.substring(nameEQ.length,c.length);
}}return null;}function eraseCookie(name){createCookie(name,"",-1);}