
if (!this.JSON) {
    JSON = function () {
        function f(n) {
            return n < 10 ? '0' + n : n;
        }

        Date.prototype.toJSON = function (key) {

            return this.getUTCFullYear()   + '-' +
                 f(this.getUTCMonth() + 1) + '-' +
                 f(this.getUTCDate())      + 'T' +
                 f(this.getUTCHours())     + ':' +
                 f(this.getUTCMinutes())   + ':' +
                 f(this.getUTCSeconds())   + 'Z';
        };

        var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
            escapeable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
            gap,
            indent,
            meta = {   
                '\b': '\\b',
                '\t': '\\t',
                '\n': '\\n',
                '\f': '\\f',
                '\r': '\\r',
                '"' : '\\"',
                '\\': '\\\\'
            },
            rep;


        function quote(string) {
            escapeable.lastIndex = 0;
            return escapeable.test(string) ?
                '"' + string.replace(escapeable, function (a) {
                    var c = meta[a];
                    if (typeof c === 'string') {
                        return c;
                    }
                    return '\\u' + ('0000' +
                            (+(a.charCodeAt(0))).toString(16)).slice(-4);
                }) + '"' :
                '"' + string + '"';
        }


        function str(key, holder) {


            var i,   
                k,          
                v,          
                length,
                mind = gap,
                partial,
                value = holder[key];



            if (value && typeof value === 'object' &&
                    typeof value.toJSON === 'function') {
                value = value.toJSON(key);
            }




            if (typeof rep === 'function') {
                value = rep.call(holder, key, value);
            }



            switch (typeof value) {
            case 'string':
                return quote(value);

            case 'number':



                return isFinite(value) ? String(value) : 'null';

            case 'boolean':
            case 'null':





                return String(value);




            case 'object':




                if (!value) {
                    return 'null';
                }



                gap += indent;
                partial = [];



                if (typeof value.length === 'number' &&
                        !(value.propertyIsEnumerable('length'))) {




                    length = value.length;
                    for (i = 0; i < length; i += 1) {
                        partial[i] = str(i, value) || 'null';
                    }




                    v = partial.length === 0 ? '[]' :
                        gap ? '[\n' + gap +
                                partial.join(',\n' + gap) + '\n' +
                                    mind + ']' :
                              '[' + partial.join(',') + ']';
                    gap = mind;
                    return v;
                }



                if (rep && typeof rep === 'object') {
                    length = rep.length;
                    for (i = 0; i < length; i += 1) {
                        k = rep[i];
                        if (typeof k === 'string') {
                            v = str(k, value, rep);
                            if (v) {
                                partial.push(quote(k) + (gap ? ': ' : ':') + v);
                            }
                        }
                    }
                } else {



                    for (k in value) {
                        if (Object.hasOwnProperty.call(value, k)) {
                            v = str(k, value, rep);
                            if (v) {
                                partial.push(quote(k) + (gap ? ': ' : ':') + v);
                            }
                        }
                    }
                }




                v = partial.length === 0 ? '{}' :
                    gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' +
                            mind + '}' : '{' + partial.join(',') + '}';
                gap = mind;
                return v;
            }
        }



        return {
            stringify: function (value, replacer, space) {







                var i;
                gap = '';
                indent = '';




                if (typeof space === 'number') {
                    for (i = 0; i < space; i += 1) {
                        indent += ' ';
                    }



                } else if (typeof space === 'string') {
                    indent = space;
                }




                rep = replacer;
                if (replacer && typeof replacer !== 'function' &&
                        (typeof replacer !== 'object' ||
                         typeof replacer.length !== 'number')) {
                    throw new Error('JSON.stringify');
                }




                return str('', {'': value});
            },


            parse: function (text, reviver) {




                var j;

                function walk(holder, key) {




                    var k, v, value = holder[key];
                    if (value && typeof value === 'object') {
                        for (k in value) {
                            if (Object.hasOwnProperty.call(value, k)) {
                                v = walk(value, k);
                                if (v !== undefined) {
                                    value[k] = v;
                                } else {
                                    delete value[k];
                                }
                            }
                        }
                    }
                    return reviver.call(holder, key, value);
                }






                cx.lastIndex = 0;
                if (cx.test(text)) {
                    text = text.replace(cx, function (a) {
                        return '\\u' + ('0000' +
                                (+(a.charCodeAt(0))).toString(16)).slice(-4);
                    });
                }














                if (/^[\],:{}\s]*$/.
test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@').
replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']').
replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {






                    j = eval('(' + text + ')');




                    return typeof reviver === 'function' ?
                        walk({'': j}, '') : j;
                }



                throw new SyntaxError('JSON.parse');
            }
        };
    }();
}

jQuery.cookie = function(name, value, options) {
    if (typeof value != 'undefined') { 
        options = options || {};
        if (value === null) {
            value = '';
            options.expires = -1;
        }
        var expires = '';
        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
            var date;
            if (typeof options.expires == 'number') {
                date = new Date();
                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
            } else {
                date = options.expires;
            }
            expires = '; expires=' + date.toUTCString(); 
        }
        
        
        
        var path = options.path ? '; path=' + (options.path) : '';
        var domain = options.domain ? '; domain=' + (options.domain) : '';
        var secure = options.secure ? '; secure' : '';
        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
    } else { 
        var cookieValue = null;
        if (document.cookie && document.cookie != '') {
            var cookies = document.cookie.split(';');
            for (var i = 0; i < cookies.length; i++) {
                var cookie = jQuery.trim(cookies[i]);
                
                if (cookie.substring(0, name.length + 1) == (name + '=')) {
                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
                    break;
                }
            }
        }
        return cookieValue;
    }
};



(function ($) {
	var isObject = function (x) {
		return (typeof x === 'object') && !(x instanceof Array) && (x !== null);
	};
	
	$.extend({
		getJSONCookie: function (cookieName) {
			var cookieData = $.cookie(cookieName);
			return cookieData ? JSON.parse(cookieData) : {};
		},
		setJSONCookie: function (cookieName, data, options) {
			var cookieData = '';
			
			options = $.extend({
				expires: 0,
				path: '/'
			}, options);
			
			if (!isObject(data)) {
				throw new Error('JSONCookie data must be an object');
			}
			
			cookieData = JSON.stringify(data);
			
			return $.cookie(cookieName, cookieData, options);
		},
		removeJSONCookie: function (cookieName) {
			return $.cookie(cookieName, null);
		},
		JSONCookie: function (cookieName, data, options) {
			if (data) {
				$.setJSONCookie(cookieName, data, options);
			}
			return $.getJSONCookie(cookieName);
		}
	});
})(jQuery);


var jsonCookie = {
	jsonName:'cnolniccart',
	jsonNum:'cnolniccartnum',
	jsonId:'cnolniccartid',
	store:function(cart_productid,cart_bandtype,cart_chname,cart_email,cart_telephone){                                
		var num = jsonCookie.getNum();
		var json = jsonCookie.getJson();
		var id = jsonCookie.getId();
		var json = jsonCookie.getJson();
		jQuery.each(json,function(i,v){
			id=v.id;
		})
		id++;
		if(!json[id]){
			json[id] = {};
			json[id].id=id;     
			json[id].cart_productid=cart_productid;     
			json[id].cart_bandtype=cart_bandtype;     
			json[id].cart_chname=cart_chname;     
			json[id].cart_email=cart_email;     
			json[id].cart_telephone= cart_telephone;     
			num++;
			jQuery.JSONCookie(jsonCookie.jsonName,json);
			jQuery.cookie(jsonCookie.jsonNum,num,{path: '/'});   
			jQuery.cookie(jsonCookie.jsonId,id,{path: '/'});                                       
		}
		return true;
	},
	store2:function(num_id){
		var productid;
		var bandtype;
		var num = jsonCookie.getNum();
		var json = jsonCookie.getJson();
		var id = jsonCookie.getId();
		var json = jsonCookie.getJson();
		jQuery.each(json,function(i,v){
			id=v.id;
		})
		switch (num_id)
		{
		    case '11':
			      productid = 155;
			      bandtype = -1;
			      break;
		   case '12':
			      productid = 27;
			      bandtype = -1;
			      break;
		   case '13':
			      productid = 28;
			      bandtype = -1;
			      break;
		   case '14':
			      productid = 29;
			      bandtype = -1;
			      break;
		   case '21':
			      productid = 4;
			      bandtype = -1;
			      break;
		   case '22':
			      productid = 1;
			      bandtype = -1;
			      break;
		   case '23':
			      productid = 5;
			      bandtype = -1;
			      break;
		   case '24':
			      productid = 9;
			      bandtype = -1;
			      break;
		   case '25':
			      productid = 10;
			      bandtype = -1;
			      break;
		   case '31':
			      productid = 6;
			      bandtype = -1;
			      break;
		   case '32':
			      productid = 6;
			      bandtype = -1;
			      break;
		   case '33':
			      productid = 6;
			      bandtype = -1;
			      break;
		   case '34':
			      productid = 2;
			      bandtype = -1;
			      break;
		   case '35':
			      productid = 2;
			      bandtype = -1;
			      break;
		   case '36':
			      productid = 54;
			      bandtype = -1;
			      break;
		   case '41':
			      productid = 13;
			      bandtype = -1;
			      break;
		   case '42':
			      productid = 35;
			      bandtype = -1;
			      break;
		   case '43':
			      productid = 36;
			      bandtype = -1;
			      break;
		   case '44':
			      productid = 34;
			      bandtype = -1;
			      break;
		   case '51':
			      productid = 21;
			      bandtype = 1;
			      break;
		   case '52':
			      productid = 22;
			      bandtype = 1;
			      break;
		   case '53':
			      productid = 23;
			      bandtype = 1;
			      break;
		   case '54':
			      productid = 83;
			      bandtype = 1;
			      break;
		   case '61':
			      productid = 21;
			      bandtype = 2;
			      break;
		   case '62':
			      productid = 22;
			      bandtype = 2;
			      break;
		   case '63':
			      productid = 23;
			      bandtype = 2;
			      break;
		   case '64':
			      productid = 83;
			      bandtype = 2;
			      break;
		   case '71':
			      productid = 39;
			      bandtype = 1;
			      break;
		   case '72':
			      productid = 40;
			      bandtype = 1;
			      break;
		   case '73':
			      productid = 41;
			      bandtype = 1;
			      break;
		   case '81':
			      productid = 39;
			      bandtype = 2;
			      break;
		   case '82':
			      productid = 40;
			      bandtype = 2;
			      break;
		   case '83':
			      productid = 41;
			      bandtype = 2;
			      break;
		   case '84':
			      productid = 124;
			      bandtype = 2;
			      break;
		   case '85':
			      productid = 125;
			      bandtype = 2;
			      break;
		   case '91':
			      productid = 22;
			      bandtype = 4;
			      break;
		   case '92':
			      productid = 23;
			      bandtype = 4;
			      break;
		   case '93':
			      productid = 83;
			      bandtype = 4;
			      break;
		   case '94':
			      productid = 39;
			      bandtype = 4;
			      break;
		   case '95':
			      productid = 41;
			      bandtype = 4;
			      break;
		   case '101':
			      productid = 97;
			      bandtype = 2;
			      break;
		   case '102':
			      productid = 97;
			      bandtype = 3;
			      break;
		   case '103':
			      productid = 97;
			      bandtype = 4;
			      break;
		   case '111':
			      productid = 48;
			      bandtype = -1;
			      break;
		   case '112':
			      productid = 79;
			      bandtype = -1;
			      break;
		  }

			id++;
			if(!json[id]){
				json[id] = {};
				json[id].id=id;     
				json[id].cart_productid=productid;     
				json[id].cart_bandtype=bandtype;     
			json[id].cart_chname="";     
			json[id].cart_email="";     
			json[id].cart_telephone="";     
			num++;
			jQuery.JSONCookie(jsonCookie.jsonName,json);
			jQuery.cookie(jsonCookie.jsonNum,num,{path: '/'});   
			jQuery.cookie(jsonCookie.jsonId,id,{path: '/'});                                       
		}
		return true;
	},



	
	remove:function(id){
		var num = jsonCookie.getNum();
		var json = jsonCookie.getJson();
		if(json[id]){
			delete json[id];
			num--;
			jQuery.JSONCookie(jsonCookie.jsonName,json);
			jQuery.cookie(jsonCookie.jsonNum,num,{path: '/'});   
		}
	},
	modify:function(id,key,value){
		var json = jsonCookie.getJson();
		if(json[id]){
			json[id][key] = value;
			jQuery.JSONCookie(jsonCookie.jsonName,json);
		}
	},
	getJson:function(){
		var json = jQuery.JSONCookie(jsonCookie.jsonName);
		return (json == null) ? {} : json;
	},
	getNum:function(){
		var num = jQuery.cookie(jsonCookie.jsonNum);
		return (num == null) ? 0 : num;
	},
	getId:function(){
		var id = jQuery.cookie(jsonCookie.jsonId);
		return (id == null) ? 0 : id;
	}
}
function getproductnamebyproductid(productid,bandtype){
	var productname="";
	if(productid=="155")
		productname="免费空间实用型";
	if(productid=="27")
		productname="个人用户实用型";
	if(productid=="28")
		productname="企业用户基本型";
	if(productid=="29")
		productname="企业用户豪华型";
	if(productid=="48")
		productname="google国内推广";
	if(productid=="79")
		productname="google出口易";
	if(productid=="1")
		productname="国际英文域名";
	if(productid=="2")
		productname="国际中文域名";
	if(productid=="4")
		productname="中国英文域名";
	if(productid=="5")
		productname=".cc国际域名";
	if(productid=="9")
		productname=".biz国际域名";
	if(productid=="10")
		productname=".info国际域名";
	if(productid=="21")
	{
		if(bandtype=="1")
			productname="M睿机-入门型单线";
		else if(bandtype=="2")
			productname="M睿机-入门型双线";
	}
	if(productid=="22")
	{
		if(bandtype=="1")
			productname="M睿机-普及型单线";
		else if(bandtype=="2")
			productname="M睿机-普及型双线";
		else if(bandtype=="4")
			productname="海外睿机-入门型";
	}
	if(productid=="23")
	{
		if(bandtype=="1")
			productname="M睿机-标准型单线";
		else if(bandtype=="2")
			productname="M睿机-标准型双线";
		else if(bandtype=="4")
			productname="海外睿机-普及型";
	}

	if(productid=="83")
	{
		if(bandtype=="1")
			productname="M睿机-专业型单线";
		else if(bandtype=="2")
			productname="M睿机-专业型双线";
		else if(bandtype=="4")
			productname="海外睿机-标准型";
	}
	if(productid=="39")
	{
		if(bandtype=="1")
			productname="G睿机-入门型单线";
		if(bandtype=="2")
			productname="G睿机-入门型双线";
		if(bandtype=="4")
			productname="海外睿机-高级型";
	}
	if(productid=="40")
	{
		if(bandtype=="1")
			productname="G睿机-普及型单线";
		if(bandtype=="2")
			productname="G睿机-普及型双线";
	}

	
	if(productid=="41")
	{
		if(bandtype=="1")
			productname="G睿机-标准型单线";
		if(bandtype=="2")
			productname="G睿机-标准型双线";
		if(bandtype=="4")
			productname="海外睿机-专业型";
	}
	if(productid=="124")
	{
		if(bandtype=="2")
			productname="G睿机-高级型双线";
	}
	if(productid=="125")
	{
		if(bandtype=="2")
			productname="G睿机-专业型双线";
	}

	if(productid=="13")
		productname="普通通用网址";
	if(productid=="35")
		productname="准通用词";
	if(productid=="36")
		productname="普通通用词";
	if(productid=="34")
		productname="白金通用词";
	if(productid=="54")
		productname="中文.cc域名";
	if(productid=="97")
	{
		if(bandtype=="2")
			productname="老板邮局-风尚版";
		if(bandtype=="3")
			productname="老板邮局-豪华版";
		if(bandtype=="4")
			productname="老板邮局-尊贵版";
	}
	if(productid=="6")
		productname="中国中文域名";
	return productname;
}

function see(productid,bandtype){
	
	var url=window.location.href.replace(/.*\/(.*\.php)\?.*/,"$1");
	var productname="";
	if(productid=="155")
		return url+"?path=eje&on=a_2#First_focus";
	if(productid=="27")
		return url+"?path=eje&on=a_2#First_focus";
	if(productid=="28")
		return url+"?path=eje&on=a_2#Second_focus";
	if(productid=="29")
		return url+"?path=eje&on=a_2#Second_focus";
	if(productid=="48")
		return url+"?path=seo&on=a_8#First_focus";
	if(productid=="79")
		return url+"?path=seo&on=a_8&lan=abroad#First_focus";
	if(productid=="1")
		return url+"?path=domain&on=a_3#First_focus";
	if(productid=="2")
		return url+"?path=domain&on=a_3&lan=cn#First_focus";
	if(productid=="4")
		return url+"?path=domain&on=a_3#First_focus";
	if(productid=="5")
		return url+"?path=domain&on=a_3#First_focus";
	if(productid=="9")
		return url+"?path=domain&on=a_3#First_focus";
	if(productid=="10")
		return url+"?path=domain&on=a_3#First_focus";
	if(productid=="21")
	{
		if(bandtype=="1")
			return url+"?path=host&on=a_4#First_focus";
		else if(bandtype=="2")
			return url+"?path=host&on=a_4&lan=m2#First_focus";
	}
	if(productid=="22")
	{
		if(bandtype=="1")
			return url+"?path=host&on=a_4#First_focus";
		else if(bandtype=="2")
			return url+"?path=host&on=a_4&lan=m2#First_focus";
		else if(bandtype=="4")
			return url+"?path=host&on=a_4&lan=abroad#First_focus";
	}
	if(productid=="23")
	{
		if(bandtype=="1")
			return url+"?path=host&on=a_4#Second_focus";
		else if(bandtype=="2")
			return url+"?path=host&on=a_4&lan=m2#Second_focus";
		else if(bandtype=="4")
			return url+"?path=host&on=a_4&lan=abroad#First_focus";
	}
	if(productid=="83")
	{
		if(bandtype=="1")
			return url+"?path=host&on=a_4#Second_focus";
		else if(bandtype=="2")
			return url+"?path=host&on=a_4&lan=m2#Second_focus";
		else if(bandtype=="4")
			return url+"?path=host&on=a_4&lan=abroad#Second_focus";
	}
	if(productid=="124" || productid=="125")
	{
		if(bandtype=="2")
			return url+"?path=host&on=a_4&lan=g2#Second_focus";
	}
	if(productid=="39")
	{
		if(bandtype=="1")
			return url+"?path=host&on=a_4&lan=g1#First_focus";
		if(bandtype=="2")
			return url+"?path=host&on=a_4&lan=g2#First_focus";
		if(bandtype=="4")
			return url+"?path=host&on=a_4&lan=abroad#Second_focus";
	}
	if(productid=="40")
	{
		if(bandtype=="1")
			return url+"?path=host&on=a_4&lan=g1#First_focus";
		if(bandtype=="2")
			return url+"?path=host&on=a_4&lan=g2#First_focus";
	}
	if(productid=="41")
	{
		if(bandtype=="1")
			return url+"?path=host&on=a_4&lan=g1#Second_focus";
		if(bandtype=="2")
			return url+"?path=host&on=a_4&lan=g2#Second_focus";
		if(bandtype=="4")
			return url+"?path=host&on=a_4&lan=abroad#Third_focus";
	}
	if(productid=="13")
		return url+"?path=domain&on=a_3&lan=tywz#First_focus";
	if(productid=="35")
		return url+"?path=domain&on=a_3&lan=tywz#First_focus";
	if(productid=="36")
		return url+"?path=domain&on=a_3&lan=tywz#First_focus";
	if(productid=="34")
		return url+"?path=domain&on=a_3&lan=tywz#First_focus";
	if(productid=="54")
		return url+"?path=domain&on=a_3&lan=cn#First_focus";
	if(productid=="6")
		return url+"?path=domain&on=a_3&lan=cn#First_focus";
	if(productid=="97")
	{
		if(bandtype=="2")
			return "http://www.laobanmail.com/";
		if(bandtype=="3")
			return "http://www.laobanmail.com/";
		if(bandtype=="4")
			return "http://www.laobanmail.com/";
	}
}












function getproductremarkbyproductid(productid){
	var productremark="";
	return productremark;
}
function getformcart(){
	var form_cart="";
	var json = jsonCookie.getJson();
	jQuery.each(json,function(i,v){
		form_cart+=v.id+"!"+v.cart_productid+"!"+v.cart_bandtype+"!"+v.cart_chname+"!"+v.cart_email+"!"+v.cart_telephone+"|";
	})
	return form_cart;
}



