var SmartPagerID;function SmartPagerSelectPage(id,pageNo){if(pageNo<1){pageNo=1}var pagerPageCount=eval(id+"$pagerPageCount");if(pageNo>pagerPageCount){pageNo=pagerPageCount}if(eval(id+"$callJS")!=""){eval(eval(id+"$callJS")+"('"+id+"', "+pageNo+")")}else{document.getElementById("hdn"+id).value=pageNo;__doPostBack("ctl00_MainLeftContent_ctl00_rptProfile")}}var menu;function showlayer(layer){var myLayer=document.getElementById(layer);if(myLayer.style.display=="none"||myLayer.style.display==""){myLayer.style.display="block"}else{myLayer.style.display="none"}}function hidelayers(){if(menu==null){menu=document.getElementById("menu")}var myLayers=menu.getElementsByTagName("ul");for(var i=0;i<myLayers.length;i++){myLayers[i].style.display="none"}}function Browser(){var ua,s,i;this.isIE=false;this.isOP=false;this.isNS=false;this.version=null;ua=navigator.userAgent;s="Opera";if((i=ua.indexOf(s))>=0){this.isOP=true;this.version=parseFloat(ua.substr(i+s.length));return}s="Netscape6/";if((i=ua.indexOf(s))>=0){this.isNS=true;this.version=parseFloat(ua.substr(i+s.length));return}s="Gecko";if((i=ua.indexOf(s))>=0){this.isNS=true;this.version=6.1;return}s="MSIE";if((i=ua.indexOf(s))){this.isIE=true;this.version=parseFloat(ua.substr(i+s.length));return}}var browser=new Browser();function navigate(userid,thm,pos){var thm_array=thm.split("##");if(thm_array.length>1){var lbl=$get(userid+"_count");var tmplbl=lbl.innerHTML.split(" of ");var currPos=tmplbl[0];var thm_num=parseInt(tmplbl[0]);if(pos==0){thm_num=thm_num-1}else{thm_num=thm_num+1}if(thm_num>=thm_array.length){thm_num=thm_array.length}if(thm_num<1){thm_num=1}document.getElementById(userid).src=thm_array[thm_num-1];var img_pre=$get(userid+"_pre");var img_next=$get(userid+"_next");img_pre.enabled=true;img_next.enabled=true;if(thm_num==1){img_pre.enabled=false}if(thm_num==thm_array.length){img_next=false}lbl.innerText=thm_num+" of "+thm_array.length}else{$get(userid+"_navigation").style.display="none"}}function OpenLocation(location){try{var winl=(screen.width)/2;var wint=(screen.height)/2;mywindow=window.open("Capture.aspx?Location="+location,"LocationMap","left="+winl+",top="+wint+",width=400,height=400,toolbar=0,resizable=0")}catch(e){alert("Oops! We have a problem showing the location. Apologies for the inconvenience.")}}function showdeadcenterdiv(Xwidth,Yheight,divid){var scrolledX,scrolledY;if(self.pageYOffset){scrolledX=self.pageXOffset;scrolledY=self.pageYOffset}else{if(document.documentElement&&document.documentElement.scrollTop){scrolledX=document.documentElement.scrollLeft;scrolledY=document.documentElement.scrollTop}else{if(document.body){scrolledX=document.body.scrollLeft;scrolledY=document.body.scrollTop}}}var centerX,centerY;if(self.innerHeight){centerX=self.innerWidth;centerY=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){centerX=document.documentElement.clientWidth;centerY=document.documentElement.clientHeight}else{if(document.body){centerX=document.body.clientWidth;centerY=document.body.clientHeight}}}var leftOffset=scrolledX+(centerX-Xwidth)/2;var topOffset=scrolledY+(centerY-Yheight)/2;var o=document.getElementById(divid);var r=o.style;r.position="absolute";r.top=topOffset+"px";r.left=leftOffset+"px";r.display="block"}var currUserID=null;function ShowMenuLinksEX(){ShowMenuLinks(currUserID)}function ShowMenuLinks(userID){currUserID=userID;var odiv=document.getElementById("MenuDivLeft");odiv.className="profileMenuLeft";odiv.style.borderRight="dashed 1px white";var rightDiv=document.getElementById("MenuDivRight_"+userID);rightDiv.style.backgroundColor="#F09A11";odiv.style.left=(findPosX(rightDiv)-109)+"px";odiv.style.top=(findPosY(rightDiv)+1)+"px";var R1=document.getElementById("divR1_"+userID);var R2=document.getElementById("divR2_"+userID);var R3=document.getElementById("divR3_"+userID);var R4=document.getElementById("divR4_"+userID);var R5=document.getElementById("divR5_"+userID);var R6=document.getElementById("divR6_"+userID);var R7=document.getElementById("divR7_"+userID);var R8=document.getElementById("divR8_"+userID);var R9=document.getElementById("divR9_"+userID);var L1=document.getElementById("L1");var L2=document.getElementById("L2");var L3=document.getElementById("L3");var L4=document.getElementById("L4");var L5=document.getElementById("L5");var L6=document.getElementById("L6");var L7=document.getElementById("L7");var L8=document.getElementById("L8");var L9=document.getElementById("L9");if(R1){L1.onclick=R1.onclick;L1.style.display=R1.style.display}if(R2){L2.onclick=R2.onclick;L2.style.display=R2.style.display}if(R3){L3.onclick=R3.onclick;L3.style.display=R3.style.display}if(R4){L4.onclick=R4.onclick;L4.style.display=R4.style.display}if(R5){L5.onclick=R5.onclick;L5.style.display=R5.style.display}if(R6){L6.onclick=R6.onclick;L6.style.display=R6.style.display}if(R7){L7.onclick=R7.onclick;L7.style.display=R7.style.display}if(R8){L8.onclick=R8.onclick;L8.style.display=R8.style.display}if(R9){L9.onclick=R9.onclick;L9.style.display=R9.style.display;L8.style.display="none"}}function HideMenuLinksEX(){HideMenuLinks(currUserID)}function HideMenuLinks(userID){var odiv=document.getElementById("MenuDivLeft");odiv.className="profileMenuLeftHide";var rightDiv=document.getElementById("MenuDivRight_"+userID);rightDiv.style.backgroundColor="#FFFDE8"}function findPosX(obj){var curleft=0;if(obj.offsetParent){while(1){curleft+=obj.offsetLeft;if(!obj.offsetParent){break}obj=obj.offsetParent}}else{if(obj.x){curleft+=obj.x}}return curleft}function findPosY(obj){var curtop=0;if(obj.offsetParent){while(1){curtop+=obj.offsetTop;if(!obj.offsetParent){break}obj=obj.offsetParent}}else{if(obj.y){curtop+=obj.y}}return curtop}function _HideAllMenuLinks(){var tdcollection=document.getElementsByTagName("div");for(i=0;i<tdcollection.length;i++){if(tdcollection[i].id.indexOf("mdt")==0){var tdItem=tdcollection[i];tdItem.style.display="none"}}var divcollection=document.getElementsByTagName("div");for(i=0;i<divcollection.length;i++){if(divcollection[i].id.indexOf("MenuDivLeft_")==0){var divItem=divcollection[i];divItem.style.backgroundColor="";divItem.style.border=""}}}function MouseOut(){}function OnSucceededFavNPostBack(result,userContext,methodName){__doPostBack("ctl00_MainLeftContent_ctl00_rptProfile","customPostback")}function Notes_Show(uid,tbox){var tboxn=document.getElementById(tbox);PageMethods.GetNotes(uid,OnSucceedNotesN,OnFailed,tboxn)}function OnSucceedNotesN(result,userContext,methodName){var tboxn=userContext;tboxn.value=result;tboxn.focus()}function Notes_Save(uid,tbox,IgnoreMode){if(IgnoreMode=="2"){Ignore_Save(uid,tbox);return}if(IgnoreMode=="1"){Ignore_SaveN(uid,tbox);return}var tboxn=document.getElementById(tbox);PageMethods.SetNotes(uid,tboxn.value);var tr1=document.getElementById("divR1_"+uid);var tr2=document.getElementById("divR2_"+uid);if(tr1&&tr2){tr1.style.display="none";tr2.style.display=""}tr1=document.getElementById("L1");tr2=document.getElementById("L2");if(tr1&&tr2){tr1.style.display="none";tr2.style.display=""}}function Ignore_Show(uid,tbox){var tboxn=document.getElementById(tbox);PageMethods.GetIgnore(uid,OnSucceedIgnore,OnFailed,tboxn)}function OnSucceedIgnore(result,userContext,methodName){var tboxn=userContext;tboxn.value=result;tboxn.focus()}function Ignore_Save(uid,tbox){var tboxn=document.getElementById(tbox);PageMethods.SetIgnore(uid,tboxn.value);var tr7=document.getElementById("divR7_"+uid);var tr8=document.getElementById("divR8_"+uid);if(tr7!=null&&tr8!=null){tr7.style.display="none";tr8.style.display=""}tr7=document.getElementById("L7");tr8=document.getElementById("L8");if(tr7!=null&&tr8!=null){tr7.style.display="none";tr8.style.display=""}}function Ignore_SaveN(uid,tbox){var tboxn=document.getElementById(tbox);PageMethods.SetIgnore(uid,tboxn.value,OnSucceedPostBack,OnFailed)}function OnFailed(error,userContext,methodName){}function OnSucceedPostBack(result,userContext,methodName){__doPostBack("<%=rptProfile.UniqueID %>","customPostback")}function AddToFavorites(uid,IgnoreMode){if(IgnoreMode==1||IgnoreMode==2){AddToFavoritesN(uid);return}PageMethods.AddToFavorites(uid);var tr3=document.getElementById("divR3_"+uid);var tr4=document.getElementById("divR4_"+uid);if(tr3&&tr4){tr3.style.display="none";tr4.style.display=""}tr3=document.getElementById("L3");tr4=document.getElementById("L4");if(tr3&&tr4){tr3.style.display="none";tr4.style.display=""}var tr7=document.getElementById("divR7_"+uid);var tr8=document.getElementById("divR8_"+uid);if(tr7&&tr8){tr7.style.display="";tr8.style.display="none"}tr7=document.getElementById("L7");tr8=document.getElementById("L8");if(tr7&&tr8){tr7.style.display="";tr8.style.display="none"}}function AddToFavoritesN(uid){PageMethods.AddToFavorites(uid,OnSucceedPostBack,OnFailed)}function AddToReview(uid){PageMethods.AddToReview(uid);var tr5=document.getElementById("divR5_"+uid);var tr6=document.getElementById("divR6_"+uid);if(tr5&&tr6){tr5.style.display="none";tr6.style.display=""}tr5=document.getElementById("L5");tr6=document.getElementById("L6");if(tr5&&tr6){tr5.style.display="none";tr6.style.display="block"}}function CheckLogin(isLogedIn){if(isLogedIn==0){$find("mdlPopupLogin").show();return false}return true}function OpenLocation(location){try{var winl=(screen.width)/2;var wint=(screen.height)/2;mywindow=window.open("Capture.aspx?Location="+location,"LocationMap","left="+winl+",top="+wint+",width=400,height=400,toolbar=0,resizable=0");if(!mywindow){alert("Grr!!! A pop-up blocker is preventing this window from opening.")}}catch(e){alert("Oops! We have a problem showing the location. Apologies for the inconvenience.")}}function ChangeMailStatus(id,status){PageMethods.ChangeMailStatus(id,status)}var toggle=false;function pageLoadMail(){reloadChckBoxAgain();Sys.WebForms.PageRequestManager.getInstance().add_endRequest(LoadMailEndRequestHandler)}function reloadChckBoxAgain(){var hdnval=document.getElementById("ctl00_MainLeftContent_myMessages_hdnSelCheckBoxs");for(i=0;i<document.forms[0].elements.length;i++){elm=document.forms[0].elements[i];if(elm.type=="checkbox"){if(elm.getAttribute("dummyProp")){var id=elm.getAttribute("dummyProp");if(hdnval.value.indexOf(","+id+",")>-1){elm.checked=true}}}}}function LoadMailEndRequestHandler(sender,args){reloadChckBoxAgain()}function onselectedIndexChanging(obj,e){if(toggle){e.set_cancel(true)}toggle=false}function onAMailMessagesChange(hdnImageId,isChecked,mailId,chkMessageAll){toggle=true;var accordion=$find("ctl00_MainLeftContent_myMessages_AMailMessages_AccordionExtender");var handler=accordion.get_events().getHandler("selectedIndexChanging");if(handler==null){accordion.add_selectedIndexChanging(onselectedIndexChanging)}var img=document.getElementById(hdnImageId);if(!img.value.startsWith(",")){img.value=","+img.value}if(!img.value.endsWith(",")){img.value=img.value+","}img.value=img.value.replace(","+mailId+",",",");if(isChecked){img.value=img.value+mailId,","}else{var hdnImageId=document.getElementById(chkMessageAll);hdnImageId.checked=false}if(!img.value.endsWith(",")){img.value=img.value+","}}function CheckAllAMailMessagesCheckBoxes(chkMessage,checkVal){var hdnImageId=document.getElementById("ctl00_MainLeftContent_myMessages_hdnSelCheckBoxs");hdnImageId.value="";var elm=document.getElementsByName(chkMessage);for(i=0;i<elm.length;i++){elm[i].checked=checkVal;if(checkVal){hdnImageId.value=hdnImageId.value+","+elm[i].getAttribute("dummyProp")}}if(checkVal){hdnImageId.value=","+hdnImageId.value+","}}function AddToProfileTracker(uid){var IPAddress="10.70.165.91";PageMethods.AddToProfileTracker(uid,IPAddress);return true}function SetPhotoRequest(fromUid,toUid,requestStatus){if(fromUid!=toUid){PageMethods.SetPhotoRequest(fromUid,toUid,requestStatus,OnSucceedPhotoRequest,OnFailed)}}function OnSucceedPhotoRequest(result,userContext,methodName){var result_array=result.split("|");if(result_array!=null&&result_array.length>1){alert(result_array[1])}}function SetContactRequest(fromUid,toUid,requestStatus){PageMethods.SetContactRequest(fromUid,toUid,requestStatus,OnSucceedContactRequest,OnFailed)}function OnSucceedContactRequest(result,userContext,methodName){var result_array=result.split("|");if(result_array!=null&&result_array.length>0&&result_array[0]=="2"){var href=$get("ctl00_MainLeftContent_rptProfile_ctl00_hrefContact");href.innerHTML="Contact details Requested";href.className="orangelinkDisabled";href.onclick="return false"}if(result_array!=null&&result_array.length>1){alert(result_array[1])}}function endsWith(testString,endingString){if(endingString.length>testString.length){return false}return testString.indexOf(endingString)==(testString.length-endingString.length)}function ReDirectToHome(){window.location=ApplicationRoot+"/Secure/MyHome.aspx";return true}function validateAge(sender,args){var field=document.getElementById("ctl00_MainLeftContent_CaptureBasicInfoControl_TxtDOB");var dateToCheck=new Date(field.value.substr(6,4),parseInt(field.value.substr(3,2))-1,field.value.substr(0,2));var eighteenYearsAgo=new Date();eighteenYearsAgo.setYear(eighteenYearsAgo.getFullYear()-18);eighteenYearsAgo.setHours(0);eighteenYearsAgo.setMinutes(0);eighteenYearsAgo.setSeconds(1);if(dateToCheck.getTime()>eighteenYearsAgo.getTime()){args.IsValid=false}else{args.IsValid=true}}function validateDate(sender,args){var field=document.getElementById("ctl00_MainLeftContent_CaptureBasicInfoControl_TxtDOB");var fieldValue=field.value;var regex=/^[\d]{2}[\-|\/\.][\d]{2}[\-|\/\.][\d]{4}$/;if(!regex.test(fieldValue)){args.IsValid=false;return false}else{usdate=field.getAttribute("usdate");var yy=parseInt(fieldValue.substring(6,10),10);if(usdate){if(usdate.toLowerCase()=="yes"||usdate.toLowerCase()=="true"){var mm=parseInt(fieldValue.substring(0,2),10);var dd=parseInt(fieldValue.substring(3,5),10)}else{var dd=parseInt(fieldValue.substring(0,2),10);var mm=parseInt(fieldValue.substring(3,5),10)}}else{var dd=parseInt(fieldValue.substring(0,2),10);var mm=parseInt(fieldValue.substring(3,5),10)}if(dd==0||mm==0||yy==0){args.IsValid=false;return false}if(mm<=12){switch(mm){case 4:case 6:case 9:case 11:if(dd>30){args.IsValid=false;return false}case 1:case 3:case 5:case 7:case 8:case 10:case 12:if(dd>31){args.IsValid=false;return false}break}}else{args.IsValid=false;return false}if((yy%4)==0){if((mm==2)&&(dd>29)){args.IsValid=false;return false}}else{if((mm==2)&&(dd>28)){args.IsValid=false;return false}}if(yy<1900){args.IsValid=false;return false}}args.IsValid=true}function CountLeft(field,max){var count=$get("spnCount");if((max-field.value.length)<0){count.innerHTML="Limit Exceeded"}else{count.innerHTML=max-field.value.length}}function PhoneOrMobile(sender,args){var phone=$get("ctl00_MainLeftContent_CaptureContactDetails_txtPhone");var mobile=$get("ctl00_MainLeftContent_CaptureContactDetails_txtMobile");var areacode=$get("ctl00_MainLeftContent_CaptureContactDetails_txtAreaCode");if((areacode.value!=""&&phone.value=="")||(areacode.value==""&&phone.value!="")){if(areacode.value==""){areacode.style.backgroundColor="Orange"}if(phone.value==""){phone.style.backgroundColor="Orange"}args.IsValid=false;return false}if(areacode.value==""&&phone.value==""&&mobile.value==""){areacode.style.backgroundColor="Orange";phone.style.backgroundColor="Orange";mobile.style.backgroundColor="Orange";args.IsValid=false;return false}var myregexp=new RegExp("^[0-9]+$");if(areacode.value!=""){if(!myregexp.test(areacode.value)){areacode.style.backgroundColor="Orange";args.IsValid=false;return false}}if(phone.value!=""){if(!myregexp.test(phone.value)){phone.style.backgroundColor="Orange";args.IsValid=false;return false}}if(mobile.value!=""){if(!myregexp.test(mobile.value)){mobile.style.backgroundColor="Orange";args.IsValid=false;return false}}args.IsValid=true;return true}function clearOtherCheckBoxes(listname,checkedControl,excep1,excep2,excep3){var allChkBoxes=document.getElementsByTagName("input");var f1=document.getElementById(listname+"_"+excep1);var f2=document.getElementById(listname+"_"+excep2);var f3=document.getElementById(listname+"_"+excep3);if(f1.checked==true||f2.checked==true||f3.checked==true){for(var i=0;i<allChkBoxes.length;i++){if(allChkBoxes[i]!=null&&allChkBoxes[i].id!=null&&allChkBoxes[i].id.indexOf(listname)>=0){if(!(allChkBoxes[i].id==f1.id||allChkBoxes[i].id==f2.id||allChkBoxes[i].id==f3.id)){allChkBoxes[i].checked=false}}}}if(excep2==excep3){if(excep1!=excep2){if(checkedControl==excep1){f2.checked=false}else{f1.checked=false}}}else{if(checkedControl==excep1){f2.checked=false;f3.checked=false}else{if(checkedControl==excep2){f1.checked=false;f3.checked=false}else{if(checkedControl==excep3){f1.checked=false;f2.checked=false}}}}}function clearNCheckBoxes(listname,excep1,excep2,excep3){var f1=document.getElementById(listname+"_"+excep1);var f2=document.getElementById(listname+"_"+excep2);var f3=document.getElementById(listname+"_"+excep3);f1.checked=false;f2.checked=false;f3.checked=false}function initAccordion(){var stretchers=document.getElementsByClassName("box");var toggles=document.getElementsByClassName("accTab");var myAccordion=new fx.Accordion(toggles,stretchers,{opacity:false,height:true,duration:600});var found=false;toggles.each(function(h3,i){var div=Element.find(h3,"nextSibling");if(window.location.href.indexOf(h3.title)>0){myAccordion.showThisHideOpen(div);found=true}});if(!found){myAccordion.showThisHideOpen(stretchers[0])}}function ShowHide(divs,num){var flag=false;for(var i=2;i<arguments.length;i++){dv=document.getElementById(arguments[i]);var status=dv.style.display;if(status=="table-row"||status=="block"||status==""){dv.style.display="none"}else{dv.style.display="";dv.style.backgroundColor="#DBD7B2";flag=true}}dv=document.getElementById(arguments[0]);if(flag==true){dv.src="http://www.matrimonyhouse.com/Static/images/iconsNew/up-d-green.png"}else{dv.src="http://www.matrimonyhouse.com/Static/images/iconsNew/down-d-green.png"}dv=document.getElementById(arguments[1]);if(flag==true){dv.innerHTML="Fewer Options"}else{dv.innerHTML="More Options&nbsp;"}}function resetme(){resetMCControls();document.forms[0].reset()}function CheckClick(container,val){var containerRef=document.getElementById(container);if(containerRef==null){containerRef=document.getElementById("ctl00_MainLeftContent_CapturePartnerProfile_"+container)}var inputRefArray=containerRef.getElementsByTagName("input");if(val==-5){for(var i=1;i<inputRefArray.length;i++){inputRefArray[i].checked=false}}else{inputRefArray[0].checked=false}}function HideMe(ele,state){var obj=document.getElementById(ele);obj.Visible=state}function MoveOption(objSourceElement,objTargetElement,flag,txtHid){try{var aryTempSourceOptions=new Array();var x=0;var flag1=false;for(var i=0;i<objSourceElement.length;i++){if(objSourceElement.options[i].selected){if(flag1==false){if(objTargetElement.options.length==1&&objTargetElement.options[0].value=="-5"){objTargetElement.remove(0);flag1=true}}if(objSourceElement.options[0].value!="-5"){var intTargetLen=objTargetElement.length++;objTargetElement.options[intTargetLen].text=objSourceElement.options[i].text;objTargetElement.options[intTargetLen].value=objSourceElement.options[i].value}}else{var objTempValues=new Object();objTempValues.text=objSourceElement.options[i].text;objTempValues.value=objSourceElement.options[i].value;aryTempSourceOptions[x]=objTempValues;x++}}objSourceElement.length=aryTempSourceOptions.length;for(var i=0;i<aryTempSourceOptions.length;i++){objSourceElement.options[i].text=aryTempSourceOptions[i].text;objSourceElement.options[i].value=aryTempSourceOptions[i].value;objSourceElement.options[i].selected=false}if(flag==false&&objSourceElement.options.length==0){objSourceElement.options.length=1;objSourceElement.options[0].text="Doesn't Matter";objSourceElement.options[0].value="-5"}sortList(objTargetElement);if(flag==false){storeSelected(objSourceElement,txtHid)}else{storeSelected(objTargetElement,txtHid)}}catch(e){}}function sortList(selectBox){selectArray=new Array();for(i=0;i<selectBox.length;i++){selectArray[i]=new Array();selectArray[i][1]=selectBox.options[i].text;selectArray[i][0]=parseInt(selectBox.options[i].value)}selectArray.sort(comparePair);for(j=0;j<selectBox.length;j++){selectBox.options[j].text=selectArray[j][1];selectBox.options[j].value=selectArray[j][0]}}function comparePair(a,b){return a[0]-b[0]}function resetMCControls(){try{var selects=document.getElementsByTagName("select");var len=selects.length;if((len%2)!=0){len=len+1}var dt=Array(len/2);var j=0;for(p=0;p<selects.length;p++){var a=selects[p].name.indexOf("listDestination",0);if(a>-1){dt[j++]=selects[p].name.substring(0,a)}}for(p=0;p<j;p++){var listS=document.getElementsByName(dt[p]+"listSource")[0];var listD=document.getElementsByName(dt[p]+"listDestination")[0];resetAll(listD,listS)}}catch(e){}}function resetAll(objSourceElement,objTargetElement){for(var k=0;k<objSourceElement.length;k++){if(objSourceElement.options[k].value!="-5"){var intTargetLen=objTargetElement.length++;objTargetElement.options[intTargetLen].text=objSourceElement.options[k].text;objTargetElement.options[intTargetLen].value=objSourceElement.options[k].value}}objSourceElement.options.length=1;objSourceElement.options[0].text="Doesn't Matter";objSourceElement.options[0].value="-5";sortList(objTargetElement)}function storeSelected(objSourceElement,txtHid){txtHid.value="";for(var k=0;k<objSourceElement.length;k++){if(objSourceElement.options[k].value!="-5"){txtHid.value=txtHid.value+","+objSourceElement.options[k].value}}}function ProcessStateCombo(countryId){var hdnTxtCountry=document.getElementById("ctl00_MainLeftContent_CaptureContactDetails_hdnTxtCountry");hdnTxtCountry.value=countryId;var hdnTxtCity=document.getElementById("ctl00_MainLeftContent_CaptureContactDetails_hdnTxtCity");hdnTxtCity.value="-1";var hdnTxtState=document.getElementById("ctl00_MainLeftContent_CaptureContactDetails_hdnTxtState");hdnTxtState.value="-1";if(countryId==1||countryId==2){PageMethods.GetState(countryId,OnSucceedStateCombo,OnFailed)}else{var CmbState=document.getElementById("ctl00_MainLeftContent_CaptureContactDetails_CmbState");hdnTxtState.value="-2";CmbState.options.length=1;CmbState.options[0].text="Other";CmbState.options[0].value="-2";PageMethods.GetCityByCountry(countryId,OnSucceedCityCombo,OnFailed)}}function OnSucceedStateCombo(result,userContext,methodName){var CmbState=document.getElementById("ctl00_MainLeftContent_CaptureContactDetails_CmbState");CmbState.options.length=0;if(result!=""){var result_array=result.split("|");if(result_array!=null&&result_array.length>0){for(i=0;i<result_array.length;i++){var resultVar=result_array[i].split(":");if(resultVar!=null&&resultVar.length>1){CmbState.options.length=i+1;CmbState.options[i].text=resultVar[1];CmbState.options[i].value=resultVar[0]}}}}var CmbCity=document.getElementById("ctl00_MainLeftContent_CaptureContactDetails_CmbCity");CmbCity.options.length=1;CmbCity.options[0].text="<-- Select -->";CmbCity.options[0].value="-1";var hdnTxtCity=document.getElementById("ctl00_MainLeftContent_CaptureContactDetails_hdnTxtCity");hdnTxtCity.value="-1"}function ProcessCityCombo(stateId){var hdnTxtState=document.getElementById("ctl00_MainLeftContent_CaptureContactDetails_hdnTxtState");hdnTxtState.value=stateId;PageMethods.GetCityByState(stateId,OnSucceedCityCombo,OnFailed)}function OnSucceedCityCombo(result,userContext,methodName){var CmbCity=document.getElementById("ctl00_MainLeftContent_CaptureContactDetails_CmbCity");if(result!=""){var result_array=result.split("|");if(result_array!=null&&result_array.length>0){for(i=0;i<result_array.length;i++){var resultVar=result_array[i].split(":");if(resultVar!=null&&resultVar.length>1){CmbCity.options.length=i+1;CmbCity.options[i].text=resultVar[1];CmbCity.options[i].value=resultVar[0]}}}}else{CmbCity.options.length=1;CmbCity.options[0].text="<-- Select -->";CmbCity.options[0].value="-1"}}function CityComboChange(cityId){var hdnTxtCity=document.getElementById("ctl00_MainLeftContent_CaptureContactDetails_hdnTxtCity");hdnTxtCity.value=cityId}function ValidateState(source,args){var CmbState=document.getElementById("ctl00_MainLeftContent_CaptureContactDetails_CmbState");if(CmbState.options[CmbState.selectedIndex].value=="-1"){args.IsValid=false}else{args.IsValid=true}}function ValidateCity(source,args){var CmbCity=document.getElementById("ctl00_MainLeftContent_CaptureContactDetails_CmbCity");if(CmbCity.options[CmbCity.selectedIndex].value=="-1"){args.IsValid=false}else{args.IsValid=true}}var content;var contentcontainer;var position=1;var rot_position=1;var rot_timer;var noSlides=6;var maxY,wd,maxX,ready,slideDur=200,destX=0,destY=0,distY,distX,per,sliding,slideStart,aniTimer,startX,startY,xcoordinate,ycoordinate,url_path_rotation;function loadSlider(C,A,B){var nos=document.getElementsByName("RecCounter").length;nos=nos/3;if(nos<1){nos=1}noSlides=nos;position=0;url_path_rotation=B;if(!document.getElementById){return}content=document.getElementById("content");contentcontainer=document.getElementById("content-container");content.visibility="hidden";content.style.top=0;content.style.left=0;xcoordinate=0;ycoordinate=0;maxY=(content.offsetHeight-contentcontainer.offsetHeight>0)?content.offsetHeight-contentcontainer.offsetHeight:0;wd=C?document.getElementById(C).offsetWidth:content.offsetWidth;maxX=(wd-contentcontainer.offsetWidth>0)?wd-contentcontainer.offsetWidth:0;content.style.visibility="visible";ready=true;document.getElementById("slide-links").style.visibility="visible";rot_timer=setInterval("do_rotation()",A)}function glideTo(B,A){content=document.getElementById("content");contentcontainer=document.getElementById("content-container");startX=parseInt(content.style.left);if(startX==""){startX=0}startY=parseInt(content.style.top);destX=-Math.max(Math.min(B,maxX),0);destY=-Math.max(Math.min(A,maxY),0);distY=destY-startY;distX=destX-startX;per=Math.PI/(2*slideDur);sliding=false;slideStart=(new Date()).getTime();aniTimer=setInterval("doSlide()",10);on_slide_start(startX,startY)}function doSlide(){var B=(new Date()).getTime()-slideStart;if(B<slideDur){var A=startX+distX*Math.sin(per*B);var C=startY+distY*Math.sin(per*B);shiftTo(A,C);on_slide(A,C)}else{clearInterval(aniTimer);sliding=false;shiftTo(destX,destY);on_slide_end(destX,destY)}}function shiftTo(A,B){if(typeof(A)=="number"){content.style.left=A+"px";content.style.top=B+"px"}}on_slide_start=function(){};on_slide=function(){};on_slide_end=function(){};function slide(id,img_url){clearInterval(rot_timer);position=id;glideTo(eval(id-1)*580,0);for(var z=1;z<=noSlides;z++){if(id==z){document.getElementById("slide"+id).src=img_url+"slide-on.gif"}else{document.getElementById("slide"+z).src=img_url+"slide-off.gif"}}if(id==noSlides){disableAnchor(document.getElementById("slidenext"),true);disableAnchor(document.getElementById("slideprevious"),false)}if(id==1){disableAnchor(document.getElementById("slideprevious"),true);disableAnchor(document.getElementById("slidenext"),false)}if(position>1&&position<noSlides){disableAnchor(document.getElementById("slidenext"),false);disableAnchor(document.getElementById("slideprevious"),false)}}function next_previous(str,img_url){clearInterval(rot_timer);if(str=="next"){if(document.getElementById("slideprevious").href==""){if(position!=noSlides){disableAnchor(document.getElementById("slideprevious"),false)}}if(position<noSlides){position++;glideTo(eval(position-1)*580,0);disableAnchor(document.getElementById("slidenext"),false)}if(position==noSlides){disableAnchor(document.getElementById("slidenext"),true)}}if(str=="previous"){if(document.getElementById("slidenext").href==""){disableAnchor(document.getElementById("slidenext"),false)}if(position>1){position--;glideTo(eval(position-1)*580,0);disableAnchor(document.getElementById("slideprevious"),false)}if(position==1){disableAnchor(document.getElementById("slideprevious"),true)}}for(var z=1;z<=noSlides;z++){if(position==z){document.getElementById("slide"+position).src=img_url+"slide-on.gif"}else{document.getElementById("slide"+z).src=img_url+"slide-off.gif"}}}function do_rotation(){if(position<noSlides){position++;glideTo(eval(position-1)*580,0)}else{position=1;content.style.left="0px";content.style.top="0px"}for(var z=1;z<=noSlides;z++){if(position==z){document.getElementById("slide"+position).src=url_path_rotation+"slide-on.gif"}else{document.getElementById("slide"+z).src=url_path_rotation+"slide-off.gif"}}}function disableAnchor(C,B){if(B){var A=C.getAttribute("href");C.removeAttribute("href")}else{if(C.id=="slidenext"){C.setAttribute("href","Javascript:next_previous('next','"+url_path_rotation+"')")}if(C.id=="slideprevious"){C.setAttribute("href","Javascript:next_previous('previous','"+url_path_rotation+"')")}}};