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,"wireWin"+(new Date()).getTime());
}function openWindow(url,winName){window.open(url,winName+(new Date()).getTime());}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="<span class='error'>"+msg+"</span>";}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+"</span>";}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=="5"){return"favor.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){if(msg.charAt(0)=="/"){window.location=msg;}else{window.location.replace(unescape(window.location.pathname));}}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);}function addClass(element,value){if(!element.className){element.className=value;}else{var newClassName=element.className;newClassName+=" ";newClassName+=value;element.className=newClassName;}}function goTo(dest){document.location.href=dest;
}function setDefault(el,txt){if(el.value.length==0||el.value==txt){el.style.color="gray";el.value=txt;}else{el.style.color="";}}function clearDefault(el,txt){if(el.value==txt){el.value="";}el.style.color="";}function showItem(item){var el=document.getElementById(item);el.style.display="block";}function hideItem(item){var el=document.getElementById(item);
el.style.display="none";}function toggleDiv(item){var el=document.getElementById(item);if((el.style.display=="none")||(el.style.display=="")){el.style.display="block";}else{el.style.display="none";}}function myobject(page){this.value=page;}function setPage(page,table,PAGE_SIZE){if(table!=null){var start=(page-1)*PAGE_SIZE;
var end=(page*PAGE_SIZE)-1;var rowlength=table.rows.length;var row;for(var i=1;i<rowlength;++i){row=table.rows[i];if(i>=start&&i<=end){row.style.display="";}else{row.style.display="none";}}}}function pageforward(page,table,div,PAGE_SIZE){var pagevalue=page.value;++pagevalue;var start=(pagevalue-1)*PAGE_SIZE;
if(start<table.rows.length){page.value=pagevalue;setPage(pagevalue,table,PAGE_SIZE);setPageMsg(page,table,div,PAGE_SIZE);}self.location.hash="topPage";}function pageback(page,table,div,PAGE_SIZE){var pagevalue=page.value;if(pagevalue>1){page.value=--pagevalue;setPage(pagevalue,table,PAGE_SIZE);setPageMsg(page,table,div,PAGE_SIZE);
}self.location.hash="topPage";}function setPageMsg(page,table,div,PAGE_SIZE){if(table!=null){var pagevalue=page.value;var mydiv=document.getElementById(div);var maxpages=0;maxpages=Math.ceil(table.rows.length/PAGE_SIZE);mydiv.innerHTML="Page "+pagevalue+" of "+maxpages;}}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);}function clearMenus(event,element){var submenuplanner=document.getElementById("submenu-planner");var submenumore=document.getElementById("submenu-more");if(YAHOO.util.Event.getTarget(event).id!="toggle-menuplanner"&&YAHOO.util.Event.getTarget(event).id!="toggle-menumore"&&YAHOO.util.Event.getTarget(event).id!="toggle-planner"&&YAHOO.util.Event.getTarget(event).id!="toggle-more"){submenuplanner.style.display="none";
submenumore.style.display="none";}}function initSecondTabs(){YAHOO.util.Event.addListener(document.body,"click",clearMenus);}function togglePlannerSubMenu(e){var submenuplanner=document.getElementById("submenu-planner");var togglemenuplanner=document.getElementById("toggle-menuplanner");var submenumore=document.getElementById("submenu-more");
if(submenuplanner.style.display=="none"){submenuplanner.style.top=(YAHOO.util.Dom.getRegion(togglemenuplanner).bottom)+"px";submenuplanner.style.left=(YAHOO.util.Dom.getRegion(togglemenuplanner).left)+"px";submenuplanner.style.display="block";submenumore.style.display="none";}else{submenuplanner.style.display="none";
}}function toggleMoreSubMenu(e){var submenuplanner=document.getElementById("submenu-planner");var submenumore=document.getElementById("submenu-more");var togglemenumore=document.getElementById("toggle-menumore");if(submenumore.style.display=="none"){submenumore.style.top=(YAHOO.util.Dom.getRegion(togglemenumore).bottom)+"px";
submenumore.style.left=(YAHOO.util.Dom.getRegion(togglemenumore).left-3)+"px";submenumore.style.display="block";submenuplanner.style.display="none";}else{submenumore.style.display="none";}}function selectValToggle(elem,val,targetDiv){if(elem.value==val){toggleDiv(targetDiv);}else{hideItem(targetDiv);
}}function runAddToWatchList(contentId){AjaxUserContent.createWatchlistItem(contentId,showConfirmationDialogAlert);}function runUserContentRating(contentId,val){var dataFromBrowser=contentId;var callbackProxy=function(dataFromServer){callbackFunc(dataFromServer,dataFromBrowser,"content_rating_");};var callMetaData={callback:callbackProxy};
AjaxUserContent.createUserContentRating(contentId,val,callMetaData);}function runUserContentCommentRating(commentId,val){var dataFromBrowser=commentId;var callbackProxy=function(dataFromServer){callbackFunc(dataFromServer,dataFromBrowser,"comment_rating_");};var callMetaData={callback:callbackProxy};
AjaxUserContent.createUserContentCommentRating(commentId,val,callMetaData);}function callbackFunc(serverResponse,commentId,dataType){if(serverResponse>0){var images="<span style='padding-right:2px;'><img src='"+staticPath+"/images/community/thumbsup-off.gif' /></span>";document.getElementById(dataType+commentId).innerHTML=images;
}else{if(serverResponse==-2){showLoginPanel();}else{if(serverResponse==-1){alert("You have already submitted a Rave for this item");}else{alert("An error occured while submitting your Rave.  Please try again later.");}}}}function TrackerDisplayNumber(element,number,targetId){element.innerHTML=number;
var stuff="";if(typeof userEmail=="undefined"||!userEmail){userEmail=null;}if(typeof channelId=="undefined"||!channelId){channelId=1;}if(typeof weddingId=="undefined"||!weddingId){weddingId=null;}if(typeof vendorId=="undefined"||!vendorId){vendorId=null;}if(typeof isAdmin=="undefined"||!isAdmin){isAdmin=false;
}if(userEmail!=null){stuff=stuff+"&user_email="+userEmail;if(weddingId!=null){stuff=stuff+"&wedding_id="+weddingId;}else{if(vendorId!=null){stuff=stuff+"&vendor_id="+vendorId;}}}if(!isAdmin){var urlf="url('/api/Tracker.gif?channel_id="+channelId+"&type=vendor_phone&target_id="+targetId+stuff+"')";element.style.backgroundImage=urlf;
}element.style.backgroundRepeat="no-repeat";element.setAttribute("onclick","");}function prettyAddToMyVendors(vid){prettySetMyVendorCallBack();saveToVendor_vid=vid;addToMyVendors(vid);}function prettyInviteVendor(vid){prettySetMyVendorCallBack();saveToVendor_vid=vid;inviteToConnect(vid);}function prettySetMyVendorCallBack(){setMyVendorCallback(function(data){if(data=="Invitation Sent"||data=="Saved to My Vendors"||data=="This Vendor is already saved."){var msg="<span class='lightGreyText'>Saved</span>";
if(data=="Invitation Sent"){msg="<span class='lightGreyText'>Connected</span>";}if(saveToVendor_vid.length>0){elem=document.getElementById("img_"+saveToVendor_vid);if(elem!=null){elem.innerHTML=msg;}elem=document.getElementById("img_"+saveToVendor_vid+"spot");if(elem!=null){elem.innerHTML=msg;}}}else{alert(data);
}});}function setWWSortCookie(type,sort){var value=readCookie("WWSORT");if(value!=null){var data=value.split("|");data.pop();var found=false;for(var i=0;i<data.length;++i){var data2=data[i].split("=");if(data2[0]==type){data[i]=type+"="+sort;found=true;}}if(!found){data[data.length]=type+"="+sort;}value="";
for(var i=0;i<data.length;++i){value+=data[i]+"|";}}else{value=type+"="+sort+"|";}createCookie("WWSORT",value,365);}function getWWSortCookie(type){var value=readCookie("WWSORT");if(value!=null){var data=value.split("|");for(var i=0;i<data.length;++i){var data2=data[i].split("=");if(data2[0]==type){return data2[1];
}}}else{return null;}}function resizeNeeded(element,defaultRows){var t=element;var lines=t.value.split("\n");var newRows=lines.length+1;var oldRows=t.rows;for(var i=0;i<lines.length;i++){var line=lines[i];if(line.length>=t.cols){newRows+=Math.floor(line.length/t.cols);}}if(newRows>t.rows){t.rows=newRows;
}if(newRows<t.rows){t.rows=Math.max(defaultRows,newRows);}}function WWcheckIframe(){try{if(top.location.href!=window.location.href){top.location.href=window.location.href;}}catch(err){top.location.href=window.location.href;}}function isAlphaNumeric(keyCode){if((keyCode>=65&&keyCode<=90)||(keyCode>=48&&keyCode<=57)){return true;
}else{return false;}}function convertErrorCodeToMsg(code){var msg="";if(code=="-999"){msg="Unknown error";}else{if(code=="-3"){msg="sorry, facebook login failed; please contact support";}else{if(code=="-4"){msg="Could not find user";}else{if(code=="-5"){msg="This email address has already been used to create an account.";
}else{if(code=="-6"){msg="Your email address has not yet been confirmed. We have just sent you an email with a confirmation link. Please check your email and click on the link provided.";}else{if(code=="-7"){msg="This account has been deactivated.";}else{if(code=="-8"){msg="Password must be at least 6 characters";
}else{if(code=="-9"){msg="Facebook account linking failed. please contact support";}else{if(code=="-3"){msg="sorry, facebook login failed; please contact support";}else{if(code=="-100"){msg="The email address is not correct.";}else{if(code=="-101"){msg="Please enter a valid wedding date.";}else{if(code=="-102"){msg="The password is not correct.";
}else{if(code=="-103"){msg="Password does not match the confirmation password.";}else{if(code=="-104"){msg="Password does not match the confirmation password.";}else{if(code=="-105"){msg="Please try entering the characters you see again.";}else{if(code=="-201"){msg="First Name is required";}else{if(code=="-202"){msg="Last Name is required";
}else{if(code=="-203"){msg="Email is required";}else{if(code=="-204"){msg="You must agree to the Terms and Conditions by selecting 'Yes'";}else{if(code=="-205"){msg="Please enter a wedding date.";}else{if(code=="-206"){msg="Please enter a username.";}else{if(code=="-207"){msg="Please enter a password.";
}else{if(code=="-300"){msg="Vendors are not allowed to log in for this action.";}else{msg="Unknown error.";}}}}}}}}}}}}}}}}}}}}}}}return msg;}var getOverlayManager=function(){var overlayManager=new YAHOO.widget.OverlayManager();getOverlayManager=function(){return overlayManager;};return getOverlayManager();
};