
var mo_reg=null;var mo_url;var mo_CityId='';function reg_dialog(className,callBack,title)
{this.top=225;this.parent.construct(this,className,callBack,title,null,'900px');}
function OpenLink(e)
{mo_url=e;if(!$('xatEB'))
{LoadReg(e);}
else
{if(e!=null)
{if(typeof e=='function')
{e();}
else if(typeof e=='object')
{e.click();}
else
{window.location.href=e;}}}}
function LoadGoogle(q,e)
{new Ajax.Request('/ajax/recs/googleresults.aspx?q='+q,{method:'get',onSuccess:function(transport){var response=transport.responseText||"";$(e).innerHTML=response;},onFailure:function(){alert('Something went wrong...')}});}
var m_CurrentDialog;function LoadGuidedSearch(e)
{$(e).show();m_CurrentDialog=new MDialog({title:null,innerScroll:false,content:$(e),width:886,height:732,background:['','transparent'],close:{link:false,overlay:false,esc:false},padding:25,margin:50});m_CurrentDialog.open();}
function LoadMakeARec()
{var back=new Element('div',{id:'makearecback',className:'MakeaRec_PopUp'});var button=new Element('div',{onClick:"javascript:m_CurrentDialog.close();",id:'makearecbut',className:'MakeaRec_PopUpCloseBtnBlack'});var done=new Element('div',{onClick:'javascript:m_CurrentDialog.close();',id:'makearecdone',className:'MakeaRec_Button'});back.insert(button);back.insert(new Element('div',{id:'makearecdiv',style:'position:relative;margin-left:24px;'}));back.insert(done);$(document.body).insert(back);loadMakeARecDiv('makearecdiv');m_CurrentDialog=new MDialog({title:null,innerScroll:false,content:$('makearecback'),width:886,height:660,background:['','transparent'],close:{link:false,overlay:false,esc:false},padding:25,margin:50});m_CurrentDialog.open();}
function LoadReg(e)
{new Ajax.Request('http://'+getSitePath()+'/ajax/loginregister.aspx?log='+e,{method:'get',onSuccess:function(transport){var response=transport.responseText||"no response text";m_CurrentDialog=new MDialog({title:null,content:response,innerScroll:false,width:705,height:450,opacity:.0,background:['','transparent'],close:{link:false,overlay:false,esc:true},padding:25,margin:50});m_CurrentDialog.open();},onComplete:function(){},onFailure:function(){alert('...')}});}
var ajaxSignUpReg=null;function SignUpReg(firstName,lastName,email,pword,cityId,countryid,cityName)
{var tEmail=email;var tPassword=pword;var cityNa=cityName.split(",")[0];var cntryId=countryid;mo_CityId=cityId;var parms='&n='+firstName+'&l='+lastName+'&e='+email+'&p='+pword+'&Cid='+cityId+'&countryId='+cntryId+'&cityName='+cityNa;var url='/_service/setLogin.ashx';var target='output-div';var m='';ajaxSignUpReg=new Ajax.Updater(target,url,{method:'post',parameters:parms,onSuccess:function(transport)
{var response=transport.responseText||"no response text";SendReg(tEmail,tPassword,'ft','');m=response;m_CurrentDialog.close();ajaxSignUpReg=null;},onFailure:function()
{var responce=transport.responseText||"no response text";m=responce;ajaxSignUpReg=null;}});}
function SendReg2(p)
{var url='/ajax/loginregister.aspx';var pars='parms='+p;var target='output-div';var myAjax=new Ajax.Updater(target,url,{method:'post',parameters:pars,onSuccess:function(transport)
{var response=transport.responseText||"no response text";if(response.indexOf('--in--')!=-1)
{m_CurrentDialog.close();e=mo_url;$('body').insert(response);if(e!=null&&e!='')
{if(typeof e=='function')
{e();}
else if(typeof e=='object')
{e.click();}
else
{window.location.href=e;}}
else
{if($F('xdirect')==885)
{window.location.href='/mypage/venue.aspx';}
else
{window.location.href='/mypage/user.aspx';}}}},onFailure:function(){alert('Something went wrong...')}});}
function SendReg(email,pword,ft,errorMsg)
{var em=email;var pw=pword;var ft=ft;var cityVal;var url='http://'+getSitePath()+'/ajax/loginregister.aspx';var pars='e='+em+'&p='+pw;var target='output-div';var myAjax=new Ajax.Updater(target,url,{method:'post',parameters:pars,onSuccess:function(transport){var response=transport.responseText||"no response text";if(response.indexOf('Invalid')!=-1)
{if($(errorMsg)!=null){$(errorMsg).innerHTML=response;Effect.Pulsate(errorMsg,{pulse:5,duration:3});}
return;}
if(response.indexOf('--in--')!=-1)
{if(m_CurrentDialog!=null){m_CurrentDialog.close();}
e=mo_url;if($('body')!=null){$('body').insert(response);}
if(e!=null&&e!=''){if(typeof e=='function'){e();LoadM('headerContainer','/_Modules/Common/ucMainHeader.ascx','',null,RegisterHeaderEvents);}
else if(typeof e=='object'){e.click();LoadM('headerContainer','/_Modules/Common/ucMainHeader.ascx','',null,RegisterHeaderEvents);}
else{window.location.href=e;}}
else{if(ft==""||ft==null){if(window.location.pathname==""||window.location.pathname=="/"||window.location.pathname.toLowerCase()=='/Register/PreRegistration/HostPreReg1.aspx'.toLowerCase()){cityVal=$('xcityid').value;if(cityVal!=0){window.location.href='/mypage/user.aspx?cityid='+cityVal;}
else{window.location.href='/mypage/user.aspx';}}
else{window.location.href=window.location.href;}}
else{window.location.href='/RecGame/Manage/Default.aspx?ut=1&cityid='+mo_CityId;}}}},onFailure:function(){alert('Something went wrong...')}});}
function SendReg3(email,pword,rememberword,ft,errorMsg){var em=email;var pw=pword;var rw=rememberword;var ft=ft;var cityVal;var url='http://'+getSitePath()+'/ajax/loginregister.aspx';var pars='e='+em+'&p='+pw+'&r='+rw;var target='output-div';var myAjax=new Ajax.Updater(target,url,{method:'post',parameters:pars,onSuccess:function(transport)
{var response=transport.responseText||"no response text";if(response.indexOf('Invalid')!=-1)
{if($(errorMsg)!=null){$(errorMsg).innerHTML=response;Effect.Pulsate(errorMsg,{pulse:5,duration:3});}
return;}
if(response.indexOf('--in--')!=-1)
{if(m_CurrentDialog!=null){m_CurrentDialog.close();}
e=mo_url;if($('body')!=null){$('body').insert(response);}
if(e!=null&&e!='')
{if(typeof e=='function'){e();LoadM('headerContainer','/_Modules/Common/ucMainHeader.ascx','',null,RegisterHeaderEvents);}
else if(typeof e=='object'){e.click();LoadM('headerContainer','/_Modules/Common/ucMainHeader.ascx','',null,RegisterHeaderEvents);}
else{window.location.href=e;}}
else
{if(ft==""||ft==null){if(window.location.pathname==""||window.location.pathname=="/"||window.location.pathname.toLowerCase()=='/Register/PreRegistration/HostPreReg1.aspx'.toLowerCase()){cityVal=$('xcityid').value;if(getQuerystring('page')!='')
{window.location.href=getQuerystring('page');}
else
{if(cityVal!=0)
{window.location.href='/mypage/user.aspx?cityid='+cityVal;}
else
{window.location.href='/mypage/user.aspx';}}}
else{window.location.reload();}}
else{window.location.href='/Register/GuidedRegistration/regFindFriends.aspx?ut=eu&cityid='+mo_CityId;}}}},onFailure:function(){alert('Something went wrong...')}});}
var lastValidZip="";var zip_time_ps;function LoadCity(e)
{if(e!=undefined)
{$('spnCity').innerHTML=e;lastValidZip=$F('txtRegZip');}}
function CreateReplyMSG(e,fm,ft,o,ct)
{if($(e).value=='')
{return;}
var url='/ajax/postcomment.aspx';var pars="&fmid="+fm+"&msg="+escape(xreplace($(e).value,'’',''));var target='output-div';var myAjax=new Ajax.Updater(target,url,{method:'post',parameters:pars,onSuccess:function(transport){var response=transport.responseText||"no response text";if(response.indexOf('--ok--')!=-1)
{$(e).value='';LoadM(o,'/_modules/common/messagecentertypes/ucreplycomments.ascx','&fmid='+fm+'&pid='+fm);$(ct).style.display='none';}},onFailure:function(){alert('Something went wrong...')}});}
function CreateMSG(ftid,ctrls)
{var url='/ajax/postcomment.aspx';var pars="&ftid="+ftid+"&q="+GetElementValues($(ctrls));var target='output-div';var myAjax=new Ajax.Updater(target,url,{method:'post',parameters:pars,onSuccess:function(transport){var response=transport.responseText||"no response text";var pid=getQueryVariable('id');if(pid=='undefined')
{pid="";}
LoadM('MessageCenterItems','/_modules/common/ucmessagecenteritems.ascx','&pid='+pid);},onFailure:function(){alert('Something went wrong...')}});}
function CreateMSG2(e,t,fa,p,o,ct,fid,ft)
{var textbox=t;var header='';if(textbox==null)
{textbox=$('txtCommentArea');header=$('txtHeader').value;}
else
{textbox=$(t);}
if(textbox.value=='')
{return;}
var faid='';if(fa!=null)
{faid='&faid='+fa;}
var url='/ajax/postcomment.aspx';if($('txtVidUrl').value!='')
{fid=$('txtVidUrl').value;ft="LINK";}
var pars="&ftid="+e+"&msg="+escape(xreplace(textbox.value,'’',''))+faid+'&hdr='+header+'&fid='+escape(fid)+'&ft='+ft;var target='output-div';var myAjax=new Ajax.Updater(target,url,{method:'post',parameters:pars,onSuccess:function(transport){var response=transport.responseText||"no response text";if(response.indexOf('--ok--')!=-1)
{if(p!=null)
{LoadM('MessageCenterItems','/_modules/common/ucmessagecenteritems.ascx','&pid='+p);}
else
{LoadM(o,'/_modules/common/messagecentertypes/ucreplycomments.ascx','&ftid='+e+'&pid='+fa);$(ct).style.display='none';}
$('txtHeader').value='';textbox.value='';currentFileID=null;currentFileType=null;$('vidadd').style.display='none';$('txtVidUrl').value='';$('divFileProgressContainer').innerHTML='';}},onFailure:function(){alert('Something went wrong...')}});}
function CreateFActionReplyMsg(faid,ctrls,rplydiv,t)
{var url='/ajax/postreply.aspx';var pars="&faid="+faid+"&q="+GetElementValues($(ctrls));var target='output-div';var myAjax=new Ajax.Updater(target,url,{method:'post',parameters:pars,onSuccess:function(transport){var response=transport.responseText||"no response text";if(t!=1)
{LoadM(rplydiv,'/_modules/common/messagecentertypes/ucreplycomments.ascx','&faid='+faid);$(ctrls).hide();}
else
{LoadM(rplydiv,'/_modules/common/messagecentertypes/ucreplycomments.ascx','&faid='+faid);}},onFailure:function(){alert('Something went wrong...')}});}
function CheckRegisrter(containerDiv){if(ajaxSignUpReg==null){var count=0;var cross='';cross=$(containerDiv).getElementsByClassName('Cross_Icon');for(var i=0;i<cross.length;i++)
{if(cross[i].style.display=="none"){count++;}}
var EmailDiv='';if($(containerDiv))
{EmailDiv=$(containerDiv).getElementsByClassName('SignUp_InputRowDiv')[3].getElementsByClassName('Cross_Icon')[0];}
var inputCount=0;var input='';input=$(containerDiv).getElementsByTagName('input');for(var j=0;j<input.length;j++)
{if(input[j].value==''||input[j].value==null){inputCount++;}}
if(count==5&&inputCount==0)
{SignUpReg($F('newFName'),$F('newLName'),$F('txtRegEmail'),$F('txtRegPassword'),$F('inputCityId').split(',')[0],$F('inputSgnRegCtryName'),$F('inputCityId').split(',')[1]);}
else if(EmailDiv.style.display=="")
{NotifyBox('InvalidInfo','Please enter a valid email address');return false;}
else
{NotifyBox('InvalidInfo','Please fill in the required information');}}}
function validateZipCode(elementValue){var zipCodePattern=/^\d{4}$/;return zipCodePattern.test(elementValue);}
function onlyNumbers(evt)
{var e=event||evt;var charCode=e.which||e.keyCode;if(charCode>31&&(charCode<48||charCode>57))
return false;return true;}
function LoadCountries1(e)
{var url="/_service/getCountries.ashx"
var pars="";var target='output-div';var myAjax=new Ajax.Updater(target,url,{method:'get',onSuccess:function(transport){var response=transport.responseText||"no response text";var data=response.evalJSON(true);if(data.length>0)
{for(var i=0;i<data.length;i++)
{if(data[i].cid=="223"){e.insert(new Element('option',{'selected':'selected','Value':data[i].cid}).update(data[i].name));LoadStates(223);}
else{e.insert(new Element('option',{'Value':data[i].cid}).update(data[i].name));}}}},onFailure:function(){}});}
function LoadStates1(CountryID)
{$('ctl00_ContentPlaceHolder1_ddlState').innerHTML='';var url="/_service/getStates.ashx"
var pars="&countryID="+CountryID;var target='output-div';var myAjax=new Ajax.Updater(target,url,{method:'get',parameters:pars,onSuccess:function(transport){var response=transport.responseText||"no response text";var data=response.evalJSON(true);if(data.length>0)
{for(var i=0;i<data.length;i++)
{$('ctl00_ContentPlaceHolder1_ddlState').insert(new Element('option',{'Value':data[i].StateCode}).update(data[i].State));}}},onFailure:function(){}});}
function isNumberKey(evt)
{var charCode=(evt.which)?evt.which:event.keyCode
if(charCode>31&&(charCode<48||charCode>57))
{return false;}
return true;}
function CCVerify(e)
{if($('ctl00_ContentPlaceHolder1_txtFirstName').value==''||$('ctl00_ContentPlaceHolder1_txtLastName').value==''||$('ctl00_ContentPlaceHolder1_ddlCardType').value==''||$('ctl00_ContentPlaceHolder1_ddlExpMnth').value==''||$('ctl00_ContentPlaceHolder1_ddlExpYear').value==''||$('ctl00_ContentPlaceHolder1_txtCCNumber').value==''||$('ctl00_ContentPlaceHolder1_txtCVN').value==''||$('ctl00_ContentPlaceHolder1_txtAddress').value==''||$('ctl00_ContentPlaceHolder1_txtCity').value==''||$('ctl00_ContentPlaceHolder1_ddlState').value==''||$('ctl00_ContentPlaceHolder1_txtZipCode').value=='')
{NotifyBox('InvalidInfo','Please fill in the required information');}
else
{if(CreditcardCheck())
{VerifyBillingInformation();$(e).submit();}
else
{NotifyBox('InvalidInfo','Credit Card Info did not match');}}}
function CreditcardCheck(){var isValid=false;var CCRegExp;var CreditCardType=$('ctl00_ContentPlaceHolder1_ddlCardType').options[$('ctl00_ContentPlaceHolder1_ddlCardType').selectedIndex].text.toLowerCase();var ExpMonth=$('ctl00_ContentPlaceHolder1_ddlExpMnth').options[$('ctl00_ContentPlaceHolder1_ddlExpMnth').selectedIndex].value;var CreditCardNumber=$('ctl00_ContentPlaceHolder1_txtCCNumber').value;var ExpYear=$('ctl00_ContentPlaceHolder1_ddlExpYear').options[$('ctl00_ContentPlaceHolder1_ddlExpYear').selectedIndex].value;var CurrDate=new Date();if(CreditCardNumber!=undefined&&CreditCardNumber!=null&&CreditCardNumber!=''&&CreditCardType!=undefined&&CreditCardType!=null&&CreditCardType!='')
{if(CreditCardType=="Visa".toLocaleLowerCase())
{CCRegExp=/^4\d{3}-?\d{4}-?\d{4}-?\d{4}$/;}
else if(CreditCardType=="Master Card".toLocaleLowerCase())
{CCRegExp=/^5[1-5]\d{2}-?\d{4}-?\d{4}-?\d{4}$/;}
else if(CreditCardType=="American Express".toLocaleLowerCase())
{CCRegExp=/^3[4,7]\d{13}$/;}
else if(CreditCardType=="Discover".toLocaleLowerCase())
{CCRegExp=/^6011-?\d{4}-?\d{4}-?\d{4}$/;}
if(CCRegExp.match(CreditCardNumber))
{var PresentMonth=new Date().getMonth();var PresentYear=new Date().getFullYear();if((ExpYear>PresentYear)||((PresentYear==ExpYear)&&(ExpMonth>=PresentMonth))){isValid=true;}}}
return isValid;}
function OpenPopup(Url)
{var width=800;var height=600;var left=(screen.width-width)/2;var top=(screen.height-height)/2;var params='width='+width+', height='+height;params+=', top='+top+', left='+left;params+=', directories=no';params+=', location=no';params+=', menubar=no';params+=', resizable=no';params+=', scrollbars=yes';params+=', status=no';params+=', toolbar=no';newwin=window.open(Url,'popup',params);if(window.focus)
{newwin.focus()}
return false;}
function DisplayPriceRangePopup(isMouseOver,elementId,price,insertIntoId,event){if(isMouseOver){var priceContainer=new Element('div',{'id':'priceTagContainerDiv','style':'position:absolute;display:none;z-index:65005;'});var priceTagDiv=new Element('div',{'id':'priceTagDispDiv','class':'Price_Rng_opt','style':'z-index:65005'});var priceTagTextSpan=new Element('span',{'id':'priceTagDispTxtSpan'});switch(price){case"$":priceTagTextSpan.insert("Cheap/Free");break;case"$$":priceTagTextSpan.insert("Inexpensive");break;case"$$$":priceTagTextSpan.insert("Moderate");break;case"$$$$":priceTagTextSpan.insert("Pricey");break;}
priceTagDiv.appendChild(priceTagTextSpan);priceContainer.appendChild(priceTagDiv);var hoverElement=$(elementId);var ElementPosition=FindObjectPosition(hoverElement);var Xpos='';var Ypos='';if(event.clientX!=undefined)
{Xpos=event.clientX;Ypos=event.clientY;}
else
{Xpos=ElementPosition[0]+5-document.documentElement.scrollLeft;Ypos=ElementPosition[1]+8-document.documentElement.scrollTop;}
var coordX=Xpos+document.documentElement.scrollLeft;var coordY=Ypos+document.documentElement.scrollTop;if($(insertIntoId)==null){document.body.appendChild(priceContainer);if(browser!="IE")
{priceContainer.style.left=(coordX)+"px";priceContainer.style.top=(coordY+15)+"px";}
else
{priceContainer.style.top=(coordY+15)+"px";priceContainer.style.left=(coordX)+"px";}}
else{$(insertIntoId).insert(priceContainer);priceContainer.style.top="20px";priceContainer.style.left="18px";}
priceContainer.style.display='';}
else{if($('priceTagContainerDiv')!=null){$('priceTagContainerDiv').remove();}}}
function DisplayPriceRangePopup_new_temp(isMouseOver,elementId,price,insertIntoId,event){if(isMouseOver){var priceContainer=new Element('div',{'id':'priceTagContainerDiv','style':'position:absolute;display:none;z-index:65005;'});var priceTagDiv=new Element('div',{'id':'priceTagDispDiv','class':'Price_Rng_opt','style':'z-index:65005'});var priceTagTextSpan=new Element('span',{'id':'priceTagDispTxtSpan'});switch(price){case"$":priceTagTextSpan.insert("Cheap/Free");break;case"$$":priceTagTextSpan.insert("Inexpensive");break;case"$$$":priceTagTextSpan.insert("Moderate");break;case"$$$$":priceTagTextSpan.insert("Pricey");break;}
priceTagDiv.appendChild(priceTagTextSpan);priceContainer.appendChild(priceTagDiv);document.body.appendChild(priceContainer);var divPosition=FindObjectPosition(elementId);$(priceContainer.id).style.left=(divPosition[0]+30)+"px";$(priceContainer.id).style.top=(divPosition[1]-6)+"px";priceContainer.style.display='';}
else{if($('priceTagContainerDiv')!=null){$('priceTagContainerDiv').remove();}}}
function DisplayPriceRangePopup_new_temp1(isMouseOver,elementId,price,insertIntoId,event){if(isMouseOver){var priceContainer=new Element('div',{'id':'priceTagContainerDiv','style':'position:absolute;display:none;z-index:65005;'});var priceTagDiv=new Element('div',{'id':'priceTagDispDiv','class':'Price_Rng_opt','style':'z-index:65005'});var priceTagTextSpan=new Element('span',{'id':'priceTagDispTxtSpan'});switch(price){case"$":priceTagTextSpan.insert("Cheap/Free");break;case"$$":priceTagTextSpan.insert("Inexpensive");break;case"$$$":priceTagTextSpan.insert("Moderate");break;case"$$$$":priceTagTextSpan.insert("Pricey");break;}
priceTagDiv.appendChild(priceTagTextSpan);priceContainer.appendChild(priceTagDiv);document.body.appendChild(priceContainer);var divPosition=FindObjectPosition(elementId);$(priceContainer.id).style.left=(divPosition[0])+"px";$(priceContainer.id).style.top=(divPosition[1]+22)+"px";priceContainer.style.display='';}
else{if($('priceTagContainerDiv')!=null){$('priceTagContainerDiv').remove();}}}
function AddRecSpotPopUp()
{var addSpotContainer=new Element('div',{'class':'New_RecSpot_Div','id':'mainspot'});var divClosePopUp=new Element('div',{'class':'new_close_button','style':'position:absolute; top:10px; right:10px; z-index:20;'});var divaddSpotHeaderMain=new Element('div',{'class':'New_RecSpot_Header'});var divaddSpotHeaderSpn=new Element('div',{'class':'New_RecSpot_HeaderSpn'});var divaddSpotSpn=new Element('div',{'class':'New_RecSpot_AddASpot'});var divchooseSpotSpn=new Element('div',{'class':'New_RecSpot_ChooseASpot','style':'display:none'})
var spnAddSpot=new Element('span');spnAddSpot.innerHTML='(A business or location of interest)';divaddSpotHeaderSpn.appendChild(divaddSpotSpn);divaddSpotHeaderSpn.appendChild(divchooseSpotSpn);divaddSpotHeaderSpn.appendChild(spnAddSpot);var divaddSpotInput=new Element('div',{'class':'New_RecSpot_InputDiv'});var divSpotName=new Element('span');divSpotName.innerHTML='Spot Name';var divSpotInputLocation=new Element('div',{'class':'New_RecSpot_Input'});var inputLocation=new Element('input');var divinputLocationButton=new Element('div',{'class':'New_RecSpot_SearchBtn'});divSpotInputLocation.appendChild(inputLocation);divSpotInputLocation.appendChild(divinputLocationButton);divaddSpotInput.appendChild(divSpotName);divaddSpotInput.appendChild(divSpotInputLocation);var divaddSpotCityInput=new Element('div',{'class':'New_RecSpot_InputDiv','style':'margin-left:22px'});var spnCity=new Element('span');spnCity.innerHTML='City';var divSpotCityLocation=new Element('div',{'class':'New_RecSpot_Input'});var inputCity=new Element('input');divSpotCityLocation.appendChild(inputCity);divaddSpotCityInput.appendChild(spnCity);divaddSpotCityInput.appendChild(divSpotCityLocation);divaddSpotHeaderMain.appendChild(divaddSpotHeaderSpn);divaddSpotHeaderMain.appendChild(divaddSpotInput);divaddSpotHeaderMain.appendChild(divaddSpotCityInput);var divSearchSpn=new Element('div',{'class':'New_RecSpot_Content'});var divSearchMsgSpn=new Element('span',{'class':'New_RecSpot_SearchMsg'});divSearchMsgSpn.innerHTML='Search for a spot above';divSearchSpn.appendChild(divSearchMsgSpn);var divAddSpotFooter=new Element('div',{'class':'New_RecSpot_Footer'});addSpotContainer.appendChild(divClosePopUp);addSpotContainer.appendChild(divaddSpotHeaderMain);addSpotContainer.appendChild(divSearchSpn);addSpotContainer.appendChild(divAddSpotFooter);}
function addSpotDetails()
{var divaddSpotDetails=new Element('div',{'class':'New_RecSpot_Div'});var divClosePopUp=new Element('div',{'class':'new_close_button','style':'position:absolute; top:10px; right:10px; z-index:20;'});var divSpotDetailsHeaderMain=new Element('div',{'class':'New_RecSpot_SmlHeader'});var divSpotDetailsHeader=new Element('div',{'class':'New_RecSpot_AddDetailsSpot'});var divSpotWefoundHeader=new Element('div',{'class':'New_RecSpot_WeFoundSpot','style':'display:none'});divSpotDetailsHeaderMain.appendChild(divSpotDetailsHeader);divSpotDetailsHeaderMain.appendChild(divSpotWefoundHeader);var divSpotContentMain=new Element('div',{'class':'New_RecSpot_Content'});var divVenueDetailsMain=new Element('div',{'class':'New_RecSpot_VenueDetailDiv'});var divVenueImg=new Element('div',{'class':'New_RecSpot_VenueImg'});VenueImg=new Element('img');divVenueImg.appendChild(VenueImg);var divVenueDetails=new Element('div',{'class':'New_RecSpot_DetailDiv'});var divVenueContent=new Element('div',{'class':'New_RecSpot_SearchCont','style':'width:auto;margin-left:0px'});var spnVenueName=new Element('span');spnVenueName.innerHTML='parlor';var spnVenueIn=new Element('span',{'style':'font-size:14px;color:#898989;margin-top:3px'});spnVenueIn.innerHTML='in';var spnVenueState=new Element('span');spnVenueState.innerHTML='San Francisco, CA';divVenueContent.appendChild(spnVenueName);divVenueContent.appendChild(spnVenueIn);divVenueContent.appendChild(spnVenueState);var divVenueAddress1=new Element('span',{'class':'New_RecSpot_AddressSpn1'});divVenueAddress1.innerHTML='1519 Wilshire Boulevard';var divVenueAddress2=new Element('span',{'class':'New_RecSpot_AddressSpn1'});divVenueAddress1.innerHTML='(310) 395-4139';var divVenueAddress3=new Element('span',{'class':'New_RecSpot_AddressSpn1'});divVenueAddress1.innerHTML='www.theparlorsm.com';var linkEdit=new Element('a');linkEdit.innerHTML='edit';divVenueDetails.appendChild(divVenueContent);divVenueDetails.appendChild(divVenueAddress1);divVenueDetails.appendChild(divVenueAddress2);divVenueDetails.appendChild(divVenueAddress3);divVenueDetails.appendChild(linkEdit);divVenueDetailsMain.appendChild(divVenueImg);divVenueDetailsMain.appendChild(divVenueDetails);var divCategoryDetails=new Element('div',{'style':'height:234px;width:100%'});var divCategorySpn=new Element('div',{'class':'New_RecSpot_CatSpan'});var spnCategory=new Element('span',{'class':'New_RecSpot_CatSpan1'});spnCategory.innerHTML='Category';var spnOptionalDetails=new Element('span',{'class':'New_RecSpot_CatSpan2'});spnOptionalDetails.innerHTML='Help us classify this spot so others can find it...';divCategorySpn.appendChild(spnCategory);divCategorySpn.appendChild(spnOptionalDetails);var ddllistCategories=new Element('select',{'class':'New_RecSpot_DropCat'});divCategoryDetails.appendChild(divCategorySpn);divCategoryDetails.appendChild(ddllistCategories);divSpotContentMain.appendChild(divVenueDetailsMain);divSpotContentMain.appendChild(divCategoryDetails);var divAddSpotFooter=new Element('div',{'class':'New_RecSpot_Footer'});var divPreviousBtnMain=new Element('div',{'class':'Generic_Large_Gray','style':'float:left;margin:17px 0px 0px 19px'});var divPreviousBtnLeft=new Element('div',{'class':'Generic_Large_Gray_Left'});var divPreviousBtnMiddle=new Element('div',{'class':'Generic_Large_Gray_Middle'});var spnPreviousBtnMiddle=new Element('span');spnPreviousBtnMiddle.innerHTML='Previous';divPreviousBtnMiddle.appendChild(spnPreviousBtnMiddle);var divPreviousBtnRight=new Element('div',{'class':'Generic_Large_Gray_Right'});divPreviousBtnMain.appendChild(divPreviousBtnLeft);divPreviousBtnMain.appendChild(divPreviousBtnMiddle);divPreviousBtnMain.appendChild(divPreviousBtnRight);var divFinishBtnMain=new Element('div',{'class':'Generic_Large_DeadGray','style':'float:right;margin:17px 19px 0px 0px'});var divFinishBtnLeft=new Element('div',{'class':'Generic_Large_DeadGray_Left'});var divFinishBtnMiddle=new Element('div',{'class':'Generic_Large_DeadGray_Middle','style':'padding:0px 20px'});var spnFinishBtnMiddle=new Element('span',{'style':'font-size:14px;font-weight:bold'});spnFinishBtnMiddle.innerHTML='Finish';divFinishBtnMiddle.appendChild(spnFinishBtnMiddle);var divFinishBtnRight=new Element('div',{'class':'Generic_Large_DeadGray_Right'});divFinishBtnMain.appendChild(divFinishBtnLeft);divFinishBtnMain.appendChild(divFinishBtnMiddle);divFinishBtnMain.appendChild(divFinishBtnRight);divAddSpotFooter.appendChild(divPreviousBtnMain);divAddSpotFooter.appendChild(divFinishBtnMain);divaddSpotDetails.appendChild(divClosePopUp);divaddSpotDetails.appendChild(divSpotDetailsHeaderMain);divaddSpotDetails.appendChild(divSpotContentMain);divaddSpotDetails.appendChild(divAddSpotFooter);}
function AddSpotDetailsPopUp()
{var SpotDetailsContainer=new Element('div',{'class':'New_RecSpot_Div'});var divClosePopUp=new Element('div',{'class':'new_close_button','style':'position:absolute; top:10px; right:10px; z-index:20;'});var divSpotDetailsHeaderMain=new Element('div',{'class':'New_RecSpot_SmlHeader'});var divSpotAddDetailsHeader=new Element('div',{'class':'New_RecSpot_AddDetailsSpot'});var divSpotDetailsWeFoundSpot=new Element('div',{'class':'New_RecSpot_WeFoundSpot','style':'display:none'});divSpotDetailsHeaderMain.appendChild(divSpotAddDetailsHeader);divSpotDetailsHeaderMain.appendChild(divSpotDetailsWeFoundSpot);var divSpotDetailsMain=new Element('div',{'class':'New_RecSpot_Content'});var divSpotDetailsSpnMain=new Element('class',{'class':'New_RecSpot_SearchCont','style':'display:none'});var spnSpotNameEdit=new Element('span').update('Parlor');var spnSpotInEdit=new Element('span',{'style':'font-size:14px;color:#898989;margin-top:3px'}).update('in');var spnSpotStateEdit=new Element('span').update('San Francisco, CA');var EditLink=new Element('a').update('edit');divSpotDetailsSpnMain.appendChild(spnSpotNameEdit);divSpotDetailsSpnMain.appendChild(spnSpotInEdit);divSpotDetailsSpnMain.appendChild(spnSpotStateEdit);divSpotDetailsSpnMain.appendChild(EditLink);var divSpotName=new Element('div',{'class':'New_RecSpot_AddressField'});var spnSpotName=new Element('span',{'style':'font-size:14px;margin-top:10px'}).update('Spot Name');var divInputSpotNameMain=new Element('div',{'class':'New_RecSpot_InputAddress'});var divInputSpotName=new Element('div',{'class':'New_RecSpot_InputIndiv'});var inputSpotName=new Element('input');divInputSpotName.appendChild(inputSpotName);var divSpotNameverify=new Element('div',{'class':'New_RecSpot_Verifdiv'});var divSpotNameCRoss=new Element('div',{'class':'New_RecSpot_Cross','style':'display:none'});var divSpotNameCorrect=new Element('div',{'class':'New_RecSpot_Wright'});divSpotNameverify.appendChild(divSpotNameCRoss);divSpotNameverify.appendChild(divSpotNameCorrect);divInputSpotNameMain.appendChild(divInputSpotName);divInputSpotNameMain.appendChild(divSpotNameverify);divSpotName.appendChild(spnSpotName);divSpotName.appendChild(divInputSpotNameMain);var divSpotCity=new Element('div',{'class':'New_RecSpot_AddressField'});var spnSpotCity=new Element('span',{'style':'font-size:14px'}).update('City');var divInputSpotCityMain=new Element('div',{'class':'New_RecSpot_InputAddress'});var divInputSpotCity=new Element('div',{'class':'New_RecSpot_InputIndiv','style':'width:372px'});var inputSpotCity=new Element('input',{'style':'width:365px'});divInputSpotCity.appendChild(inputSpotCity);var divSpotCityverify=new Element('div',{'class':'New_RecSpot_Verifdiv'});var divSpotCityCRoss=new Element('div',{'class':'New_RecSpot_Cross','style':'display:none'});var divSpotCityCorrect=new Element('div',{'class':'New_RecSpot_Wright'});divSpotCityverify.appendChild(divSpotCityCRoss);divSpotCityverify.appendChild(divSpotCityCorrect);divInputSpotCityMain.appendChild(divInputSpotCity);divInputSpotCityMain.appendChild(divSpotCityverify);divSpotCity.appendChild(spnSpotCity);divSpotCity.appendChild(divInputSpotCityMain);var divSpotStreetAddress=new Element('div',{'class':'New_RecSpot_AddressField'});var spnStreetAddress=new Element('span',{'style':'font-size:14px'}).update('Street Address');var divInputStreetAddressMain=new Element('div',{'class':'New_RecSpot_InputAddress'});var divInputStreetAddress=new Element('div',{'class':'New_RecSpot_InputIndiv','style':'width:285px'});var inputStreetAddress=new Element('input',{'style':'width:278px'});divInputStreetAddress.appendChild(inputStreetAddress);var divSteertAddressverify=new Element('div',{'class':'New_RecSpot_Verifdiv'});var divSteertAddressCRoss=new Element('div',{'class':'New_RecSpot_Cross','style':'display:none'});var divSteertAddressCorrect=new Element('div',{'class':'New_RecSpot_Wright'});divSteertAddressverify.appendChild(divSteertAddressCRoss);divSteertAddressverify.appendChild(divSteertAddressCorrect);divInputStreetAddressMain.appendChild(divInputStreetAddress);divInputStreetAddressMain.appendChild(divSteertAddressverify);divSpotStreetAddress.appendChild(spnStreetAddress);divSpotStreetAddress.appendChild(divInputStreetAddressMain);var divSpotWebSite=new Element('div',{'class':'New_RecSpot_AddressField'});var spnWebSite=new Element('span',{'style':'font-size:14px'}).update('Website');var divInputWebSiteMain=new Element('div',{'class':'New_RecSpot_InputAddress'});var divInputWebsite=new Element('div',{'class':'New_RecSpot_InputIndiv','style':'width:285px'});var inputWebsite=new Element('input',{'style':'width:278px'});divInputWebsite.appendChild(inputWebsite);var divWebSiteverify=new Element('div',{'class':'New_RecSpot_Verifdiv'});var divWebSiteverifyCRoss=new Element('div',{'class':'New_RecSpot_Cross','style':'display:none'});var divWebSiteverifyCorrect=new Element('div',{'class':'New_RecSpot_Wright'});divWebSiteverify.appendChild(divWebSiteverifyCRoss);divWebSiteverify.appendChild(divWebSiteverifyCorrect);divInputWebSiteMain.appendChild(divInputWebsite);divInputWebSiteMain.appendChild(divWebSiteverify);divSpotWebSite.appendChild(spnWebSite);divSpotWebSite.appendChild(divInputWebSiteMain);var divSpotPhoneNumber=new Element('div',{'class':'New_RecSpot_AddressField'});var SpnPhoneNumber=new Element('span',{'style':'font-size:14px'}).update('Phone Number');var divInputPhoneNumberMain=new Element('div',{'class':'New_RecSpot_InputAddress'});var divInputPhoneNumber=new Element('div',{'class':'New_RecSpot_InputIndiv','style':'width:285px'});var inputPhoneNumber=new Element('input',{'style':'width:278px'});divInputPhoneNumber.appendChild(inputPhoneNumber);var divPhoneNumberverify=new Element('div',{'class':'New_RecSpot_Verifdiv'});var divPhoneNumberCRoss=new Element('div',{'class':'New_RecSpot_Cross','style':'display:none'});var divPhoneNumberCorrect=new Element('div',{'class':'New_RecSpot_Wright'});divPhoneNumberverify.appendChild(divPhoneNumberCRoss);divPhoneNumberverify.appendChild(divPhoneNumberCorrect);divInputPhoneNumberMain.appendChild(divInputPhoneNumber);divInputPhoneNumberMain.appendChild(divPhoneNumberverify);divSpotPhoneNumber.appendChild(SpnPhoneNumber);divSpotPhoneNumber.appendChild(divInputPhoneNumberMain);var divCategoryDetails=new Element('div',{'class':'New_RecSpot_CatSpan'});var divCategorySpn=new Element('div',{'class':'New_RecSpot_CatSpan1'}).update('Category');var divCatgoryDetailsOptional=new Element('div',{'class':'New_RecSpot_CatSpan2'}).update('Help us classify this spot so others can find it... ');divCategoryDetails.appendChild(divCategorySpn);divCategoryDetails.appendChild(divCatgoryDetailsOptional);var spnCategoryName=new Element('div',{'class':'New_RecSpot_TypeCat'});spnCategory=new Element('span').update('American');spnCategoryRemove=new Element('a').update('Remove');spnCategoryName.appendChild(spnCategory);spnCategoryName.appendChild(spnCategoryRemove);var ddlCategoryList=new Element('select',{'class':'New_RecSpot_DropCat'});divSpotDetailsMain.appendChild(divSpotDetailsSpnMain);divSpotDetailsMain.appendChild(divSpotName);divSpotDetailsMain.appendChild(divSpotCity);divSpotDetailsMain.appendChild(divSpotStreetAddress);divSpotDetailsMain.appendChild(divSpotWebSite);divSpotDetailsMain.appendChild(divSpotPhoneNumber);divSpotDetailsMain.appendChild(divCategoryDetails);divSpotDetailsMain.appendChild(spnCategoryName);divSpotDetailsMain.appendChild(ddlCategoryList);var divAddDetailsFooter=new Element('div',{'class':'New_RecSpot_Footer'});var divPreviousBtnMain=new Element('div',{'class':'Generic_Large_Gray','style':'float:left;margin:17px 0px 0px 19px'});var divPreviousBtnLeft=new Element('div',{'class':'Generic_Large_Gray_Left'});var divPreviousBtnMiddle=new Element('div',{'class':'Generic_Large_Gray_Middle'});var spnPreviousBtnMiddle=new Element('span');spnPreviousBtnMiddle.innerHTML='Previous';divPreviousBtnMiddle.appendChild(spnPreviousBtnMiddle);var divPreviousBtnRight=new Element('div',{'class':'Generic_Large_Gray_Right'});divPreviousBtnMain.appendChild(divPreviousBtnLeft);divPreviousBtnMain.appendChild(divPreviousBtnMiddle);divPreviousBtnMain.appendChild(divPreviousBtnRight);var divFinishBtnMain=new Element('div',{'class':'Generic_Large_Blue','style':'float:right;margin:17px 19px 0px 0px'});var divFinishBtnLeft=new Element('div',{'class':'Generic_Large_Blue_Left'});var divFinishBtnMiddle=new Element('div',{'class':'Generic_Large_Blue_Middle'});var spnFinishBtnMiddle=new Element('span');spnFinishBtnMiddle.innerHTML='Finish';divFinishBtnMiddle.appendChild(spnFinishBtnMiddle);var divFinishBtnRight=new Element('div',{'class':'Generic_Large_Blue_Right'});divFinishBtnMain.appendChild(divFinishBtnLeft);divFinishBtnMain.appendChild(divFinishBtnMiddle);divFinishBtnMain.appendChild(divFinishBtnRight);divAddDetailsFooter.appendChild(divPreviousBtnMain);divAddDetailsFooter.appendChild(divFinishBtnMain);SpotDetailsContainer.appendChild(divClosePopUp);SpotDetailsContainer.appendChild(divSpotDetailsHeaderMain);SpotDetailsContainer.appendChild(divSpotDetailsMain);SpotDetailsContainer.appendChild(divAddDetailsFooter);}
function AddSpotMatch()
{var SpotFoundContainer=new Element('div',{'class':'New_RecSpot_Div'});var divClosePopUp=new Element('div',{'class':'new_close_button','style':'position:absolute; top:10px; right:10px; z-index:20;'});var divSpotFoundHeaderMain=new Element('div',{'class':'New_RecSpot_SmlHeader'});var divSpotFoundHeader=new Element('div',{'class':'New_RecSpot_WeFoundSpot'});divSpotFoundHeaderMain.appendChild(divSpotFoundHeader);var divSpotFoundDetailsMain=new Element('div',{'class':'New_RecSpot_Content'});var SpnContentMsg=new Element('span',{'class':'New_RecChoose_MsgSpn','style':'margin-left:26px;color:#363636;font-size:14px;font-weight:bold'}).update('Is the spot you’re looking for?');;var divSpotFoundDetails=new Element('div',{'class':'New_RecSpot_VenueDetailDiv','style':'border-top:none'});var divSpotFoundImage=new Element('div',{'class':'New_RecSpot_VenueImg'});var SpotFoundImage=new Element('img');divSpotFoundImage.appendChild(SpotFoundImage);var divSpotFoundDetailsContent=new Element('div',{'class':'New_RecSpot_DetailDiv','style':'padding-bottom:10px'});var divSpotFoundNameMain=new Element('div',{'class':'New_RecSpot_SearchCont','style':'width:auto;margin-left:0px;'});var SpnSpotFoundName=new Element('span').update('parlor');divSpotFoundNameMain.appendChild(SpnSpotFoundName);var SpnSpotFoundAddress1=new Element('span',{'class':'New_RecSpot_AddressSpn1'}).update('1519 Wilshire Boulevard');var SpnSpotFoundPhoneNum=new Element('span',{'class':'New_RecSpot_AddressSpn1'}).update('(310) 395-4139');var SpnSpotFoundWebsite=new Element('span',{'class':'New_RecSpot_AddressSpn1'}).update('www.theparlorsm.com');divSpotFoundDetailsContent.appendChild(divSpotFoundNameMain);divSpotFoundDetailsContent.appendChild(SpnSpotFoundAddress1);divSpotFoundDetailsContent.appendChild(SpnSpotFoundPhoneNum);divSpotFoundDetailsContent.appendChild(SpnSpotFoundWebsite);divSpotFoundDetails.appendChild(divSpotFoundImage);divSpotFoundDetails.appendChild(divSpotFoundDetailsContent);divSpotFoundDetailsMain.appendChild(SpnContentMsg);divSpotFoundDetailsMain.appendChild(divSpotFoundDetails);var divSpotFoundFooterMain=new Element('div',{'class':'New_RecSpot_Footer'});var divCreateProfileBtnMain=new Element('div',{'class':'Generic_Large_Blue','style':'margin: 17px 63px 0px 0px; float: right;'});var divCreateProfileBtnLeft=new Element('div',{'class':'Generic_Large_Blue_Left'});var divCreateProfileBtnMiddle=new Element('div',{'class':'Generic_Large_Blue_Middle','style':'padding:0px 30px'});var SpnCreateProfileBtn=new Element('span').update('No, create a new profile');divCreateProfileBtnMiddle.appendChild(SpnCreateProfileBtn);var divCreateProfileBtnRight=new Element('div',{'class':'Generic_Large_Blue_Right'});divCreateProfileBtnMain.appendChild(divCreateProfileBtnLeft);divCreateProfileBtnMain.appendChild(divCreateProfileBtnMiddle);divCreateProfileBtnMain.appendChild(divCreateProfileBtnRight);var divSameSpotBtnMain=new Element('div',{'class':'Generic_Large_Gray','style':'margin: 17px 0px 0px 76px; float: left'});var divSameSpotBtnleft=new Element('div',{'class':'Generic_Large_Gray_Left'});var divSameSpotMiddle=new Element('div',{'class':'Generic_Large_Gray_Middle'});var spnSameSpot=new Element('span').update('Yep, that’s the spot');divSameSpotMiddle.appendChild(spnSameSpot);var divSameSpotRight=new Element('div',{'class':'Generic_Large_Gray_Right'});divSameSpotBtnMain.appendChild(divSameSpotBtnleft);divSameSpotBtnMain.appendChild(divSameSpotMiddle);divSameSpotBtnMain.appendChild(divSameSpotRight);divSpotFoundFooterMain.appendChild(divCreateProfileBtnMain);divSpotFoundFooterMain.appendChild(divSameSpotBtnMain);SpotFoundContainer.appendChild(divClosePopUp);SpotFoundContainer.appendChild(divSpotFoundHeaderMain);SpotFoundContainer.appendChild(divSpotFoundDetailsMain);SpotFoundContainer.appendChild(divSpotFoundFooterMain);}
function LoadState(CountryID)
{var stateDiv;if($('ctl00_ContentPlaceHolder1_ddlState')){stateDiv=$('ctl00_ContentPlaceHolder1_ddlState');}
if(CountryID==223)
{var url="/_service/getStates.ashx"
var pars="&countryID="+CountryID;var target='output-div';var myAjax=new Ajax.Updater(target,url,{method:'get',parameters:pars,onSuccess:function(transport)
{var response=transport.responseText||"no response text";var data=response.evalJSON(true);if(data.length>0)
{if($('stateDivList')){$('stateDivList').style.display='';}
stateDiv.innerHTML='';for(var i=0;i<data.length;i++)
{stateDiv.insert(new Element('option',{'Value':data[i].StateID}).update(data[i].StateCode));}}},onFailure:function()
{}});}
else
{if($('stateDivList')){$('stateDivList').style.display='none';}}}
function CardChangeValue(val)
{var SelCard=$(val).options[$(val).selectedIndex].text;var Cvv;if($('ctl00_ContentPlaceHolder1_txtCVN')){Cvv=$('ctl00_ContentPlaceHolder1_txtCVN');}
Cvv.value='';var GetElement=document.getElementById(Cvv.id);if(SelCard=='American Express')
{GetElement.setAttribute("maxLength","4");}
else
{GetElement.setAttribute("maxLength","3");}}
function disableEnterKey(e)
{var key;if(window.event)
key=window.event.keyCode;else
key=e.which;if(key==13)
return false;else
return true;}
function getQuerystring(key,default_){if(default_==null)default_="";key=key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");var regex=new RegExp("[\\?&]"+key+"=([^&#]*)");var qs=regex.exec(window.location.href);if(qs==null)
return default_;else
return qs[1];}
