﻿
function correctPNG() 
{
for(var i=0; i<document.images.length; i++)
{
var img = document.images[i]
var imgName = img.src.toUpperCase()
if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
{
var imgID = (img.id) ? "id='" + img.id + "' " : ""
var imgClass = (img.className) ? "class='" + img.className + "' " : ""
var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
var imgStyle = "display:inline-block;" + img.style.cssText 
if (img.align == "left") imgStyle = "float:left;" + imgStyle
if (img.align == "right") imgStyle = "float:right;" + imgStyle
if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle 
var strNewHTML = "<span "+ imgID + imgClass + imgTitle + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";" + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader" + "(src='" + img.src + "', sizingMethod='scale');\"></span>" 
img.outerHTML = strNewHTML
i = i-1
}
}
}
//window.attachEvent("onload", correctPNG); 
function inputAutoClear(ipt){
  ipt.onfocus=function(){
    if(this.value==this.defaultValue){this.value='';}
  };
  ipt.onblur=function(){
    if(this.value==''){this.value=this.defaultValue;}
  };
  if(ipt.value==ipt.defaultValue){ipt.value='';}
}
function tabs_z(o,o2,n,otag,o2tag){
//onmouseover="tabs_z('td_menu','td_menulist',0,'a','div')"
	var m_n = document.getElementById(o).getElementsByTagName(otag);
	var c_n = document.getElementById(o2).getElementsByTagName(o2tag);
	for(i=0;i<m_n.length;i++)
	   {

	//	 alert(m_n[i].className)
	//	 alert(c_n[i].className)
     	 m_n[i].className=i==n?"s":"nos";
		 c_n[i].className=i==n?"dis":"undis";
	//	 alert(m_n[i].className)
	//	 alert(c_n[i].className)
	}
}


function vjTrack()
{
 document.write(' class="current" ' );
}

function tabChange(obj,id)
{

 var arrayli = obj.parentNode.getElementsByTagName("li"); //获取li数组
 var arrayul = document.getElementById(id).getElementsByTagName("ul"); //获取ul数组
 for(i=0;i<arrayul.length;i++)
 {
  if(obj==arrayli[i])
  {//alert(document.all.AreaName.value)
   arrayli[i].className = "cli";
   arrayul[i].className = "";
  }
  else
  {
   arrayli[i].className = "";
   arrayul[i].className = "hidden";
  }
 }
}


function fengye(){
    var Div=document.createElement("div");
    Div.id="fengye";
    Div.style.position="absolute";
    Div.style.top="20px";
    Div.style.left="10px";
    Div.innerHTML='<a href="http://www.sjfzxm.com" target="_blank"><img src="http://www.fengyekun.com/Images/fengye.jpg" alt="枫叶随风网" border="0" /></a>'
    document.body.appendChild(Div);
    setInterval(Float,20);
}
function Float(){
    var Did=document.getElementById("fengye");
    var MarginTop=20;
    var Diff=(document.documentElement.scrollTop + MarginTop - parseInt(Did.style.top))*.70;
    Did.style.top=MarginTop+document.documentElement.scrollTop-Diff+"px";
}

function QQLine(Direction,MarginX,MarginY){
    // Direction：参数值为left|right
    // MarginX：X轴方向边距
    // MarginY：顶边距
    var Html="<div style=\"width:109px; height:34px; background:url(/Images/qq_top.gif);\"><img style=\"float:right; margin:4px 8px 0px 0px; cursor:pointer;\" title=\"关闭\" onclick=\"JavaScript:document.getElementById('qqline').style.display='none'\" src=\"/Images/qq_close.gif\" /></div>";
    Html+="<div style=\"width:109px; height:100px; text-align:center;background:url(/Images/qq_middle.gif);background-color:#FFF;\">";
    
    Html+="<p style=\"padding-top:7px;\">客服1<a href=\"tencent://message/?uin=1142615717&Site=客服1&Menu=yes\"><img style=\"vertical-align:middle;\" border=\"0\" title=\"客服1\" src=\"/Images/qq_online.gif\" /></a></p>";
    Html+="<p style=\"padding-top:7px;\">客服2<a href=\"tencent://message/?uin=1105251902&Site=客服2&Menu=yes\"><img style=\"vertical-align:middle;\" border=\"0\" title=\"客服2\" src=\"/Images/qq_online.gif\" /></a></p>";
    Html+="<p style=\"padding-top:7px;\">客服3<a href=\"tencent://message/?uin=764606585&Site=客服3&Menu=yes\"><img style=\"vertical-align:middle;\" border=\"0\" title=\"客服3\" src=\"/Images/qq_online.gif\" /></a></p>";
    Html+="<p style=\"padding-top:7px;\">客服4<a href=\"tencent://message/?uin=931307454&Site=客服4&Menu=yes\"><img style=\"vertical-align:middle;\" border=\"0\" title=\"客服4\" src=\"/Images/qq_online.gif\" /></a></p>";
    
    Html+="</div>";
    Html+="<div><img src=\"/Images/qq_bottom.gif\" /></div>";
    Html+="<div><img src=\"/Images/qq_logo.gif\" /></div>";

    var Div=document.getElementById("qqline");
    Div.id="qqline";
    Div.style.position="absolute";
    Div.style.top=MarginY+"px";
    Div.style.zIndex=1000;
    if (Direction=="left"){
        Div.style.left=MarginX+"px";
    }
    if (Direction=="right"){
        Div.style.right=MarginX+"px";
    }
    Div.innerHTML=Html;
  //  document.body.appendChild(Div);
    setInterval(FloatDiv,20);
    
    function FloatDiv(){
        var Did=document.getElementById("qqline");
        var DidTop=parseInt(Did.style.top);
        var Diff=(document.documentElement.scrollTop + MarginY - DidTop)*.70;
        Did.style.top=MarginY+document.documentElement.scrollTop-Diff+"px";
        if (Direction=="left"){
            Did.style.left=MarginX+"px";
        }
        if (Direction=="right"){
            Did.style.right=MarginX+"px";
        }
    }    
}


