 function are_cookies_enabled(url){
		
		var cookieEnabled = (window.navigator.cookieEnabled) ? true : false;
		if (typeof window.navigator.cookieEnabled == "undefined" && !cookieEnabled)
		{
			document.cookie="testcookie";
			cookieEnabled = (document.cookie.indexOf("testcookie") != -1) ? true : false;
		}
		if(cookieEnabled == false)
		{
			window.open('/jsps/shop/templates/common/nocookie.jsp','_self');
		}else{
			window.open(url,'_self');
		}
		
	}

	 function are_cookies_enabled_Popup(url){
		
		var cookieEnabled = (window.navigator.cookieEnabled) ? true : false;
		if (typeof window.navigator.cookieEnabled == "undefined" && !cookieEnabled)
		{
			document.cookie="testcookie";
			cookieEnabled = (document.cookie.indexOf("testcookie") != -1) ? true : false;
		}
		if(cookieEnabled == false)
		{
			window.opener.location.href='/jsps/shop/templates/common/nocookie.jsp';
		}else{
			window.opener.location.href=url;
			
		}
		self.close();
	}

                
          function Get_Cookie(name) 
          {
                var start = document.cookie.indexOf(name + "=");
                var len   = start + name.length + 1;
                if ((!start) && (name != document.cookie.substring(0, name.length))) return null;
                if (start == -1) return null;
                var end = document.cookie.indexOf(";", len);
                if (end == -1) end = document.cookie.length;
                return unescape(document.cookie.substring(len, end));
          }
                
          // expires-(defaults to end of current session)/domain-(defaults to domain of calling document)
          // secure-  Boolean value indicating if the cookie transmission requires a secure transmission
          function Set_Cookie(name, value, expires, path, domain, secure)
          {
                document.cookie = name + "=" + escape(value) + 
                ( (expires) ? ";expires=" + expires.toGMTString() : "") +
                ( (path)    ? ";path=" + path : "") +
                ( (domain)  ? ";domain=" + domain : "" ) +
                ( (secure)  ? ";secure" : "" );
          }

 
var Brly = {
 
	// private property
	_trkn : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
 
	// public method for encoding
	grp : function (input) {
		var output = "";
		var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
		var i = 0;
 
		input = Brly._utf8_grp(input);
 
		while (i < input.length) {
 
			chr1 = input.charCodeAt(i++);
			chr2 = input.charCodeAt(i++);
			chr3 = input.charCodeAt(i++);
 
			enc1 = chr1 >> 2;
			enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
			enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
			enc4 = chr3 & 63;
 
			if (isNaN(chr2)) {
				enc3 = enc4 = 64;
			} else if (isNaN(chr3)) {
				enc4 = 64;
			}
 
			output = output +
			this._trkn.charAt(enc1) + this._trkn.charAt(enc2) +
			this._trkn.charAt(enc3) + this._trkn.charAt(enc4);
 
		}
 
		return output;
	},
 
	// public method for decoding
	grpu : function (input) {
		var output = "";
		var chr1, chr2, chr3;
		var enc1, enc2, enc3, enc4;
		var i = 0;
 
		input = input.replace(/[^A-Za-z0-9]/g, "");
 
		while (i < input.length) {
 
			enc1 = this._trkn.indexOf(input.charAt(i++));
			enc2 = this._trkn.indexOf(input.charAt(i++));
			enc3 = this._trkn.indexOf(input.charAt(i++));
			enc4 = this._trkn.indexOf(input.charAt(i++));
 
			chr1 = (enc1 << 2) | (enc2 >> 4);
			chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
			chr3 = ((enc3 & 3) << 6) | enc4;
 
			output = output + String.fromCharCode(chr1);
 
			if (enc3 != 64) {
				output = output + String.fromCharCode(chr2);
			}
			if (enc4 != 64) {
				output = output + String.fromCharCode(chr3);
			}
 
		}
 
		output = Brly._utf8_grpu(output);
 
		return output;
 
	},
 
	// private method for UTF-8 encoding
	_utf8_grp : function (string) {
		string = string.replace(/\r\n/g,"\n");
		var utftext = "";
 
		for (var n = 0; n < string.length; n++) {
 
			var c = string.charCodeAt(n);
 
			if (c < 128) {
				utftext += String.fromCharCode(c);
			}
			else if((c > 127) && (c < 2048)) {
				utftext += String.fromCharCode((c >> 6) | 192);
				utftext += String.fromCharCode((c & 63) | 128);
			}
			else {
				utftext += String.fromCharCode((c >> 12) | 224);
				utftext += String.fromCharCode(((c >> 6) & 63) | 128);
				utftext += String.fromCharCode((c & 63) | 128);
			}
 
		}
 
		return utftext;
	},
 
	// private method for UTF-8 decoding
	_utf8_grpu : function (utftext) {
		var string = "";
		var i = 0;
		var c = c1 = c2 = 0;
 
		while ( i < utftext.length ) {
 
			c = utftext.charCodeAt(i);
 
			if (c < 128) {
				string += String.fromCharCode(c);
				i++;
			}
			else if((c > 191) && (c < 224)) {
				c2 = utftext.charCodeAt(i+1);
				string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
				i += 2;
			}
			else {
				c2 = utftext.charCodeAt(i+1);
				c3 = utftext.charCodeAt(i+2);
				string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
				i += 3;
			}
 
		}
 
		return string;
	}
 
}
function getQueryVariable(variable) {
  var query = window.location.search.substring(1);
  var vars = query.split("&");
  for (var i=0;i<vars.length;i++) {
    var pair = vars[i].split("=");
    if (pair[0] == variable) {
      return pair[1];
    }
  }
} 

function bat() 
{
  var nd = new Date();
  var ndt= nd.getTime();
  var xx = Brly.grp(ndt.toString());
  return xx;
}

function varint()
{
  return 300000;
}
function getprgrm()
{
  return 'myprogram';
}
