﻿//屏蔽右键功能 兼容主流
//document.oncontextmenu = document.onselectstart =new Function("return false");
//document.execCommand("BackgroundImageCache", false, true); //ie6图片缓存
function $(id) {
  return (typeof(id) == "string") ? document.getElementById(id) : id
};

function zixun(param)
{ 
  if(param==null)
  window.open("http://swt.ent120.com/LR/Chatpre.aspx?id=LPD31455319&p="+document.location.href,"_blank","height=473,width=703,top=200,left=200,status=yes,toolbar=no,menubar=no,resizable=no,scrollbars=no,location=no,titlebar=no")
  else window.open("http://swt.ent120.com/LR/Chatpre.aspx?id=LPD31455319&p="+document.location.href+"?"+param,"_blank","height=473,width=703,top=200,left=200,status=yes,toolbar=no,menubar=no,resizable=no,scrollbars=no,location=no,titlebar=no")
}
function tel(){

    window.open("/telp.htm","_blank","height=273,width=320,top=200,left=200,status=yes,toolbar=no,menubar=no,resizable=no,scrollbars=no,location=no,titlebar=no");
}
function message()
{
    window.open("http://swt.ent120.com/LR/Chatpre.aspx?id=LPD31455319&p="+document.location.href,"_blank","height=473,width=703,top=200,left=200,status=yes,toolbar=no,menubar=no,resizable=no,scrollbars=no,location=no,titlebar=no");
}
function qq()
{
    window.open("http://swt.ent120.com/LR/Chatpre.aspx?id=LPD31455319&p="+document.location.href,"_blank","height=473,width=703,top=200,left=200,status=yes,toolbar=no,menubar=no,resizable=no,scrollbars=no,location=no,titlebar=no");
}

/*tel.js*/
//电话快

function _getId(a)
{
  return document.getElementById ? document.getElementById(a) : null;
}

var callzt=0;
function to_call()
{ 
  if(callzt!=0){alert("请不要重复呼叫");return;}
  var qhao=_getId("uid1").value;
	if(qhao=="")
	{
	  show_msg("请输入区号");
		_getId("uid1").style.border="1px #FF6600 solid";
		_getId("uid1").focus();
		return;
	}
	if(isNaN(qhao))
	{
	  show_msg("你输入的区号有误");
		_getId("uid1").style.border="1px #FF6600 solid";
		_getId("uid1").focus();
		return;
	}
	var dataType=_getId("uid1").title;
	if(dataType=="quhao")
	{
	  if (qhao.length!=4 && qhao.length!=3)
	  {
		  show_msg("你输入的区号有误");
			_getId("uid1").style.border="1px #FF6600 solid";
			_getId("uid1").focus();
			return;
	  }
	}
	_getId("uid1").style.border="1px #c9c7ba solid";
	var haoma=_getId("uid2").value;
	if (haoma=="")
	{
	  show_msg("请输入号码");
		_getId("uid2").style.border="1px #FF6600 solid";
		_getId("uid2").focus();
		return;
	}
	if (isNaN(haoma))
	{
	  show_msg("你输入的号码有误");
		_getId("uid2").style.border="1px #FF6600 solid";
		_getId("uid2").focus();
		return;
	}
	if (dataType=="quhao")
	{
	  if (haoma.length!=7 && haoma.length!=8)
	  {
		  show_msg("你输入的号码有误");
			_getId("uid2").style.border="1px #FF6600 solid";
			_getId("uid2").focus();
			return;
	  }
	}else
	{
	  if (haoma.length!=11)
	  {
		  show_msg("你输入的号码有误");
			_getId("uid2").style.border="1px #FF6600 solid";
			_getId("uid2").focus();
			return;
	  }
		if(/^13\d{9}$/g.test(haoma)||(/^15\d{9}$/g.test(haoma)) ||(/^18\d{9}$/g.test(haoma)))
		{
		}
		else
		{ 
			show_msg("你输入的号码有误");
			_getId("uid2").style.border="1px #FF6600 solid";
			_getId("uid2").focus();
			return;
		}
	}
	var caller=qhao+haoma;
	_getId("uid2").style.border="1px #c9c7ba solid";
	_getId("uid2").style.border="1px #c9c7ba solid";
	$("calltak").src="http://tel.kuaishang.cn/calld.php?sid="+sid+"&did="+did+"&tel="+caller+"&call_fromurl="+document.location.href;
	callzt=1;
	setTimeout(function(){iform()},6000);
	//xajax_to_call(wiseid,ipaddr,caller);
}

function iform()
{
    if(callzt==0) return;
    callzt=0;
}

function show_msg(txt)
{
    alert(txt);
}

function click_munbertype1()
{
	//去除之前的错误信息
	_getId("uid1").style.border = "1px solid #C9C7BA";
	_getId("uid2").style.border = "1px solid #C9C7BA";
	_getId("uid1").style.color = 'gray';
	_getId("uid2").style.color = 'gray';
	_getId("uid1").value = "区号";
	_getId("uid2").value = "电话号码";
	_getId("uid1").disabled = false;
	_getId("uid1").title = "quhao";
	_getId("uid2").title = "ZuoJi";
}

function click_munbertype2()
{
  
   	//去除之前的错误信息
	_getId("uid1").style.border = "1px solid #C9C7BA";
	_getId("uid2").style.border = "1px solid #C9C7BA";
	_getId("uid1").style.color = 'gray';
	_getId("uid2").style.color = 'gray';
	_getId("uid1").value = "0";
	_getId("uid2").value = "手机号码";
	_getId("uid1").disabled = true;
	_getId("uid1").title = "";
	_getId("uid2").title = "Mobile";
}

function DialInput1(obj) //拨号盘输入框onfocus响应事件
{
	obj.style.color = '';
	if (/区号/.test(obj.value))
	{
		obj.value=obj.value.replace('区号','');
	}
}

function DialInputBlur1(obj) //拨号盘输入框onfocus响应事件
{
	if (obj.value == '')
	{
		obj.style.color = 'gray';
		obj.value='区号';
	}
}

function DialInput2(obj) //拨号盘输入框onfocus响应事件
{
	obj.style.color = '';
	if (/电话号码/.test(obj.value))
	{
		obj.value=obj.value.replace('电话号码','');
	}
	if (/手机号码/.test(obj.value))
	{
		obj.value=obj.value.replace('手机号码','');
	}
}

function DialInputBlur2(obj) //拨号盘输入框onfocus响应事件
{
	if (obj.value == '')
	{
		if (_getId("munbertype1").checked)
		{
			obj.style.color = 'gray';
			obj.value='电话号码';
		}
		else
		{
			obj.style.color = 'gray';
			obj.value='手机号码';
		}
	}
}
document.write('<iframe width="0" height="0" frameborder="0" id="calltak"></iframe>');
var sid="2011241728"; var did="664";

//友情链接
function tab_foot()
{
    var pid="foot";
    if($(pid).children[0])
    {
        for(var i=0;i<$(pid).children[0].getElementsByTagName("h3").length;i++)
        {
            $(pid).children[0].getElementsByTagName("h3")[i].nub=i;
            $(pid).children[0].getElementsByTagName("h3")[i].onmouseover=function(){tab_f(this.nub);}
            $(pid).children[0].getElementsByTagName("h3")[i].onmouseout=function(){}
        }
    }
    function tab_f(nub)
    {
        if($(pid).children[0].getElementsByTagName("div")[nub].style.top=="1px") return;
        for(var i=0;i<$(pid).children[0].getElementsByTagName("div").length;i++)
        {
            $(pid).children[0].getElementsByTagName("div")[i].style.top="-150px";
            $(pid).children[0].getElementsByTagName("h3")[i].className=$(pid).children[0].getElementsByTagName("h3")[i].className.split(' ')[0];
        }
        tab_move($(pid).children[0].getElementsByTagName("div")[nub]);
        $(pid).children[0].getElementsByTagName("h3")[nub].className=$(pid).children[0].getElementsByTagName("h3")[nub].className.split(' ')[0]+" sele_t";
    }
    function tab_move(obj)
    {
        //alert(obj.style.top);
        var mar=setInterval(function(){ tmo();},1);
        function tmo(){
            obj.style.top= parseInt( parseInt( obj.style.top.split('px')[0])+10)+"px";
            if( parseInt( obj.style.top.split('px')[0])>1)
            {
                clearInterval(mar);
                obj.style.top="1px";
            }
        }
    }
    
}
function Top_t_top()
{
    var pid="t_top"
    var NewsTime = 3000;	//每条新闻的停留时间
    var TextTime = 100;		//新闻标题文字出现等待时间，越小越快

    var newsi = 0;
    var txti = 0;
    var txttimer;
    var newstimer;

    var newstitle = new Array();	//新闻标题

    newstitle[0] = "四川省权威耳鼻喉治疗机构";
    newstitle[1] = "四川大学华西医院技术协作单位 权威耳鼻喉医院";
    newstitle[2] = "武警四川消防总队医院22年医疗服务品质 专业治疗耳鼻咽喉疾病";
    newstitle[3] = "权威科研技术，引领医疗步伐 四十余项微创治疗技术 更精更准解决耳鼻咽喉疾病问题";
    
    shownew();
    function shownew()
    {
	    var endstr = "_"
	    hwnewstr = newstitle[newsi];
	    if(txti==(hwnewstr.length-1)){endstr="";}
	    if(txti>=hwnewstr.length){
		    clearInterval(txttimer);
		    clearInterval(newstimer);
		    newsi++;
		    if(newsi>=newstitle.length){
			    newsi = 0
		    }
		    newstimer = setInterval(function(){shownew()},NewsTime);
		    txti = 0;
		    return;
	    }
	    clearInterval(txttimer);
	    $(pid).innerHTML = hwnewstr.substring(0,txti+1)+endstr;
	    txti++;
	    txttimer = setInterval(function(){shownew()},TextTime);
    }
}


function change_head_nav_ul()
{
    var pid="top_nav";
    var path=window.location.href.split('/')[3];
    var obj=0;
    if($(pid))
    {
        if(path=="QWJS") obj=2;
        else if(path=="MYFC") obj=3;
        else if(path=="zhuanjiadayi") obj=4;
        else if(path=="kangfuanli") obj=5;
        else if(path=="yiyuanjianjie") obj=1;
        else if(path=="laiyuanluxian") obj=8;
        else if(path=="jiuyiliucheng") obj=6;
        for(var i=0;i<$(pid).children[1].children.length;i++)
        {
            $(pid).children[1].children[i].className="";
        }
        $(pid).children[1].children[obj].className="a_sele";
    }
}
//添加支持点击量
function addHit(hitId,obj)
{
    if(document.cookie.indexOf("hitId"+hitId+"=") != -1)
    {
        alert("您已经支持过了."); 
    }
    else
    {
        var ajax=newXMLHttpRequest();
        var urlpost="hitId="+hitId;
        var url="/NewInfo.aspx?"+urlpost;
        ajax.open("get",url,true);
        //定义传输的文件HTTP头信息
        ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=UTF-8'");
        ajax.send(urlpost);
        ajax.onreadystatechange=function()
        {
            if(ajax.readyState==4 && ajax.status==200)
            {
                if(ajax.responseText.substring(0,2)=="NO")
                {
                    alert("您已经支持过了.");
                   
                }else{ 
                    alert("谢谢支持.");
                    obj.innerHTML="支持&nbsp;["+parseInt(parseInt( obj.innerHTML.split('[')[1].split(']')[0])+1)+"]";
                }
            }
        }
    }
}

function index_qwjs()
{
    var pid="index_qwjs";
    if($(pid))
    {
        $(pid).children[1].children[0].onmouseover=function(){ this.children[0].src="/images/index_qwjs_img11.jpg";}
        $(pid).children[1].children[0].onmouseout=function(){ this.children[0].src="/images/index_qwjs_img1.jpg";}
        $(pid).children[1].children[1].onmouseover=function(){ this.children[0].src="/images/index_qwjs_img22.jpg";}
        $(pid).children[1].children[1].onmouseout=function(){ this.children[0].src="/images/index_qwjs_img2.jpg";}
        $(pid).children[1].children[2].onmouseover=function(){ this.children[0].src="/images/index_qwjs_img33.jpg";}
        $(pid).children[1].children[2].onmouseout=function(){ this.children[0].src="/images/index_qwjs_img3.jpg";}
        $(pid).children[1].children[3].onmouseover=function(){ this.children[0].src="/images/index_qwjs_img44.jpg";}
        $(pid).children[1].children[3].onmouseout=function(){ this.children[0].src="/images/index_qwjs_img4.jpg";}
        $(pid).children[1].children[4].onmouseover=function(){ this.children[0].src="/images/index_qwjs_img55.jpg";}
        $(pid).children[1].children[4].onmouseout=function(){ this.children[0].src="/images/index_qwjs_img5.jpg";}
        $(pid).children[1].children[5].onmouseover=function(){ this.children[0].src="/images/index_qwjs_img66.jpg";}
        $(pid).children[1].children[5].onmouseout=function(){ this.children[0].src="/images/index_qwjs_img6.jpg";}
    }
}

function qwjs_hdps()
{
    var pid="qwjs_hdps";
    var imgs =new Array();
    var md_nub=0;
    var mar;
    var isGo=true;
    if($(pid))
    {
        $(pid).children[0].children[0].children[0].style.marginLeft="0px";
        for(var i=0;i<$(pid).children[0].children[0].children[0].getElementsByTagName("img").length;i++)
        {
            imgs[i]=parseInt($(pid).children[0].children[0].children[0].getElementsByTagName("img")[i].offsetWidth)*(i);
        }
        
        for(var i=0;i<$(pid).children[1].children.length;i++)
        {
            $(pid).children[1].children[i].nub=i;
            $(pid).children[1].children[i].onmouseover=function(){ tab(this.nub);};
        } 
    }
    function tab(nub)
    {
        if($(pid).children[1].children[nub].className=="a" || isGo==false) return;
        for(var i=0;i<$(pid).children[1].children.length;i++)
        {
            $(pid).children[1].children[i].className="";
        }
        $(pid).children[1].children[nub].className="a";
        isGo=false;
        move_img(nub);
    }
    function move_img(nub)
    { 
        if(nub==md_nub) return;
        mar =nub>md_nub? setInterval(function(){leftmov(nub)},1) : setInterval(function(){rightmov(nub)},1);
        md_nub=nub;
    }
    function leftmov(nub)
    {
        $(pid).children[0].children[0].children[0].style.marginLeft= parseInt( parseInt( $(pid).children[0].children[0].children[0].style.marginLeft.split("px")[0])-100)+"px";
        if(parseInt( $(pid).children[0].children[0].children[0].style.marginLeft.split("px")[0])<=parseInt("-"+imgs[nub]))
        {
            clearInterval(mar);
            isGo=true;
            $(pid).children[0].children[0].children[0].style.marginLeft=parseInt("-"+imgs[nub])+"px";
        }
    }
    function rightmov(nub)
    {
        $(pid).children[0].children[0].children[0].style.marginLeft= parseInt( parseInt( $(pid).children[0].children[0].children[0].style.marginLeft.split("px")[0])+100)+"px";
        
        if(parseInt( $(pid).children[0].children[0].children[0].style.marginLeft.split("px")[0])>=parseInt("-"+imgs[nub]))
        {
            clearInterval(mar);
            isGo=true;
            
            $(pid).children[0].children[0].children[0].style.marginLeft="-"+parseInt(imgs[nub])+"px";
        }
    }
    
}
function delnewContent_a_href()
{
    var pid="NInfo_text";
    if($(pid).getElementsByTagName("a"))
    {
        for(var i=0;i<$(pid).getElementsByTagName("a").length;i++)
        {
            if($(pid).getElementsByTagName("a")[i].id.value!="wl")
             {  $(pid).getElementsByTagName("a")[i].href="javascript:void(0)";}
        }
    }
}

function imageslist(w,h,th,ii)
{
    var pics="",links="",texts=""
	for(var i=1;i<ii+1;i++){
	    if(pics!=""){
	        pics=pics+"|";
	        links=links+"|";
	        texts=texts+"|";
	    }
	    pics=pics + eval("imgUrl"+i)
	    links=links + eval("imgLink"+i)
	    texts=texts + eval("imgtext"+i)
	}

	var focus_width=w;
	var focus_height=h;
	var text_height=th;
	var swf_height = focus_height+text_height;
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">'); 
	document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="/images/focus.swf"><param name="quality" value="high"><param name="bgcolor" value="#F0F0F0">');
	document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
	document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">'); 
	document.write('<embed src="/images/focus.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#F0F0F0" quality="high" width="'+ focus_width +'" height="'+ focus_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}
function objNewsjump(url)
{
    var pid="jump_nub";
    if($(pid))
    {
        if($(pid).value!="")
        {
            window.location.href=url+$(pid).value+"/";
        }
    }
}
function plunjump(url)
{
    var pid="jump_nub";
    if($(pid))
    {
        if($(pid).value!="")
        {
            window.location.href=url+$(pid).value+".html#newinfo_plun";
        }
    }
}

function topSearch()
{
    var pid="topSearch";
    if($(pid))
    {
        if($(pid).getElementsByTagName("input")[0].value=="")
        {
            alert("搜索内容不能为空.");
            return false;
        }else{
            window.open("/search/"+$(pid).getElementsByTagName("input")[0].value+"/");
        }
    }
}
function index_search()
{
    var pid="index_search";
    if($(pid))
    {
        if($(pid).getElementsByTagName("input")[0].value=="")
        {
            alert("搜索内容不能为空.");
            return false;
        }else{
            $(pid).getElementsByTagName("form")[0].action="/search/"+$(pid).getElementsByTagName("input")[0].value+"/";
            return true;
        }
    }
}
function index_search_check()
{
    var pid="index_search";
    if($(pid))
    {
        button_texiao($(pid).getElementsByTagName("input")[1],1);
        $(pid).getElementsByTagName("input")[0].onmouseover=function(){ this.style.color="#000"; this.focus();}
        
        button_texiao($(pid).getElementsByTagName("div")[0].getElementsByTagName("button")[0],2);
        button_texiao($(pid).getElementsByTagName("div")[0].getElementsByTagName("button")[1],2);
    }
}
//科室介绍用的


function change_ksjs_lic()
{
    var ksjs_lic_pid="ksjs_lic";
    var ksjs_lic_go=0;
    var ksjs_lic_mar=null;
    if($(ksjs_lic_pid))
    {
        change_ksjs_lic_go();
        for(var i=0; i<$(ksjs_lic_pid).getElementsByTagName("h4").length;i++)
        {
            $(ksjs_lic_pid).getElementsByTagName("h4")[i].order=i;
            $(ksjs_lic_pid).getElementsByTagName("h4")[i].onmouseover=function(){change_ksjs_lic_act(this.order)};
            $(ksjs_lic_pid).getElementsByTagName("h4")[i].onmouseout=function(){ksjs_lic_go=this.order; change_ksjs_lic_go();};
        }
    }
    function change_ksjs_lic_go()
    {
        change_ksjs_lic_act(ksjs_lic_go);
        ksjs_lic_go=ksjs_lic_go==$(ksjs_lic_pid).getElementsByTagName("h4").length-1?0:ksjs_lic_go+1;
        ksjs_lic_mar=setTimeout(function(){change_ksjs_lic_go()},3000);
    }
    function change_ksjs_lic_act(obj)
    {   
        clearInterval(ksjs_lic_mar);
        if($(ksjs_lic_pid).getElementsByTagName("h4")[obj].className.split(' ')[1]) return;
        for(var i=0; i<$(ksjs_lic_pid).getElementsByTagName("h4").length;i++)
        {
            $(ksjs_lic_pid).getElementsByTagName("h4")[i].className=$(ksjs_lic_pid).getElementsByTagName("h4")[i].className.split(' ')[0];
            $(ksjs_lic_pid).getElementsByTagName("div")[i].className="dis";
        }
        $(ksjs_lic_pid).getElementsByTagName("h4")[obj].className+=" sele";
        $(ksjs_lic_pid).getElementsByTagName("div")[obj].className="";
    }
}

//文章评论
function pl_fot()
{
    var pid="pl_fot";
    if($(pid))
    {
        $(pid).getElementsByTagName("textarea")[0].onmouseover=function(){this.focus(); this.className="hedden";}
        $(pid).getElementsByTagName("textarea")[0].onmouseout=function(){ if(this.value==""){ this.className="show";}}
        $(pid).getElementsByTagName("button")[0].onclick=function(){
            if($(pid).getElementsByTagName("textarea")[0].value==""){
                alert("评论不能为空。");
                $(pid).getElementsByTagName("textarea")[0].focus();
                $(pid).getElementsByTagName("textarea")[0].className="hedden";
            }else{
                var ajax=newXMLHttpRequest();
                var pinglun=$(pid).getElementsByTagName("textarea")[0].value;
                pinglun=pinglun.replace(/ /g,"|nbsp|");
                pinglun=pinglun.replace(/\n/g,"|br|");
                var urlpost=$(pid).getElementsByTagName("button")[0].id.value+"&pinglun="+pinglun;
                var url="/NewInfo.aspx?id="+urlpost;
                var waiting="处理中...";
                ajax.open("post",url,true);
            //定义传输的文件HTTP头信息
            ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
            ajax.send(urlpost);
                ajax.onreadystatechange=function()
                {
                    if(ajax.readyState==4 && ajax.status==200)
                    {
                        if(ajax.responseText.substring(0,2)=="NO")
                        {
                            openWindow("武警四川消防总队医院","您已经评论过了，请稍后再试。",300,80); 
                           
                        }else{
                            openWindow("武警四川消防总队医院",waiting,300,80); 
                            var mar=setInterval(function(){a()},500);
                            var k=0;
                            function a(){
                                $("content").children[2].innerHTML+=".";
                                k++;
                                if(k>3){
                                    clearInterval(mar); k=0;
                                    $("content").children[2].innerHTML="您评论已经提交审核。";
                                    setTimeout(function(){ heddenWindow($("window_frame"));heddenWindow($("window_main"));},3000);
                                    
                                }
                            }
                        }
                    }
                }
            }
         }
    }
}
function plunZC(plId,obj)
{
    var ajax=newXMLHttpRequest();
    var urlpost="plId="+plId;
    var url="/NewInfo.aspx?"+urlpost;
    ajax.open("get",url,true);
    //定义传输的文件HTTP头信息
    ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=UTF-8'");
    ajax.send(urlpost);
    ajax.onreadystatechange=function()
    {
        if(ajax.readyState==4 && ajax.status==200)
        {
            if(ajax.responseText.substring(0,2)=="NO")
            {
                alert("您已经支持过了.");
               
            }else{
                alert("谢谢支持.");
                obj.innerHTML="支持&nbsp;["+parseInt(parseInt( obj.innerHTML.split('[')[1].split(']')[0])+1)+"]";
            }
        }
    }
}
function lylx_searchLX()
{
    var pid="luxian";
    if($(pid))
    {
        $(pid).getElementsByTagName("input")[0].onblur=function(){this.value=this.value==""?"请输入您的出发地址..":this.value;};
        $(pid).getElementsByTagName("input")[0].onfocus=function(){this.value=this.value=="请输入您的出发地址.."?"":this.value;};
        $(pid).getElementsByTagName("button")[0].onclick=function(){checkSearchLX()};
        $(pid).getElementsByTagName("button")[1].onclick=function(){checkSearchLX()};
    }
    function checkSearchLX(){
        if($(pid).getElementsByTagName("input")[0].value!="请输入您的出发地址.." && $(pid).getElementsByTagName("input")[0].value!="")
        {
            var chufa=$(pid).getElementsByTagName("input")[0].value;
            var mudi=$(pid).getElementsByTagName("input")[1].value;
            window.open("http://www.mapbar.com/search/#ac=bus&st=b&qbus=1&mc=%E6%88%90%E9%83%BD%E5%B8%82&on="+chufa+"&dn="+mudi+"&wf=bs");
        }
        else{
            alert("请输入您的出发地址..");
        }
    }
}
function footBannerFloat()
{
    var pid="fot_banner_k";
    if($(pid)){
        document.write('<style type="text/css">#fot_banner_k{ width:980px; height:45px; overflow:hidden; margin:0 auto; *display:inline-block; position:relative/9;}#fot_banner{  width:980px; height:72px; background:url(/images/028footBanner.gif) no-repeat; z-index:999; margin:0 auto; position:fixed;_position:absolute;_top:expression(documentElement.scrollTop+documentElement.clientHeight-this.offsetHeight);  bottom:0; }#fot_banner h4{ float:left; width:422px; height:72px; text-indent:-9999px; }#fot_banner a{ float:left; width:162px; height:72px; text-indent:-9999px;}#fot_banner button{ float:left; width:145px; height:40px; margin:32px 0 0 45px; display:inline; background:0; text-indent:-9999px; cursor:pointer;}#fot_banner .btn{margin-left:25px;}</style>');
        
        var div2=document.createElement("div");
        div2.id="fot_banner";
        div2.innerHTML='<h4>国家公立——华西医院技术协作单位</h4><a href="javascript:void(0)" onclick="zixun()" target="_self">权威专家在线咨询</a><button onclick="tel()">免费电话咨询</button><button onclick="qq()" class="btn">咨询专家QQ</button>';
        $(pid).appendChild(div2);
    }
}

function backTop(){
    var pid="gotopbtn";
    var d=document.documentElement;
    if($(pid))
    {
        window.onscroll=function(){setHS()};
	    $(pid).onclick=function (){
		    $(pid).style.display="none";
		    window.onscroll=null;
		    this.timer=setInterval(function(){
			    d.scrollTop-=Math.ceil(d.scrollTop*0.2);
			    if(d.scrollTop==0) clearInterval($(pid).timer,window.onscroll=function(){setHS()});
		    },10);
	    };
	    function setHS(){$(pid).style.display=d.scrollTop?'block':"none"}
    }
}
function newXMLHttpRequest() {
    var xmlreq=false;
    if(window.XMLHttpRequest) {xmlreq=new XMLHttpRequest();} 
    else if(window.ActiveXObject) {
        try {xmlreq=new ActiveXObject("Msxml2.XMLHTTP"); } 
        catch(e1) 
        {
            try {xmlreq=new ActiveXObject("Microsoft.XMLHTTP");} catch(e2) {}
        }
    }
    return xmlreq;
}
function changeFloatLeft(){
  if($("LRfloater0")){
  
    $("LRfloater0").children[1].src="/images/leftent1.gif";
    $("LRfloater0_if").style.display="none"; 
    
    //移动到右边
    $("LRfloater0").style.left="";
    $("LRfloater0").style.marginLeft="";
    $("LRfloater0").style.marginTop="";
    $("LRfloater0").style.right="0px";
    $("LRfloater0").style.top="100px";
  }else { setTimeout(function(){changeFloatLeft()},10)}
}

function yaoqing(){
    if($("LRfloater1") && $("LR_Tb2"))
    {
      
            if($("LR_Tb2").style.display=="none")
            {
                $("LRfloater1").innerHTML="<div id=\"yqkDiv\" ><span onclick=\"LR_HideInvite();LR_RefuseChat();return\" class=\"span1\"><img src=\"/images/userEP_esc.png\"  style=\"width:13px; height:13px;\"/></span><span class=\"span2\"  onclick=\"openZoosUrl('chatwin');\"></span><span class=\"span3\"  onclick=\"openZoosUrl('chatwin');\"></span><ul class=\"yqkDiv_pd\" ><li><span>·中华网：</span><a target=\"_blank\" href=\"/news/30160.html\">2011年患者关注：四川省最受百姓欢迎的耳鼻喉医院</a></li><li ><span >·中国网：</span><a target=\"_blank\" href=\"/news/20306.html\">业内人士谈武警四川省消防总队医院耳鼻喉科优势</a></li><li ><span >·搜狐网：</span><a target=\"_blank\" href=\"/news/2012/1/3/30088.html\">八大事实验证西南耳鼻喉医院第一品牌</a></li><li ><span >·青年导报网：</span><a target=\"_blank\" href=\"/news/28561.html\">28岁事业男惊人誓言：这辈子就娶鼻炎女</a></li></ul></div>";
            }
            else
            {
                $("LR_Tb2").style.display="none";
                $("LRfloater1").innerHTML=$("LRfloater1").innerHTML+"<div id=\"yqkDiv\" ><span onclick=\"LR_HideInvite();LR_RefuseChat();return\" class=\"span1\"><img src=\"/images/userEP_esc.png\"  style=\"width:13px; height:13px;\"/></span><span class=\"span2\"  onclick=\"openZoosUrl('chatwin');\"></span><span class=\"span3\"  onclick=\"openZoosUrl('chatwin');\"></span><ul class=\"yqkDiv_pd\" ><li><span>·中华网：</span><a target=\"_blank\" href=\"/news/30160.html\">2011年患者关注：四川省最受百姓欢迎的耳鼻喉医院</a></li><li ><span >·中国网：</span><a target=\"_blank\" href=\"/news/20306.html\">业内人士谈武警四川省消防总队医院耳鼻喉科优势</a></li><li ><span >·搜狐网：</span><a target=\"_blank\" href=\"/news//30088.html\">八大事实验证西南耳鼻喉医院第一品牌</a></li><li ><span >·青年导报网：</span><a target=\"_blank\" href=\"/news/28561.html\">28岁事业男惊人誓言：这辈子就娶鼻炎女</a></li></ul></div>";
            }
       
    }
    setTimeout(function(){yaoqing()},20);
}


function showInviForm()
{
    Extend.addEvent(window, "onload", function(){
        setTimeout(function(){
            $("inviFormOuter").style.display = "block";
            var obj = $("newsForm");
            var left = Extend.getCurrentStyle(obj, "left");
            var top = Extend.getCurrentStyle(obj, "top");
            var height = obj.clientHeight;
            obj.style.top = height + "px";
            obj.style.display = "block";
            Extend.transform(obj, {top:0, defaultAlpha:0, opacity:1, noZIdx:true, duration:1});
            if($("LRfloater0")){$("LRfloater0").style.marginTop = "-40px";}
        }, 3000);
    });
    Extend.addEvent("inviFormAccept", "onclick", function(){
        Extend.transform("inviFormOuter", {defaultAlpha:1, opacity:0, noZIdx:true, hideEle:true});  
        if($("LRfloater0")){$("LRfloater0").style.marginTop = "0px";}
    });
    $("newsFormClose").onclick = function(){
        Extend.transform("newsForm", {defaultAlpha:1, opacity:0, top:173, noZIdx:true, hideEle:true});
        Extend.transform("inviFormOuter", {defaultAlpha:1, opacity:0, noZIdx:true, hideEle:true, duration:0.5});
        if($("LRfloater0")){$("LRfloater0").style.marginTop = "0px";}
        /*setTimeout(function(){
            var obj = $("inviForm");
            var left = Extend.getCurrentStyle(obj, "left");
            var top = Extend.getCurrentStyle(obj, "top");
            obj.style.top = "0px";
            obj.style.display = "block";
            Extend.transform(obj, {top:100, defaultAlpha:0, opacity:1, noZIdx:true, duration:0.8});
            setTimeout(function(){
                if($("inviForm").style.display == "block")
                {
                    shake("inviForm", undefined, left, top);
                }
            },3000);
        }, 2000)*/
    }
    /*$("inviFormClose").onclick = $("inviFormRefuse").onclick = function(){
        Extend.transform("inviFormOuter", {defaultAlpha:1, opacity:0, noZIdx:true, hideEle:true, duration:0.5});
    }*/
}

function shake(id,times,defaultLeft,defaultTop)
{
    var obj = $(id);
    if(id)
    {
        if(!times){ times = 25; }
        var count = 0;
        obj.defaultLeft = (defaultLeft)? defaultLeft : Extend.getCurrentStyle(obj, "left");
        obj.defaultTop =  (defaultTop)? defaultTop : Extend.getCurrentStyle(obj, "top"); 
        stopShake = setInterval(function()
        {
            if(count % 4 ==0)
            {
                obj.style.left = obj.defaultLeft;
                obj.style.top = obj.defaultTop;
            }
            if(times <= 0)
            {
                clearInterval(stopShake);
                obj.style.left = obj.defaultLeft;     
                obj.style.top = obj.defaultTop;
                return false;
            }
            var waveH = 3;
            var waveV = 4;
            var posL = parseInt(obj.defaultLeft);
            var posT = parseInt(obj.defaultTop);
            switch(count % 4)
            {
                case 0: 
                    posL += waveH;
                case 1:
                    posT +=waveV;
                case 2:
                    posL -=waveH;
                case 3:
                    posT -=waveV;    
            }
            obj.style.left = posL + "px";
            obj.style.top = posT + "px";
            count++;
            times--;   
        },40);
        /*if($("inviForm").style.display == "block")
        {
            obj.stopShake = setTimeout(function(){
                shake(obj, 100);
            },5000)
        }*/
    }   
}
