var desImageNo = 'http://rugby.isport.com/Images/Btn/Btn_detailDescription_no.gif'; var revImageNo = 'http://rugby.isport.com/Images/Btn/Btn_detailReviews_no.gif'; var phoImageNo = 'http://rugby.isport.com/Images/Btn/Btn_detailPhotos_no.gif'; var evtImageNo = 'http://rugby.isport.com/Images/Btn/Btn_detailEvents_no.gif'; var mapImageNo = 'http://rugby.isport.com/Images/Btn/Btn_detailMap_no.gif'; var pIsPhoto = '1'; var position_mess_ListingDetail = 'divBigTitle*700*-10'; //add new function for fix disable tab in ie6 function changeTab(sID, bIsSelect) { var sShowDiv = sID; var sHideDiv = sID + "_nonselect"; if(document.getElementById(sHideDiv)==null) return false; // if select show hided div if( bIsSelect != null && bIsSelect ){ sShowDiv = sHideDiv; sHideDiv = sID; } // tab description is spencial if( sID != "tabDescription" ){ var sPlaceThere = sShowDiv; sShowDiv = sHideDiv; sHideDiv = sPlaceThere; } show("tdLeft"); show("divLeft"); show("tdRight"); show("divRight"); jQuery('#tdContent').css("border-right", "1px solid #CCCCCC"); show( sHideDiv ); hide( sShowDiv ); } function DescriptionClick() { Hide_Alert_MSG(); changeTab('tabDescription',true); if(document.getElementById('tabReview')) changeTab('tabReview',false); changeTab('tabPhoto',false); changeTab('tabEvent',false); changeTab('tabMap',false); show("tdLeft"); show("divLeft"); show("divDescription"); if(document.getElementById('divReviewMain')) hide("divReviewMain"); hide("divPhoto"); hide("divAddPhoto"); hide("divEvent"); hide("divMap"); checkObjHasData(1); showDetailList(); } function ReviewClick() { Hide_Alert_MSG(); changeTab('tabDescription',false); changeTab('tabReview',true); changeTab('tabPhoto',false); changeTab('tabEvent',false); changeTab('tabMap',false); show("tdLeft"); show("divLeft"); hide("divDescription"); show("divReviewMain"); hide("divAddPhoto"); hide("divPhoto"); hide("divEvent"); hide("divMap"); showReviewList('list',page); checkObjHasData(1); } function PhotoClick() { Hide_Alert_MSG(); changeTab('tabDescription',false); if(document.getElementById('tabReview')) changeTab('tabReview',false); changeTab('tabPhoto',true); changeTab('tabEvent',false); changeTab('tabMap',false); hide("divLeft"); hide("divDescription"); if(document.getElementById('divReviewMain')) hide("divReviewMain"); show("divPhoto"); hide("divAddPhoto"); hide("divEvent"); hide("divMap"); showPhotoList(); checkObjHasData(0); } function AddPhotoClick() { Hide_Alert_MSG(); changeTab('tabDescription',false); if(document.getElementById('tabReview')) changeTab('tabReview',false); changeTab('tabPhoto',true); changeTab('tabEvent',false); changeTab('tabMap',false); hide("divLeft"); hide("divDescription"); if(document.getElementById('divReviewMain')) hide("divReviewMain"); show("divAddPhoto"); jQuery('#tdContent').css("border-right", "0px"); hide("divPhoto"); hide("divEvent"); hide("divMap"); hide("tdLeft"); hide("divLeft"); hide("tdRight"); hide("divRight"); checkObjHasData(0); } function MapClick() { Hide_Alert_MSG(); changeTab('tabDescription',false); if(document.getElementById('tabReview')) changeTab('tabReview',false); changeTab('tabPhoto',false); changeTab('tabEvent',false); changeTab('tabMap',true); hide("divLeft"); hide("divDescription"); if(document.getElementById('divReviewMain')) hide("divReviewMain"); hide("divPhoto"); hide("divAddPhoto"); hide("divEvent"); show("divMap"); //loadMapAjax(); if('1'!=0) { loadGoogleScript(); } else { document.getElementById('mapDiv').innerHTML = ''; document.getElementById('mapDiv').style.position=''; } checkObjHasData(0); } function MapClickForRunning(array, mapDiv) { Hide_Alert_MSG(); changeTab('tabDescription',false); if(document.getElementById('tabReview')) changeTab('tabReview',false); changeTab('tabPhoto',false); changeTab('tabEvent',false); changeTab('tabMap',true); hide("divLeft"); hide("divDescription"); if(document.getElementById('divReviewMain')) hide("divReviewMain"); hide("divPhoto"); hide("divAddPhoto"); hide("divEvent"); show("divMap"); loadRunningMap(array, mapDiv) checkObjHasData(0); } function EventClick() { Hide_Alert_MSG(); changeTab('tabDescription',false); if(document.getElementById('tabReview')) changeTab('tabReview',false); changeTab('tabPhoto',false); changeTab('tabEvent',true); changeTab('tabMap',false); hide("divLeft"); hide("divDescription"); if(document.getElementById('divReviewMain')) hide("divReviewMain"); hide("divPhoto"); hide("divAddPhoto"); show("divEvent"); hide("divMap"); var d = new Date(); var currY = d.getFullYear(); var currM = d.getMonth()+ 1; var currD = d.getDate(); LoadEvent(currY,currM,currD,0,""); monthNextPre = new Date().getMonth() + 1; yearNextPre = new Date().getFullYear(); checkObjHasData(0); } function checkObjHasData(flag) { if('1'==0) { //document.getElementById("tabMap").src = mapImageNo; } if(pIsPhoto==0) { document.getElementById("tabPhoto").src = phoImageNo; hide("divViewPhoto"); } if('0'==0) { if(document.getElementById('tabReview')) document.getElementById("tabReview").src = revImageNo; } hs1.close(); showLine(flag); } function loadMapAjax() { if(document.getElementById("mapDiv").innerHTML=='') { if ('36.07264' != 0 && '-79.79198' != 0) { show("div_Loading"); loadMap('36.07264','-79.79198','mapDiv','directions','http://rugby.isport.com/Images/Icon/ForMap/Member/MemberSport69.png'); hide("div_Loading"); } } } function showErrorMsg(control,msg) { var control = document.getElementById(control); var divSendFail = document.getElementById('divSendFail'); divSendFail.innerHTML = '
' + msg + '
'; var divFav = document.getElementById('divFav'); var width = 374; var height = 87; var left = qtek_dhtml.getLayerLeft(divFav); var top = qtek_dhtml.getLayerTop(divFav); var docwidth = qtek_dhtml.getDocumentWidth(window.document); if (left > (docwidth / 2)) left = qtek_dhtml.getLayerRight(divFav); left -= (width + 2); qtek_dhtml.setLayerSize(divSendFail, width, height); qtek_dhtml.moveLayerTo(divSendFail, left-260, top-25); qtek_dhtml.showLayer(divSendFail); fade.init('divSendFail','100','1','50','1'); if(control!=null) control.focus(); return false; } function showLine(flag) { if (flag == 0) document.getElementById('tdLeft').style.borderRightColor = '#ffffff'; else document.getElementById('tdLeft').style.borderRightColor = '#CCCCCC'; } function checkemail(str){ var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i if (filter.test(str)) return true; else return false; } function rtrim(str, chars) { chars = chars || "\\s"; return str.replace(new RegExp("[" + chars + "]+$", "g"), ""); } function PreventSpecialChar(str) { var st = str; while(st.indexOf('&')>-1) { st = st.replace('&','[***]'); } while(st.indexOf('\n')>-1) { st = st.replace('\n','[ENTER]'); } return st; } /*Show Contact Detail list*/ function showDetailList() { var container = document.getElementById('divContactDetail'); if (!container) return false; if (container.innerHTML == "") { var url = 'http://rugby.isport.com/Helpers/LoadListingsContact.aspx'; url += '?id=634086'; //container.innerHTML = ''; qtek_dhtml.showLayer(container); var loading = qtek_dhtml.getElementById('div_Loading'); qtek_dhtml.showLayer(loading); var ajax = new qtek_ajax(url + "&r=" + Math.random(), "GET"); ajax.responseContainer = container; ajax.onComplete = function() { qtek_dhtml.hideLayer(loading); }; ajax.execute(null); } } /*LoadGoogleScript*/ function loadGoogleScript() { var container = document.getElementById('divGoogleScript'); if (!container) return false; if (container.innerHTML == "") { var state = "North Carolina"; state = replaceSpecialCharater(state, "'"); var listingname = "Triad Rugby Club"; listingname = replaceSpecialCharater(listingname,"'"); var url = 'http://rugby.isport.com/Helpers/LoadGoogleScript.aspx'; //url += "?state=North Carolina&name=Triad Rugby Club" url += "?state=" + state + "&name=" + listingname; //container.innerHTML = ''; qtek_dhtml.showLayer(container); var loading = qtek_dhtml.getElementById('div_Loading'); qtek_dhtml.showLayer(loading); var ajax = new qtek_ajax(url + "&r=" + Math.random(), "GET"); ajax.responseContainer = container; ajax.onComplete = function() { loadMapAjax(); qtek_dhtml.hideLayer(loading); }; ajax.execute(null); } } function replaceSpecialCharater(str, _char) { var _return = str; while(_return.indexOf(_char) > -1) _return = _return.replace(_char,''); return _return; } /*Show photo Detail list*/ function showPhotoList() { var container = document.getElementById('divPhotoDetail'); if (!container) return false; if (container.innerHTML == "") { var url = 'http://rugby.isport.com/Helpers/LoadListingsPhoto2.aspx'; url += '?id=634086'; //container.innerHTML = ''; qtek_dhtml.showLayer(container); var loading = qtek_dhtml.getElementById('div_Loading'); qtek_dhtml.showLayer(loading); var ajax = new qtek_ajax(url + "&r=" + Math.random(), "GET"); ajax.responseContainer = container; ajax.onComplete = function() { container.style.height = 'auto'; qtek_dhtml.hideLayer(loading); var tdRight = document.getElementById("tdRight"); if(tdRight!=null) { var tdPhotoLeft = document.getElementById("tdPhotoLeft"); if(tdPhotoLeft!=null) { if(tdPhotoLeft.offsetHeight!= tdRight.offsetHeight - 38){ objToResize = (tdPhotoLeft.style) ? tdPhotoLeft.style : tdPhotoLeft; //objToResize.height = tdRight.offsetHeight + 'px'; objToResize.height = 'auto'; } } } }; ajax.execute(null); } } //////////////////////////////////////////////////CALENDAR///////////////////////////////////////////////////////////////////////////////////////////// var monthNextPre; var yearNextPre; var iNumOfSentEmail = 0; var calendarArr = new Array(); var strAffected = ""; var calendarObj = function(a,b,c) { this.month = a; this.year = b; this.content = c; } function LoadEvent(y,m,d,isLoad, straffect) { if(straffect != "") { if(strAffected == "") { strAffected = straffect; } else { var arrcurr = strAffected.split(','); var arraddin = straffect.split(','); for(var i = 0 ; i < arraddin.length;i++) { var ismatch = 0; //false for(var j = 0; j < arrcurr.length;j++) { if(arraddin[i] == arrcurr[j]){ismatch = 1;break;} } if(ismatch == 0) { strAffected += "," + arraddin[i];} } } } var DivCalendarWithEvent = getDocumentObject("DivCalendarWithEvent"); if (DivCalendarWithEvent != null && DivCalendarWithEvent.innerHTML == '') DivCalendarWithEvent.innerHTML = "
"; if(isLoad==0) { var isAffected = 0; //get array calendars (month,year) is affected by editing other event if(strAffected != "") { var arrAffected = strAffected.split(','); for (var i = 0 ; i < arrAffected.length; i++) { var monthyear = arrAffected[i]; if(monthyear != "") { var arrMonthYear = monthyear.split('|') ; if(m == arrMonthYear[0] && y == arrMonthYear[1]) { isAffected = 1;strAffected = strAffected.replace(monthyear,"").replace(",,",","); } } } } //the calendar was loaded and not affected by editing previous event if(isAffected == 0) { for(var i=0; i < calendarArr.length; i++) { if(calendarArr[i].month == m && calendarArr[i].year == y) { DivCalendarWithEvent.innerHTML = calendarArr[i].content; return; } } } //end isAffected } //end isLoad //alert("isload =" + isLoad + "isaffected = " + isAffected); //alert(strAffected); show('divAjaxWaiting'); // var loading = qtek_dhtml.getElementById('div_Loading'); // qtek_dhtml.showLayer(loading); var ajax = new qtek_ajax('http://rugby.isport.com/Helpers/Calendar.aspx' + '?directory=634086' + '&year=' + y + '&month=' + m + '&day=' + d + '&key=' + Math.random(), "GET"); ajax.responseContainer = DivCalendarWithEvent; ajax.onComplete = function() { var a=''; hide('divAjaxWaiting'); show('divCalendar'); // qtek_dhtml.hideLayer(loading); var k = 0; for(var i=0; i < calendarArr.length; i++) { if(calendarArr[i].month == m && calendarArr[i].year == y) { k = 1; break; } } if(k==0) calendarArr[calendarArr.length] = new calendarObj(m,y,DivCalendarWithEvent.innerHTML); else calendarArr[i] = new calendarObj(m,y,DivCalendarWithEvent.innerHTML); } ajax.execute(); } var directoryCalendarLoaded = false; function LoadEvent_NewStyle(reload, isOnSaveEvent) { j$('#divCalendar_NewStyle').show(); if(reload != true && directoryCalendarLoaded == true) return; directoryCalendarLoaded = true; show('divAjaxWaiting'); var DivCalendarWithEvent = getDocumentObject("DivCalendarWithEvent1"); //if (DivCalendarWithEvent.innerHTML == '') // DivCalendarWithEvent.innerHTML = "
"; //DivCalendarWithEvent.innerHTML == ''; var loading = qtek_dhtml.getElementById('div_Loading'); qtek_dhtml.showLayer(loading); if(isOnSaveEvent != 1) isOnSaveEvent = 0; j$.get('http://rugby.isport.com/Events/Ajax-Loading/DirectoryEvent.aspx' + '?directory=634086'+ '&dirType=' + directoryInfo.type + '&key=' + Math.random() +'&isOnSaveEvent=' + isOnSaveEvent, function(data){ hide('divAjaxWaiting'); qtek_dhtml.hideLayer(loading); arrEvent = []; j$('#calendar').html(''); if(isOnSaveEvent != 1) { j$('#DivCalendarWithEvent1').html(data); } else { j$('#calendar').html(data); } if( j$('#calendar').html() == '' ){ j$(data).each(function(){ if( this.nodeName.toLowerCase() == 'script'){ j$.globalEval(j$(this).html()); } }); j$(data).find('script').each(function () { j$.globalEval(j$(this).html()); }); } }); } function JumpCalendar() { var year = document.getElementById('selYear').value; var month = document.getElementById('selMonth').value; monthNextPre = month; yearNextPre = year; var day = 0; if(month == new Date().getMonth() + 1 && year== new Date().getFullYear()) day = new Date().getDate(); LoadEvent(year,month,day,0,""); } function NextPreCalendar(flag) { if(flag==0) //means pre { if(monthNextPre==1){ yearNextPre = parseInt(yearNextPre) - 1; monthNextPre = 12; } else { monthNextPre = parseInt(monthNextPre) - 1; } var day = 0; if(monthNextPre == new Date().getMonth() + 1 && yearNextPre== new Date().getFullYear()) day = new Date().getDate(); LoadEvent(yearNextPre,monthNextPre,day,0,""); } else //mean next { if(monthNextPre==12){ yearNextPre = parseInt(yearNextPre) + 1; monthNextPre = 1; } else { monthNextPre = parseInt(monthNextPre) + 1; } var day = 0; if(monthNextPre == new Date().getMonth() + 1 && yearNextPre== new Date().getFullYear()) day = new Date().getDate(); LoadEvent(yearNextPre,monthNextPre,day,0,""); } } function dayClick(y,m,d) { var idtemp = ''; var idtemp1 = ''; var currDate = new Date(); var month = currDate.getMonth() + 1 var day = currDate.getDate() var year = currDate.getFullYear() currDate = '' + month + '' + day + '' + year; for(var i=1; i<32; i++) { idtemp = '' + m+ '' + i + '' + y; idtemp1 = 'div' + m+ '' + i + '' + y; if(idtemp != currDate) { if(document.getElementById(idtemp)!= null ) { document.getElementById(idtemp).style.backgroundColor = '#ffffff'; if(document.getElementById(idtemp1)!=null) { document.getElementById(idtemp1).style.fontWeight = 'normal'; } } } } idtemp = '' + m+ '' +d+ '' + y; idtemp1 = 'div' + m+ '' +d+ '' + y; document.getElementById(idtemp).style.backgroundColor = '#E4EBF6'; document.getElementById(idtemp1).style.fontWeight = 'bold'; } function openEvent(flag, id, year, month, day, title, description, start, startTime, end, endTime, duration, repeat, publicprivate, captcha) { var txtKey = document.getElementById("txtKey"); holdevent = ""; dayClick(year,month,day); var url; var mode = 'update'; if(flag==0) { id = '634086'; url = 'http://rugby.isport.com/Helpers/AddEvent.aspx'; url += '?id=' + id + '&mode=view&year=' + year; url += '&month=' + month + '&day=' + day; // url += '&rad=' + Math.random(); if(txtKey != null) { url += '&rad=' + txtKey.value; } else { url += '&rad=' + Math.random(); } } else { if(flag==1){ mode = 'add'; id = '634086'; } if(flag == 3) { mode = 'delete'; } duration = parseInt(duration) +1; url = 'http://rugby.isport.com/Helpers/AddEvent.aspx'; url += '?id=' + id + '&mode= ' + mode + '&year=' + year; url += '&month=' + month + '&day=' + day; url += '&title=' + encodeURIComponent(title);// + '&description=' + encodeURIComponent(description); url += '&start=' + start + '&startTime=' + startTime; url += '&end=' + end + '&endTime=' + endTime; url += '&duration=' + duration + '&repeat=' + repeat; url += '&publicprivate=' + publicprivate; url += '&captcha=' + captcha; // url += '&rad=' + Math.random(); if(txtKey != null) { url += '&rad=' + txtKey.value; } else { url += '&rad=' + Math.random(); } url += '&numOfRepeat='+ document.getElementById("NumOfRepeat").value; } var desc = j$(""); desc.val(description); MOOdalBox.openPost(url, desc.serialize() ,' ', '450 570'); } function viewDetail(id,y,m,d) { var url = 'http://rugby.isport.com/Helpers/AddEvent.aspx'; url += '?id=' + id + '&mode=detail'; url += '&year=' + y + '&month=' + m + '&day=' + d; url += '&rad=' + Math.random(); MOOdalBox.open(url,' ', '450 570'); } ///////////////////////////////////////////SEND MAIL, ADDTOFAVOURITE, CONTACT EDITOR///////////////////////////////////////////////////////////////////// function OpenLink(url) { url = 'http://rugby.isport.com/Default.aspx?link=' + url; window.open(url); } function OpenOutlook(email,container) { var url = 'http://rugby.isport.com/Helpers/OpenOutlook.aspx'; url += '?email=' + email; qtek_helper.OpenOutlook(url,container); } function checkDirectorySecurity() { var key = document.getElementById("CaptchaTemp").value; var code = document.getElementById("txtCaptcha").value; if(code==""){ showErrorMsg('txtCaptcha', 'Enter captcha text before continue.
Please try again.'); return; } qtek_helper.checkDirectorySecurity('http://rugby.isport.com/Helpers/CheckDirectorySecurity.aspx' + '?code=' + code + '&key=' + key, 'divContentConfirm','divTemp','http://rugby.isport.com/rugby-clubs/add/step-1-of-3/' + '?' + 'id' + '=' + '634086'); } function openConfirmCaptcha() { var container = document.getElementById('divConfirmCaptcha'); var imgLoading = document.getElementById('imgLoading'); imgLoading.style.display = ''; var url = 'http://rugby.isport.com/Helpers/ShowCaptchaListing.aspx'; var ajax = new qtek_ajax(url, "GET"); ajax.responseContainer = container; ajax.onComplete = function() { imgLoading.style.display = 'none'; container.style.display = ''; /*for Chrome*/ var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1; if (is_chrome){ document.getElementById('txtCaptcha').value = ''; var imgSrc = document.getElementById('captchaId').src; var pos = imgSrc.indexOf('?key='); document.getElementById('CaptchaTemp').value = imgSrc.substring(pos + 5); } } ajax.execute(null); } function IsLimitSendEmail() { qtek_helper.IsLimitSendEmail('http://rugby.isport.com/Helpers/CheckLimitContactEditor.aspx','divTemp'); } function checkSendEmailToEditor() { if(!checkDataEditor()) return; var sEmailFrom = document.getElementById("txtEmailFrom").value; var sEmailContent = document.getElementById("txtEmailContent").value; var sEmailTo = ''; var sOwnerName = ""; var sName = "triad-rugby-club"; var sId = '634086'; if(isShowCaptcha == true) { qtek_helper.checkSendEmailToEditor('http://rugby.isport.com/Helpers/CheckSendEmailToEditor.aspx' + '?sId=' + sId + '&sName=' + sName + '&sOwnerName='+sOwnerName+'&sEmailFrom=' + sEmailFrom+'&sEmailTo='+ sEmailTo+'&sEmailContent='+ encodeURIComponent(sEmailContent.replace(/\n/g, '
')) + '&code=' + document.getElementById("txtCaptcha1").value , 'divSendEmail','divTemp1') } else { qtek_helper.checkSendEmailToEditor('http://rugby.isport.com/Helpers/CheckSendEmailToEditor.aspx' + '?sId=' + sId + '&sName=' + sName + '&sOwnerName='+sOwnerName+'&sEmailFrom=' + sEmailFrom+'&sEmailTo='+ sEmailTo+'&sEmailContent='+ encodeURIComponent(sEmailContent.replace(/\n/g, '
')), 'divSendEmail','divTemp1') } } //show Send Email function showSendEmail() { //Get IshowCaptcha from server by using Ajax //alert(IsLimitSendEmail()); show('divSendEmail'); if ( '' == '') { show('divCaptcha'); isShowCaptcha = true; qtek_dhtml.getElementById('divRound').style.height = '300px'; qtek_dhtml.getElementById('divInside').style.height = '300px'; } else { IsLimitSendEmail(); } } function addToFavorites(){ var url = 'http://rugby.isport.com/Directory/DynamicDetail/DynamicAddToFavorites.aspx'; url += '?idFrom=634086'; url += '&dir=121'; var ajax = new qtek_ajax(url, "GET"); //alert(url) var dvLoading = document.getElementById('div_Loading'); var dvLoadingNew=document.getElementById('divAjaxWaiting'); var container = document.getElementById('divAddFavorites'); if (dvLoading!=null) dvLoading.style.display=''; if (dvLoadingNew!=null) dvLoadingNew.style.display=''; ajax.responseContainer = container; ajax.onComplete = function() { if(container.innerHTML == "FAIL") { location = "http://rugby.isport.com/login/" return; } var result = container.innerHTML.substring(0,1); if (dvLoading!=null) dvLoading.style.display='none'; if (dvLoadingNew!=null) dvLoadingNew.style.display='none'; if(result=="1") FadeDynamicContent('c_add_y_favourite','dir',container.innerHTML.substring(1),'pass',position_mess_ListingDetail); else if (result=="0") FadeDynamicContent('d_add_y_favourite_exists','dir',container.innerHTML.substring(1),'fail',position_mess_ListingDetail); else FadeMessage('c_fail_processdata','fail',position_mess_ListingDetail); } ajax.execute(null); } function openSendEmail(flag,yourname,youremail,yourfriendemail,subject,message,code,hidTimecode) { holdemail = ""; var url; var listingname = "Triad Rugby Club"; listingname = replaceSpecialCharater(listingname,"'"); if(flag==0) { url = 'http://rugby.isport.com/Directory/DynamicDetail/DynamicSendMail.aspx'; url += "?mode=input&name=" + listingname + "&link=" + yourname; } else { url = 'http://rugby.isport.com/Directory/DynamicDetail/DynamicSendMail.aspx'; url += "?id=634086&country=USA&mode=send&name=" + listingname; url += "&yourname=" + yourname + "&youremail=" + youremail + "&yourfriendemail=" + yourfriendemail; url += "&subject=" + subject + "&message=" + message + "&dir=121" + "&seo=rugby-clubs"; url+="&code="+code; url+="&hidTimecode="+hidTimecode; } MOOdalBox.open(url,' ', '750 850'); } function getDirections() { var from = document.getElementById("mapaddress").value + " " + document.getElementById("mapcity").value + " " + document.getElementById("mapstate").value + " " + document.getElementById("mapzip").value ; setDirections(from,'36.07264, -79.79198','en_US'); } /////////////////////////////////////////////////REVIEW//////////////////////////////////////////////////////////////////////////////////////////////// var page = 1; function showReviewList(action,pageindex) { var content = ''; if(action=="add"){ var rateNo = document.getElementById('rateNo').value; content = encodeURIComponent(document.getElementById('textareaReview').value.replace('&','[***]')); if (trim(content)=="") { Show_Alert_MSG('textareaReview',0,0,'Please enter a review.'); document.getElementById('textareaReview').focus(); return; } if(checkHavingBadWord(content)) { Show_Alert_MSG('textareaReview',0,0,'The comment contains words or phrases which are not allowed.
Please try again.'); document.getElementById('textareaReview').focus(); return ; } if ((content.indexOf('<') > -1 || content.indexOf('>')>-1)) { Show_Alert_MSG('textareaReview',0,0,'Please do not include "<" or ">" in your review!'); document.getElementById('textareaReview').focus(); return; } if(rateNo == "0") { Show_Alert_MSG('divRateNo',0,0,'Please rate for this listing!'); return; } } if (action =="add") pageindex = page; else if (action =="list")page = pageindex; content = PreventSpecialChar(content); var url = 'http://rugby.isport.com/Directory/DynamicDetail/DynamicReviewHandler.aspx'; url += '?id=634086'; url += '&action=' + action + '&pageIndex=' + pageindex + '&dir=pool'; url += '&content=' + content+ '&rateNo=' + rateNo + '&r=' + Math.random(); ListingAjax.Ajax_ReviewList(action,url,'divReview'); } function addVote(rate) { click_star(rate); var rateNo = document.getElementById('rateNo'); if(rateNo!=null) rateNo.value = rate; Hide_Alert_MSG() /*click_star(rate); var url = 'http://rugby.isport.com/Directory/DynamicDetail/DynamicReviewHandler.aspx'; url += '?id=634086'; url += '&action=addVote&rate=' + rate + '&dir=121&r=' + Math.random() ; qtek_helper.addVoteReview(url,'divVote'); url = 'http://rugby.isport.com/Directory/DynamicDetail/DynamicReviewHandler.aspx'; url += '?id=634086'; url += '&action=loadVote&dir=121&r=' + Math.random() ; qtek_helper.loadVoteReview(url,'divStarHead');*/ } function ShowHideDiv(name) { if('-9223372036854775808'=='-9223372036854775808'){ location = 'http://rugby.isport.com/createaccount/?requireAcc=&from=listing' }else{ var div = document.getElementById(name); if(div.style.display == 'none') { Slide(name,{duration : 0}).down(); }else{ Slide(name,{duration : 0}).up(); } } } function OpenSlideDiv(name) { if('-9223372036854775808'=='-9223372036854775808'){ location = 'http://rugby.isport.com/createaccount/?requireAcc=&from=listing' }else{ Slide(name,{duration : 0}).down(); } } ////////////////////////////////////////////////RELATIONSHIP///////////////////////////////////////////////////////////////////////////////////////////// function showRelationshipList2(mode,type) { qtek_helper.url_SignUp = "http://rugby.isport.com/login/"; var url = 'http://rugby.isport.com/Directory/DynamicDetail/DynamicRelationship.aspx'; url += '?id=634086'; url += '&dir=121'; url += '&action=' + mode; url += '&type=' + type; url += '&r=' + Math.random(); ListingAjax.Ajax_RelationshipList(url,'divRelationship',mode); } function showAllRelationshipList(idx) { var url = 'http://rugby.isport.com/Directory/DynamicDetail/DynamicLoadAllRelationship.aspx' ; url += '?id=634086'; url += '&dir=121'; url += '&idx=' + idx; url += '&r=' + Math.random(); MOOdalBox.open(url,' ', '670 580'); } function showIntructorPoolList(mode) { var url = 'http://rugby.isport.com/Helpers/InstructorPoolHelper.aspx'; url += '?id=634086'; url += '&action=' + mode; url += '&dir=121'; url += '&r=' + Math.random(); qtek_helper.showIntructorPoolList(url,'divIntructorPool'); } function showAllIntructorPoolList(idx) { var url = 'http://rugby.isport.com/Helpers/LoadAllIntructorPoolHelper.aspx'; url += '?id=634086'; url += '&idx=' + idx; url += '&r=' + Math.random(); MOOdalBox.open(url,' ', '690 750'); } function showInstructorDetail(id,contain,div, IsAdded) { var url = 'http://rugby.isport.com/Helpers/LessonPoolDetail.aspx'; url += '?plId=' + id; url += '&r=' + Math.random(); qtek_helper.showInstructorDetail(url,contain,div,IsAdded); } function showInstructorDetailForMoodal(id,contain,div, IsAdded) { var url = 'http://rugby.isport.com/Helpers/LessonPoolDetail.aspx'; url += '?plId=' + id; url += '&r=' + Math.random(); qtek_helper.showInstructorDetailForMoodal(url,contain,div,IsAdded); } ///////////////////////////////////////////////////////////////COMMENT//////////////////////////////////////////////////////////////////////////////////// function showCommentList() { if(document.getElementById('content').value.indexOf('')>-1 ||document.getElementById('content').value.indexOf('<\scr' + 'ipt>')>-1) { Show_Alert_MSG('content',0,0,'Please do not include script tag in your input'); document.getElementById('content').focus(); return; } var content = document.getElementById('content').value.replace('&','[***]'); if (trim(content)=="") { Show_Alert_MSG('content',0,0,'Please enter Comments.'); document.getElementById('content').focus(); return; } if(checkHavingBadWord(content)) { Show_Alert_MSG('content',0,0,'The comment contains words or phrases which are not allowed.\nPlease try again.'); document.getElementById('content').focus(); return ; } if (content.indexOf('<') > -1 || content.indexOf('>')>-1) { Show_Alert_MSG('content',0,0,'Please do not include "<" or ">" in your comment!'); document.getElementById('content').focus(); return; } var url = 'http://rugby.isport.com/Directory/DynamicDetail/DynamicAddComment.aspx'; url += '?id=634086'; url += '&action=add&dir=121'; url += '&content=' + encodeURIComponent(content.replace(/\n/g, '
')); ListingAjax.Ajax_showCommentList(url,'divComment',1,1,'post'); document.getElementById('content').value = ""; } function showAllCommentList(index) { var url = 'http://rugby.isport.com/Directory/DynamicDetail/DynamicAddComment.aspx'; url += '?id=634086'; ListingAjax.Ajax_showCommentList(url,'divComment',index,0,'viewall'); } ////////////////////////////////////////////////////////////PHOTO////////////////////////////////////////////////////////////////////////////////////// function openImage(pic,count) { window.showImage(count); } function openReportComment(flag, commentid ,category,message) { var url; if(flag==0) { url = 'http://rugby.isport.com/Helpers/ReportListingPhoto.aspx'; url += '?commentid=' + commentid + '&photoid=0&mode=input'; url += '&key=' + Math.random(); } else { url = 'http://rugby.isport.com/Helpers/ReportListingPhoto.aspx'; url += '?commentid=' + commentid + '&photoid=0&mode=send'; url += "&category=" + category + "&message=" + message; url += '&key=' + Math.random(); } MOOdalBox.open(url,' ', '668 555'); } function checkdatereportcomment(theFrom, commentid) { theFrom = document.getElementById(theFrom); var category = theFrom.category; var message = theFrom.txtReport; if(!PreventScriptInput()) {return false;} if (category.selectedIndex <= 0) { ///Show_Alert_MSG(theFrom.category,0,0,"Please choose your report type.",566,536); document.getElementById('dvCb111').style.display=''; jQuery('#dvCb111') .show(); jQuery('#dvCb111 div').show(); category.focus(); return (false); } if(message.value == '') { /// Show_Alert_MSG(theFrom.txtReport,0,0,"Please enter content of report."); document.getElementById('dvContent111').style.display=''; jQuery('#dvContent111').show(); jQuery('#dvContent111 dv').show(); jQuery('#dvContent111_1').show(); jQuery('#dvContent111_2').show(); jQuery('#dvContent111_3').show(); jQuery('#dvContent111_4').show(); jQuery('#dvContent111_5').show(); jQuery('#dvContent111_6').show(); message.focus(); return (false); } openReportComment(1,commentid,category.value,PreventSpecialChar(message.value)); }