﻿
//google.load('search', '1');
//google.setOnLoadCallback(function () {
//    google.search.CustomSearchControl.attachAutoCompletion(
//      '007612021324460861531:v_bggjdy8xs',
//      document.getElementById('q'),
//      'cse-search-box');
//});

//var googleSearchIframeName = "cse-search-results";
//var googleSearchFormName = "cse-search-box";
//var googleSearchFrameWidth = 600;
//var googleSearchDomain = "www.google.com";
//var googleSearchPath = "/cse";

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

try {
    var pageTracker = _gat._getTracker("UA-3543582-4");
    pageTracker._trackPageview();
} catch (err) { }

function previous_Click() {
    var roundNo = parseInt(hfMaster.Get('RoundNo'));
   
    if (roundNo != 1) {
        roundNo -= 1;
        hfMaster.Set('RoundNo', roundNo);
        callbkPnlFixtures.PerformCallback(roundNo);
    }
}

function next_Click() {
    var roundNo = parseInt(hfMaster.Get('RoundNo'));
    if (roundNo != 26) {
        roundNo += 1;
        hfMaster.Set('RoundNo', roundNo);
        callbkPnlFixtures.PerformCallback(roundNo);
    }
}

function SubmitOnEnter() {
    try {
        var keycode;
        if (window.event)
            keycode = window.event.keyCode;
        else
            return ;
        if (keycode == 13) {
            document.getElementsByName('ctl00$btnSearch')[0].click();
            return false;
        }
        else
            return true;
    } catch (Error) { }
}

//function URLEncode (clearString) {
//  var output = '';
//  var x = 0;
//  clearString = clearString.toString();
//  var regex = /(^[a-zA-Z0-9_.]*)/;
//  while (x < clearString.length) {
//    var match = regex.exec(clearString.substr(x));
//    if (match != null && match.length > 1 && match[1] != '') {
//    	output += match[1];
//      x += match[1].length;
//    } else {
//      if (clearString[x] == ' ')
//        output += '+';
//      else {
//        var charCode = clearString.charCodeAt(x);
//        var hexVal = charCode.toString(16);
//        output += '%' + ( hexVal.length < 2 ? '0' : '' ) + hexVal.toUpperCase();
//      }
//      x++;
//    }
//  }
//  return output;
//}

//function SubmitOnEnter(myfield, e)
//{
//	var keycode;
//	if (window.event)
//		keycode = window.event.keyCode;
//	else if (e)
//		keycode = e.which;
//	else
//		return true;
//	if (keycode == 13)
//	{
//		SearchSite();
//		return false;
//	}
//	else
//		return true;
//}
//function SearchSite()
//{
//    document.location.href = 'search.aspx?cx=007612021324460861531%3Av_bggjdy8xs&cof=FORID%3A9&ie=UTF-8&q=' +
//escape(document.getElementById('q').value) + '&sa=Search';
//}
