﻿// JavaScript Document
var server_data = { datalist:"" ,username:"",usercookie:"" }


function creatyuansu1(e,obj)  //创建ID
{
var element =document.createElement(e);
for(prop in obj)
{
element[prop]=obj[prop];
}
return element;
}
function $(id)
{
return document.getElementById(id);
}

function ist_cookie(name,name1)
{
 	document.cookie=name+"="+name1+";expires=Thu,01-Jan-2010 00:00:01 GMT;path=/";
 
}
function get_cookie(name)
{
  var arg = name + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var i = 0;
  while (i < clen) {
    var j = i + alen;
    if (document.cookie.substring(i, j) == arg)
      return getCookieVal (j);
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break; 
  }
  return null;
}
function getCookieVal (offset)
  {
  var endstr = document.cookie.indexOf (";", offset);
  if (endstr == -1)
    endstr = document.cookie.length;
  return decodeURIComponent(document.cookie.substring(offset, endstr));
  }
function del_cookie(name)
{

	document.cookie=name+"=deleted;expires=Thu,01-Jan-1970 00:00:01 GMT;path=/";
	document.cookie=name+";expires=Thu,01-Jan-1970 00:00:01 GMT;path=/";
	
}
var data_i;
var page_curent=1;
//记录当前页码

var page_last;
//计算总页数

//定义公共变量

var datalist;

var static_datalist=[]; //滚动软件的JS 
var iselse_1=(get_cookie("tool_on")!="1")?false:true;
iselse_1=true;

var shijian=new Date();

datalist=(server_data.datalist=="")?static_datalist:server_data.datalist;
var datatxt="24小时热线";	
var datatxt1="24小时热线<br/>----小艾:----<br/><span style=\"color:#0c0\">13609009269</span>";

//此处是判断是否存在头
 data_i=datalist.length;	
page_curent=1;
//记录当前页码

page_last=Math.ceil(data_i/8);
//计算总页数



//以下事拼装html

var hxq="";
hxq+="<p class=\"qqfooter\">";
hxq+="		<strong>产品销售:</strong><a href=\"tencent://message/?uin=7225370&Site=iebook.cn&Menu=yes\">小艾(华东)</a>";
hxq+="		<a href=\"tencent://message/?uin=7225370&Site=iebook.cn&Menu=yes\">";
hxq+="		   <img src=\"http://www.iebook.cn/images/qqonline_index.gif\" title=\"小艾(华东)\" alt=\"小艾(华东)\"/>";
hxq+="			</a>";
hxq+="		<a href=\"tencent://message/?uin=774684757&Site=iebook.cn&Menu=yes\">小伊(华东)</a>";
hxq+="		<a href=\"tencent://message/?uin=774684757&Site=iebook.cn&Menu=yes\">";
hxq+="		   <img src=\"http://www.iebook.cn/images/qqonline_index.gif\" title=\"小伊(华东)\" alt=\"小伊(华东)\"/>";
hxq+="			</a>|";
hxq+="		<a href=\"tencent://message/?uin=295364602&Site=iebook.cn&Menu=yes\">小波(华南)</a>";
hxq+="		<a href=\"tencent://message/?uin=295364602&Site=iebook.cn&Menu=yes\">";
hxq+="			   <img src=\"http://www.iebook.cn/images/qqonline_index.gif\" title=\"小波(华南)\" alt=\"小波(华南)\"/>";
hxq+="			</a>";
hxq+="			<a href=\"tencent://message/?uin=840423482&Site=iebook.cn&Menu=yes\">小欧(华南)</a>";
hxq+="		<a href=\"tencent://message/?uin=840423482&Site=iebook.cn&Menu=yes\">";
hxq+="		   <img src=\"http://www.iebook.cn/images/qqonline_index.gif\" title=\"小欧(华南)\" alt=\"小欧(华南)\"/>";
hxq+="			</a>|";
hxq+="			<a href=\"tencent://message/?uin=745559710&Site=iebook.cn&Menu=yes\">小极(华西)</a>";
hxq+="			<a href=\"tencent://message/?uin=745559710&Site=iebook.cn&Menu=yes\">";
hxq+="		   <img src=\"http://www.iebook.cn/images/qqonline_index.gif\" title=\"小极(华西)\" alt=\"小极(华西)\"/>";
hxq+="			</a>";
hxq+="			<a href=\"tencent://message/?uin=745560721&Site=iebook.cn&Menu=yes\">小精(华西)</a>";
hxq+="			<a href=\"tencent://message/?uin=745560721&Site=iebook.cn&Menu=yes\">";
hxq+="			   <img src=\"http://www.iebook.cn/images/qqonline_index.gif\" title=\"小精(华西)\" alt=\"小精(华西)\"/>";
hxq+="		</a>|";
hxq+="		<a href=\"tencent://message/?uin=307821403&Site=iebook.cn&Menu=yes\">小科(华北)</a>";
hxq+="			<a href=\"tencent://message/?uin=307821403&Site=iebook.cn&Menu=yes\">";
hxq+="			   <img src=\"http://www.iebook.cn/images/qqonline_index.gif\" title=\"小科(华北)\" alt=\"小科(华北)\"/>";
hxq+="			</a>";
hxq+="			<a href=\"tencent://message/?uin=949857149&Site=iebook.cn&Menu=yes\">小超(华北)</a>";
hxq+="		<a href=\"tencent://message/?uin=949857149&Site=iebook.cn&Menu=yes\">";
hxq+="			   <img src=\"http://www.iebook.cn/images/qqonline_index.gif\" title=\"小超(华北)\" alt=\"小超(华北)\"/>";
hxq+="			</a>";
hxq+="&nbsp;&nbsp;<a  href=\"http://www.iebook.cn/dialog_1.htm?&language=cn&charset=GBK&lytype=0&zdkf_type=1&referer=11&tpl=crystal_blue\" target=\"_blank\" title=\"快来点击在线与客服交流\" style=\"color:#0c0\">在线交流</a>";
hxq+="		</p>";
hxq+="		<p class=\"qqfooter\">";
hxq+="			<strong>客服</strong>:<a href=\"tencent://message/?uin=707339424&Site=iebook.cn&Menu=yes\">阿帝</a>";
hxq+="			<a href=\"tencent://message/?uin=707339424&Site=iebook.cn&Menu=yes\">";
hxq+="			   <img src=\"http://www.iebook.cn/images/qqonline_index.gif\" title=\"阿帝\" alt=\"阿帝\"/>";
hxq+="		</a>";
hxq+="			<a href=\"tencent://message/?uin=1010595426&Site=iebook.cn&Menu=yes\">阿一</a>";
hxq+="			<a href=\"tencent://message/?uin=1010595426&Site=iebook.cn&Menu=yes\">";
hxq+="			   <img src=\"http://www.iebook.cn/images/qqonline_index.gif\" title=\"阿一\" alt=\"阿一\"/>";
hxq+="			</a>|";
hxq+="			<strong>MSN:</strong><a href=\"msnim:chat?contact=iebook01@hotmail.com\" target=\"_blank\">小灵</a>";
hxq+="			<a href=\"msnim:chat?contact=iebook01@hotmail.com\" target=\"_blank\">";
hxq+="		   <img src=\"http://www.iebook.cn/images/msn999.gif\" title=\"MSN:小灵\" alt=\"MSN:小灵\"/>";
hxq+="		</a>|";
hxq+="		<strong>旺旺:</strong><a href=\"wangwang:SendIM?iebook第一门户&uid_t=iebook第一门户\" target=\"_blank\">iebook第一门户</a>";
hxq+="			<a href=\"wangwang:SendIM?iebook第一门户&uid_t=iebook第一门户\" target=\"_blank\">";
hxq+="			   <img src=\"http://www.iebook.cn/images/alibaba.gif\" title=\"旺旺:iebook第一门户\" alt=\"旺旺:iebook第一门户\"/>";
hxq+="			</a>|";
hxq+="			<strong>渠道加盟:</strong><a href=\"tencent://message/?uin=462693737&Site=iebook.cn&Menu=yes\">iebook</a>";
hxq+="			<a href=\"tencent://message/?uin=462693737&Site=iebook.cn&Menu=yes\">";
hxq+="		   <img src=\"http://www.iebook.cn/images/qqonline_index.gif\" title=\"iebook\" alt=\"iebook\"/>";
hxq+="			</a>|";
hxq+="			<strong>网站合作:</strong><a href=\"tencent://message/?uin=496520063&Site=iebook.cn&Menu=yes\">小合</a>";
hxq+="			<a href=\"tencent://message/?uin=496520063&Site=iebook.cn&Menu=yes\">";
hxq+="			   <img src=\"http://www.iebook.cn/images/qqonline_index.gif\" title=\"小合\" alt=\"小合\"/>";
hxq+="		</a>|";
hxq+="		<strong>技术支持:</strong><a href=\"tencent://message/?uin=752468719&Site=iebook.cn&Menu=yes\">阿飞</a>";
hxq+="			<a href=\"tencent://message/?uin=752468719&Site=iebook.cn&Menu=yes\">";
hxq+="			   <img src=\"http://www.iebook.cn/images/qqonline_index.gif\" title=\"阿飞\" alt=\"阿飞\"/>";
hxq+="		</a>";
hxq+="		<a href=\"tencent://message/?uin=305848418&Site=iebook.cn&Menu=yes\">阿天</a>";
hxq+="			<a href=\"tencent://message/?uin=305848418&Site=iebook.cn&Menu=yes\">";
hxq+="			   <img src=\"http://www.iebook.cn/images/qqonline_index.gif\" title=\"阿天\" alt=\"阿天\"/>";
hxq+="		</a>";
hxq+="		</p>";



var  tool_html='<div id=\"index_js_8\">';
    tool_html+='<div id=\"flow_wbox\">';
      tool_html+='<div  id=\"flow_nbox\">';
       // tool_html+='<div  class=\"index_tool_cs1\">'+datatxt1+'</div>';
        tool_html+='<div id=\"index_js_1\">'+hxq;
       tool_html+='</div>';
		 tool_html+='</div>';
       tool_html+='</div>';
	 tool_html+='</div>';
  tool_html+='<div id=\"flow_wbox1\"  >';
    tool_html+='<div  id=\"flow_nbox1\">';
      tool_html+='<div  id=\"index_js_10\" ><img src=\"http://www.iebook.cn/images/index_btn.gif\"  width=\"162\" height=\"350\" id=\"index_js_5\"   /></div>';
      tool_html+='<div  class=\"index_tool_cs2\"><img src=\"http://www.iebook.cn/images/index_btn.gif\" id=\"index_js_6\" title=\"超级精灵\" width=\"162\" height=\"350\"  /></div>';
    tool_html+='</div>';
  tool_html+='</div>';




document.body.appendChild(creatyuansu1("div",{id:'index_tool_js'}));
$("index_tool_js").innerHTML=tool_html;






index_tool_loading();
function index_tool_loading()
{
	
	
	
	if(iselse_1)
{
	$("index_js_10").style.display="none";
		$("index_js_6").style.display="block";
		$("index_js_8").style.height="60px";
		$("flow_wbox").style.bottom="0px";

}
else
{
 $("index_js_10").style.display="block";
$("index_js_6").style.display="none";
$("index_js_8").style.height="10px";
	$("flow_wbox").style.bottom="-51px";

 
 }

	
	
//定义隐藏

$("index_js_6").onmouseover=function()
{
this.style.marginTop="-198px";	
}
$("index_js_6").onmouseout=function()
{
	this.style.marginTop="-274px";	
}

$("index_js_6").onclick=function()
{


		//隐藏按钮
		//执行现实工具条动画隐藏动画
		var chushi_i=parseInt($("flow_wbox").style.bottom);
		var ds1=setInterval(function(){
					chushi_i-=3;
					if(chushi_i<-51){chushi_i=-51;clearInterval(ds1);
		
	//隐藏动画需要做的事情	
$("index_js_10").style.display="block";
$("index_js_6").style.display="none";
$("index_js_8").style.height="10px";


ist_cookie("tool_on","1");				
//记录关闭惨藏cookie					
					}
					$("flow_wbox").style.bottom=chushi_i+"px";
					
				
						
									 },10);
		//执行现实工具条动画
}

//定义隐藏



//定义显示

var hh=new wangwangtiao();
hh.loading();
//定义显示














//注册点击事件及初始化

//负是向左





window.onresize=function()
{
resetwidth();

}	
	
resetwidth();
//初始化窗口大小










	
}







function wangwangtiao()
{
var isthis=this;
var ds;
this.loading=function()
{
	
	
	$("index_js_5").onclick=function()
	{
		
		//隐藏动画需要做的事情	
		$("index_js_10").style.display="none";
		$("index_js_6").style.display="block";
		$("index_js_8").style.height="60px";
		//隐藏按钮
		//执行现实工具条动画展开动画
		var chushi_i=parseInt($("flow_wbox").style.bottom);
		var ds1=setInterval(function(){
					chushi_i+=3;
					if(chushi_i>0){chushi_i=0;clearInterval(ds1);del_cookie("tool_on");	}
						$("flow_wbox").style.bottom=chushi_i+"px";
						
									 },10);
		//执行现实工具条动画
		
	}
	
	
	
	$("index_js_5").onmouseover=function()
	{
		isthis.hundong();
	}
	$("index_js_5").onmouseout=function()
	{
		
		clearInterval(ds);
		
			$("index_js_5").onmouseover=function()
	{
		isthis.hundong();
	}
	
	$("index_js_5").style.marginTop="-132px";	
	
	
	
	
	}
}
	
this.hundong=function()
{
$("index_js_5").onmouseover=null;	
ds=setInterval(function(){
						
						if(parseInt($("index_js_5").style.marginTop)==0)
						{
						$("index_js_5").style.marginTop="-66px";	
						}
						else
						{
						 $("index_js_5").style.marginTop="0";	
						}
							
						},200);

}




}





//判断IE类型
function getbrower(){
var iefox=1;//1为FF浏览器
var browser=navigator.appName 
var b_version=navigator.appVersion 
var version=b_version.split(";"); 
var trim_Version=version[1].replace(/[ ]/g,""); 
if(browser=="Microsoft Internet Explorer" && trim_Version=="MSIE7.0") 
{ 
iefox=7;
} 
else if(browser=="Microsoft Internet Explorer" && trim_Version=="MSIE6.0") 
{ 
iefox=6;
} 
return iefox;
}



function resetwidth()
{
	
	
	var wd=document.body.clientWidth-17;

document.getElementById("index_tool_js").style.width=wd+"px";
document.getElementById("index_js_8").style.width=wd+"px";

if(document.body.clientWidth<967)
{
document.getElementById("index_tool_js").style.bottom="17px";
//if(getbrower()==7||getbrower()==6) 
//document.getElementById("index_tool_js").style.left="-500px";

}
else
{
document.getElementById("index_tool_js").style.bottom="0px";
//if(getbrower()==7||getbrower()==6) 
//document.getElementById("index_tool_js").style.left="-500px";
}

	
}











