//======================================================================================== //## //======================================================================================== function SwitchTab(obj, service, tab_cont_class) { $('.' + tab_cont_class).hide(); $("a[id='" + obj.id + "']").removeClass("tabbed"); $("a[id='" + obj.id + "']").addClass("tab"); $(obj).removeClass("tab"); $(obj).addClass("tabbed"); $('#' + tab_cont_class + service).show(); return false; } //======================================================================================== //## //=============================================================================== function getElementByMy(name) { curElement = document.getElementById(name); if (! curElement) { //curElement = document.all[name]; if (document.frm) { curElement = document.frm[name]; } else { curElement = document.frm1[name]; } } return curElement; } //=============================================================================== function getElementByMy1(name) { curElement = document.getElementById(name); if (! curElement) { //curElement = document.elements[name]; //curElement = document.frm1.elements[name]; cform = document.frm1; //curElement = cform.elements[name]; for (var i=0;i0) { alert("Please fill all required (*) fields"); return false; } else { return true; } } //======================================================================================== function CheckFields(ta) { d = ' | '; var err = 0; for (var i=0;i0) { alert("Please fill in all required (*) fields"); return false; } else { return true; } } //======================================================================================== function SubmitAction(act, id) { //, id, cpos_null //Alert('a'); document.frm.substep.value = act; document.frm.id.value = id; //if (cpos_null>0) { // frm.cpos.value = 0; //} document.frm.submit(); } //======================================================================================== function SubmitMenuActionCookie() { var ma = getCookie('menu_action'); if (ma) { setCookie('menu_action', ''); SubmitAction1(ma); } } //======================================================================================== function SubmitAction1Cookie() { //if (window.location.toString().indexOf('#add')) { if (getCookie('sf_need')) { setCookie('sf_need', ''); SubmitAction1('add_form'); } //} } //======================================================================================== function SubmitAction1(act, id) { //, id, cpos_null document.frm1.substep.value = act; document.frm1.id.value = id; if ((act=='del') && (window.confirm('Delete item ?') != true)) { return; } document.frm1.submit(); } //======================================================================================== function SubmitAction2(act, id) { //, id, cpos_null document.frm1.substep.value = act; document.frm1.id.value = id; document.frm1.cpos.value = 0; if ((act=='del') && (window.confirm('Delete item ?') != true)) { return; } document.frm1.submit(); } //======================================================================================== function CheckAll() { frm=document.frm1; for (var i=0;i //======================================================================================== function BNextClick() { document.getElementById('top3_' + bcurr).style.display = 'none'; bcurr++; if (bcurr>=bmax) bcurr = 0; document.getElementById('top3_' + bcurr).style.display = 'block'; } //======================================================================================== function BPrevClick() { document.getElementById('top3_' + bcurr).style.display = 'none'; bcurr--; if (bcurr<0) bcurr = bmax-1; document.getElementById('top3_' + bcurr).style.display = 'block'; } //======================================================================================== //## //======================================================================================== function MySearch(obj) { re = / /gi; if (obj.keyword.value == '') obj.keyword.value = 'all'; kv = obj.keyword.value.replace(re, "+"); kv = kv.toLowerCase(); url = 'http://www.wheretobet.com/tag' + '/' + kv + '/'; //alert(url); window.location = url; return false; } //======================================================================================== function MySearch1(obj) { re = / /gi; if (obj.keyword.value == '') obj.keyword.value = 'all'; kv = obj.keyword.value.replace(re, "+"); kv = kv.toLowerCase(); //sv = obj.sservices.value.toLowerCase(); sv = obj.sservices.value; sv = sv.toLowerCase(); //sc = obj.scategory.value.toLowerCase(); sc = obj.scategory.value; sc = sc.toLowerCase(); url = 'http://www.wheretobet.com/tag' + '/' + sc + '/' + sv + '/' + kv + '/' + '0/' ; //alert(url); window.location = url; return false; } //======================================================================================== //## //======================================================================================== function FillSelect(sel, arr) { if (sel) { for (var i = 0; i < sel.options.length; i++) { sel.options[i] = null; } for (var i = 0; i < arr.length; i=i+2) { sel.options[i/2] = new Option(arr[i+1], arr[i]); } } } //======================================================================================== function v(str) { alert(str); } //======================================================================================== function print_r(theObj){ if( theObj.constructor == Array || theObj.constructor == Object ) { document.write("
    ") for(var p in theObj){ if(theObj[p].constructor == Array|| theObj[p].constructor == Object){ document.write("
  • ["+p+"] => "+typeof(theObj)+"
  • "); document.write("
      ") print_r(theObj[p]); document.write("
    ") } else { document.write("
  • ["+p+"] => "+theObj[p]+"
  • "); } } document.write("
") } else { document.write("
  • "+theObj+"
  • "); } } //========================================================================================