// JavaScript Document
var BROWSER = {};
var USERAGENT = navigator.userAgent.toLowerCase();
browserVersion({'ie':'msie','firefox':'','chrome':'','opera':'','safari':'','mozilla':'','webkit':'','maxthon':'','qq':'qqbrowser'});
if(BROWSER.safari) {
BROWSER.firefox = true;
}
BROWSER.opera = BROWSER.opera ? opera.version() : 0;
HTMLNODE = document.getElementsByTagName('head')[0].parentNode;
if(BROWSER.ie) {
BROWSER.iemode = parseInt(typeof document.documentMode != 'undefined' ? document.documentMode : BROWSER.ie);
HTMLNODE.className = 'ie_all ie' + BROWSER.iemode;
}
var lang1='请输入商家关键词';
var lang2='抱歉,你的浏览器不支持此操作。\n请使用按键 Ctrl+D 收藏拉手。';
function browserVersion(types) {
var other = 1;
for(i in types) {
var v = types[i] ? types[i] : i;
if(USERAGENT.indexOf(v) != -1) {
var re = new RegExp(v + '(\\/|\\s)([\\d\\.]+)', 'ig');
var matches = re.exec(USERAGENT);
var ver = matches != null ? matches[2] : 0;
other = ver !== 0 && v != 'mozilla' ? 0 : other;
}else {
var ver = 0;
}
eval('BROWSER.' + i + '= ver');
}
BROWSER.other = other;
}
function check_all(obj,id,n)
{
for(var i=0;i';
}
layer.open({
type: type,
title: ""+title+"
",
shadeClose: true,
scrollbar: false,
shade: [0.5, "#393D49"],
maxmin: false,
area: [width+"px",height+"px"],
content: content,
cancel: function(index, layero){
}
});
}
var layerclose = {};
function showlayerwin(it618type,type,title,content,width,height,wintype){
if(type==1){
if(it618type!='map'){
content=''+content+'
';
}
}
if(wintype==0){
var maxmin=false;
var shade=0.3;
}else{
var maxmin=true;
var shade=false;
}
if(height>IT618_WAIMAI(window).height()*0.8){
height=IT618_WAIMAI(window).height()*0.8;
}
layerclose[it618type]=layer.open({
type: type,
title: ""+title+"
",
shadeClose: false,
scrollbar: false,
shade: shade,
maxmin: maxmin,
area: [width+"px",height+"px"],
content: content,
cancel: function(index, layero){
}
});
}
function getwaimaiarea(it618_area_id){
IT618_WAIMAI("#it618_area_id1").html('');
IT618_WAIMAI.get("https://cpfw.sseuu.com/plugin.php?id=it618_waimai:ajax"+"&it618_area_id="+it618_area_id+""+"&formhash=1fed4a1d", {ac:"getwaimaiarea"},function (data, textStatus){
IT618_WAIMAI("#it618_area_id1").html(data);
}, "html");
}
function getwaimaiclass(it618_class_id){
IT618_WAIMAI("#it618_class_id1").html('');
IT618_WAIMAI.get("https://cpfw.sseuu.com/plugin.php?id=it618_waimai:ajax"+"&it618_class_id="+it618_class_id+"&formhash=1fed4a1d", {ac:"getwaimaiclass"},function (data, textStatus){
IT618_WAIMAI("#it618_class_id1").html(data);
}, "html");
}
IT618_WAIMAI.ajaxSetup({cache:false});
$(document).ready(function() {
//35fa9485bea23fa011b997f127d76ffc
$(".renzheng").click(function(){
if(confirm('')){
location.href="member.php?mod=logging"+"&action=login";
return;
}else{
return;
}
IT618_BRAND.get("https://cpfw.sseuu.com/plugin.php?id=it618_brand:showrenzheng", {ac:"add"},function (data, textStatus){
var tmparr=data.split("it618_split");
showlayerwin('renzheng',1,tmparr[0],tmparr[1],1100,550,0);
}, "html");
});
});
function getwaimaimap(sid){
IT618_WAIMAI.get("https://cpfw.sseuu.com/plugin.php?id=it618_waimai:showmap"+"&sid="+sid, {ac:"it618"},function (data, textStatus){
var tmparr=data.split("it618_split");
showlayerwin('map',1,tmparr[0],tmparr[1],1100,680,0);
}, "html");
}
function _attachEvent(obj, evt, func, eventobj) {
eventobj = !eventobj ? obj : eventobj;
if(obj.addEventListener) {
obj.addEventListener(evt, func, false);
} else if(eventobj.attachEvent) {
obj.attachEvent('on' + evt, func);
}
}
function showTopLink() {
if(document.getElementById('body_wrap')){
var viewPortHeight = parseInt(document.documentElement.clientHeight);
var scrollHeight = parseInt(document.body.getBoundingClientRect().top);
var basew = parseInt(document.getElementById('body_wrap').clientWidth);
var sw = document.getElementById('scrolltop').clientWidth;
if (basew < 1000) {
var left = parseInt(fetchOffset(document.getElementById('body_wrap'))['left']);
left = left < sw ? left * 2 - sw : left;
document.getElementById('scrolltop').style.left = ( basew + left ) + 'px';
} else {
document.getElementById('scrolltop').style.left = 'auto';
document.getElementById('scrolltop').style.right = 0;
}
if (BROWSER.ie && BROWSER.ie < 7) {
document.getElementById('scrolltop').style.top = viewPortHeight - scrollHeight - 150 + 'px';
}
if (scrollHeight < -100) {
document.getElementById('scrolltop').style.visibility = 'visible';
} else {
document.getElementById('scrolltop').style.visibility = 'hidden';
}
}
}
function fetchOffset(obj, mode) {
var left_offset = 0, top_offset = 0, mode = !mode ? 0 : mode;
if(obj.getBoundingClientRect && !mode) {
var rect = obj.getBoundingClientRect();
var scrollTop = Math.max(document.documentElement.scrollTop, document.body.scrollTop);
var scrollLeft = Math.max(document.documentElement.scrollLeft, document.body.scrollLeft);
if(document.documentElement.dir == 'rtl') {
scrollLeft = scrollLeft + document.documentElement.clientWidth - document.documentElement.scrollWidth;
}
left_offset = rect.left + scrollLeft - document.documentElement.clientLeft;
top_offset = rect.top + scrollTop - document.documentElement.clientTop;
}
if(left_offset <= 0 || top_offset <= 0) {
left_offset = obj.offsetLeft;
top_offset = obj.offsetTop;
while((obj = obj.offsetParent) != null) {
position = getCurrentStyle(obj, 'position', 'position');
if(position == 'relative') {
continue;
}
left_offset += obj.offsetLeft;
top_offset += obj.offsetTop;
}
}
return {'left' : left_offset, 'top' : top_offset};
}