<!--
//取得<script> 中src URL参数，如.js?a=123
function GetQueryString(name)   
{   
	var reg = new RegExp("(^|\\?|&)"+ name +"=([^&]*)(\\s|&|$)", "i");
	if (reg.test(document.getElementById("adcall2009float").src)) return RegExp.$2; return null; 
}

//init
var adcall_no = GetQueryString("wid");
var adcall_lr = GetQueryString("lr");
var adcall_y = GetQueryString("y");
var adcall_fs = parseInt(GetQueryString("fs"));
var adcall_ws = parseInt(GetQueryString("ws"));
var adcall_cn = decodeURI(GetQueryString("cn"));
var adcall_ft = decodeURI(GetQueryString("ft"));
var adcall_wt = decodeURI(GetQueryString("wt"));
var adcall_url = GetQueryString("url");
var adcall_qq = GetQueryString("qq");
var adcall_qq_title = decodeURI(GetQueryString("qqt"));
var adcall_img = "http://manage.adcall.com.cn/service/images/";
var adcall_css = GetQueryString("css");//"style1";


if(parseInt(adcall_lr)==1){
	adcall_lr = "right:5px;"
}else{
	adcall_lr = "left:5px;"
}

if(typeof(adcall_qq) != "undefined")
{
adcall_qq=adcall_qq.split(",");
adcall_qq_title=adcall_qq_title.split(",");
}

//getPageSize function
function getPageSize(){    
    var xScroll, yScroll;    
    if (window.innerHeight && window.scrollMaxY) {    
        xScroll = document.body.scrollWidth;    
        yScroll = window.innerHeight + window.scrollMaxY;    
    } else if (document.body.scrollHeight > document.body.offsetHeight){    
        xScroll = document.body.scrollWidth;    
        yScroll = document.body.scrollHeight;    
    } else {    
        xScroll = document.body.offsetWidth;    
        yScroll = document.body.offsetHeight;    
    }    
   
    var windowWidth, windowHeight;    
    if (self.innerHeight) {    
        windowWidth = self.innerWidth;    
        windowHeight = self.innerHeight;    
    } else if (document.documentElement && document.documentElement.clientHeight) {    
        windowWidth = document.documentElement.clientWidth;    
        windowHeight = document.documentElement.clientHeight;    
    } else if (document.body) {    
        windowWidth = document.body.clientWidth;    
        windowHeight = document.body.clientHeight;    
    }    
   
    if(yScroll < windowHeight){    
        pageHeight = yScroll;    
    } else {    
        pageHeight = windowHeight;    
    }    
   
    if(xScroll < windowWidth){    
        pageWidth = xScroll;    
    } else {    
        pageWidth = windowWidth;    
    }    
   
    arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight)    
    return arrayPageSize;    
} 

//move function
var adcall_drag_=false;
var adcall_D=new Function('obj','return document.getElementById(obj);');
var adcall_IE=new Function('','if(navigator.appName.indexOf("Explorer")>=0)return 1;if(navigator.appName.indexOf("Netscape")>=0)return 2');
function adcall_move_bar(obj){
	adcall_D(obj).onmousedown=function(e){
		adcall_drag_=true
		with(this){
			style.position="absolute";temp1=offsetLeft;temp2=offsetTop;
		    if(adcall_IE()==1){
			  adcall_x=event.clientX;adcall_y=event.clientY
			  document.onmousemove=function(e){
			   if(adcall_drag_==false)return false 
				 with(this){style.left=temp1+event.clientX-adcall_x+"px";style.top=temp2+event.clientY-adcall_y+"px"} 
				 }
		  } 
		  if(adcall_IE()==2){adcall_x=e.pageX;adcall_y=e.pageY;
			  document.onmousemove=function(e){ 
					if(adcall_drag_==false)return false 
				 with(this){style.left=temp1+e.pageX-adcall_x+"px";style.top=temp2+e.pageY-adcall_y+"px"} 
				 }
		  }
	}
	document.onmouseup=new Function("adcall_drag_=false") 
	}
}

// float functon
var adcall_lastScrollY_1=0;
var adcall_lastScrollY_2=0;
function adcall_floatbar(floaObj,floaType){
 var diffY;
 if (document.documentElement && document.documentElement.scrollTop) {
  diffY = document.documentElement.scrollTop;
 } else if (document.body) {
  diffY = document.body.scrollTop;
 } else {/*Netscape stuff*/}
 if(floaType == 0){
     percent = 0.2*(diffY-adcall_lastScrollY_1);
 }else{
	 percent = 0.2*(diffY-adcall_lastScrollY_2); 
 }

	if(percent>0) {
	    percent=Math.ceil(percent);
	} else {
	    percent=Math.floor(percent);
	}
	if(document.getElementById(floaObj)){
	    document.getElementById(floaObj).style.top=parseInt(document.getElementById(floaObj).style.top)+percent+"px";
	}

	if(floaType==0){
	    adcall_lastScrollY_1=adcall_lastScrollY_1+percent;
	}else{
	    adcall_lastScrollY_2=adcall_lastScrollY_2+percent;
	}

}

//show bar function
function show_adcall_bar()
{
	var adcall_show_bar_code ="<iframe style=\"position:absolute;z-index:-1;width:100%;height:100%;left:0;top:0;\" frameborder=\"0\"></iframe><table width=\"123\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"
		+ "<tr><td style=\"background:url("+adcall_img+adcall_css+"/float_top_bg.gif) no-repeat;width:112px; height:25px;text-align:left; padding-left:15px; padding-top:5px;font-size:12px; font-weight:bold; color:#C00;cursor:move;\"><span style=\"float:left;\" onmouseover=\"adcall_move_bar('adcall_show_bar')\">"+adcall_ft+"</span><span style=\"float:right;width:23px;margin-right:3px;cursor:pointer;\" onclick=\"adcall_closeDiv('adcall_show_bar')\"></span></td></tr>"
		+ "<tr><td style=\"background:url("+adcall_img+adcall_css+"/float_clk_btn.gif) no-repeat;height:52px;cursor:pointer;\" title=\"点击免费通话\" onclick=\"window.open('http://manage.adcall.com.cn/WebCall/WebCall.jsp?wid="+adcall_no+"&surl="+adcall_url+" ','','width=480,height=420')\">&nbsp;</td></tr>"
		+ "<tr><td style=\"background:url("+adcall_img+adcall_css+"/float_bg.gif) repeat-y;padding:10px; height:80px;\" valign=\"top\">";
		if(typeof(adcall_cn) != "undefined"){	
		adcall_show_bar_code +="<div style=\"color:#000;font-size:12px;text-align:left;line-height:18px;margin-bottom:5px;\">●&nbsp;拔<strong><font color=\"#c11010\">4006-789-789</font></strong>按*号呼“<strong><font color=\"#3E76CA\">"+adcall_cn+"</font></strong>”"
		+ "<br>●&nbsp;编辑写短信“<font color=\"#3E76CA\"><strong>"+adcall_cn+"</strong></font>”发致<strong><font color=\"#c11010\">1066-9160-789</font></strong></div>";
		}
		
		if(typeof(adcall_qq) != "undefined" && adcall_qq !=null && adcall_qq!=""){	
		  if(typeof(adcall_cn) != "undefined"){
		  adcall_show_bar_code += "<div style=\"color:#000;font-size:12px;line-height:18px;border-top:1px solid #CCC;padding-top:5px;\">";
		  }else{
		  adcall_show_bar_code += "<div style=\"color:#000;font-size:12px;line-height:18px;padding-top:5px;\">";
		  }
		  for(var aai = 0; aai < adcall_qq.length;aai++ )
		  {
			  if(typeof(adcall_qq_title[aai])=="undefined")
			  {
			     adcall_show_bar_code += "<span onClick=\"window.open('http://wpa.qq.com/msgrd?V=1&amp;Uin="+adcall_qq[aai]+"&amp;Site="+adcall_url+"&amp;Menu=yes')\" title=\"点击与[ "+adcall_qq[aai]+" ]在线QQ交流\"  style=\"display:block;width:100%;cursor:pointer;text-align:center;padding-top:3px;padding-bottom:3px;\"><img src=\""+adcall_img+adcall_css+"/qq_icon.gif\" width=\"16\" height=\"16\" align=\"absmiddle\">&nbsp;"+adcall_qq[aai]+"</span>";
			  }else{
				  adcall_show_bar_code += "<span onClick=\"window.open('http://wpa.qq.com/msgrd?V=1&amp;Uin="+adcall_qq[aai]+"&amp;Site="+adcall_url+"&amp;Menu=yes')\" title=\"点击与[ "+adcall_qq_title[aai]+" ]在线QQ交流\"  style=\"display:block;width:100%;cursor:pointer;text-align:center;padding-top:3px;padding-bottom:3px;\"><img src=\""+adcall_img+adcall_css+"/qq_icon.gif\" width=\"16\" height=\"16\" align=\"absmiddle\">&nbsp;"+adcall_qq_title[aai]+"</span>";
			  }
		  }
		  adcall_show_bar_code += "</div>";
		}
		
		adcall_show_bar_code += "</td></tr><tr><td style=\"background:url("+adcall_img+adcall_css+"/float_bot_bg.gif) no-repeat;height:27px;\">&nbsp;</td></tr></table>";
		
		var bar_div = document.createElement("div");
		bar_div.id = "adcall_show_bar";
		bar_div.style.cssText = "position:absolute; top:"+adcall_y+"px;"+adcall_lr+"width:127px;text-align:center;overflow:hidden;line-height:22px;z-index:9999;";
        bar_div.innerHTML = adcall_show_bar_code;
		
        document.body.appendChild(bar_div);
		window.setInterval("adcall_floatbar('adcall_show_bar',0)",1);	
		
}		

//show win function
function show_adcall_win()
{
	/*var iWidth,iHeight
	if(document.documentElement.clientWidth > document.body.clientWidth){
		iWidth = document.documentElement.clientWidth; 
		iHeight = document.documentElement.clientHeight;
	}else{
		iWidth = document.body.clientWidth; 
		iHeight = document.body.clientHeight;
	}*/
	var ad_pagesize = getPageSize();
	var f_w_t = parseInt(ad_pagesize[0]/2 - 300);
	var f_w_l = parseInt(ad_pagesize[1]/2 + 20);
		
	var adcall_show_win_code = "<iframe style=\"position:absolute;z-index:-1;width:100%;height:100%;left:0;top:0;\" frameborder=\"0\"></iframe><table width=\"127\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><form method=\"post\" action=\"http://manage.adcall.com.cn/WebCall/CallBack.jsp\" onsubmit=return(adcall_checkCB(this)) name=\"cb\" target=\"sf\"><input type=\"hidden\" name=\"S\" value=\"tsCB\"><input type=\"hidden\" name=\"uid\" value=\""+adcall_no+"\"><INPUT type=\"hidden\" value=\""+adcall_url+"\" name=\"surl\"><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"background:url("+adcall_img+adcall_css+"/callshowbox.gif) no-repeat; width:390px; height:161px;text-align:left;\"><tr><td style=\"height:25px; color:#FF9933; font-weight:bold; font-size:12px;padding-top:5px;padding-left:15px; width:345px;\" onmouseover=\"adcall_move_bar('adcall_show_win')\">"+adcall_wt+"</td><td style=\"width:30px; cursor:pointer;\" onclick=\"adcall_closeDiv('adcall_show_win');\">&nbsp;</td></tr><tr><td colspan=\"2\" valign=\"top\"><table width=\"90%\" border=\"0\" align=\"center\" cellpadding=\"1\" cellspacing=\"2\" style=\"font-size:12px;\"><tr><td  height=\"10\"></td></tr><tr><td style=\"font-size:12px;color:#CC0000\" height=\"20\">您可以使用以下方式与我免费通话</td></tr><tr><td valign=\"middle\" height=\"20\" style=\"font-size:12px;color:#000;\"><span>●</span>&nbsp;您的电话号码&nbsp;<input name=\"cb_num\" type=\"text\" id=\"cb_num\" size=\"10\" style=\"border:1px solid #4782C2; color:#2853B5; width:90px;\" />&nbsp;<input type=\"submit\" name=\"cb_sub\" id=\"cb_sub\" value=\"\" style=\"width:71px; height:22px; background:url("+adcall_img+adcall_css+"/callshowbox_btn.gif) no-repeat; border:0;\" /></td></tr><tr><td height=\"20\" style=\"font-size:12px;color:#000;\"><span>●</span>&nbsp;拔打\“<strong>4006-789-789 * "+adcall_cn+"</strong>\”</td></tr><tr><td height=\"20\" style=\"font-size:12px;color:#000;\"><span>●</span>&nbsp;手机发\"<strong>"+adcall_cn+"</strong>\”到<strong>1066-9160-789</strong></td></tr></table></td></tr></table></form><IFRAME width=0 height=0 frameborder=0 scrolling=no name=\"sf\" src=\"about:blank\"></IFRAME>";
		
		var bar_div = document.createElement("div");
		bar_div.id = "adcall_show_win";
		bar_div.style.cssText = "position:absolute;top:"+f_w_t+"px;left:"+f_w_l+"px;width:388px;height:159px;overflow:hidden;text-align:center;line-height:22px;z-index:9999;cursor:move;";
        bar_div.innerHTML = adcall_show_win_code;
	
        document.body.appendChild(bar_div);
		window.setInterval("adcall_floatbar('adcall_show_win',1)",1);
}		

function adcall_closeDiv(Divobj){   
	adcall_D(Divobj).style.display = "none";   //删除
}

//check form
function adcall_checkCB()
{
	if (document.cb.cb_num.value==""){alert("请输入您的电话号码");return false;}
	if (isNaN(document.cb.cb_num.value) && document.cb.cb_num.value.indexOf("-")==-1){alert("电话号码只能输入数字");return false;}
	setTimeout("document.cb.cb_sub.disabled=false;",8000);
	setTimeout("document.cb.cb_num.disabled=false;",8000);
}

function adcall_init()
{
	if(typeof(adcall_fs)!="undefined" && adcall_fs > 0){
		 window.setTimeout("show_adcall_bar();",adcall_fs);
	}
	if(typeof(adcall_ws)!="undefined" && adcall_ws > 0){
		 window.setTimeout("show_adcall_win();",adcall_ws);
	}
}

adcall_init();
-->