<!--
//手机归属地查询
function ShowTel ()
{
  document.getElementById("ShowTel").style.display = "none";
}

function CreateInitAjax ()
{
    if ( window.ActiveXObject ) { xmlHttp = new ActiveXObject ( "Microsoft.XMLHTTP" ) ; }

    if ( window.XMLHttpRequest ) { xmlHttp = new XMLHttpRequest ( ) ; }

    return xmlHttp ;
}

function MyOnchange ( Url , ObjShow )
{
    var Ajax = CreateInitAjax () ;
	document.getElementById("ShowTel").style.display = "block";
	document.getElementById("ShowTel").innerHTML="<ul><li>正在加载，请稍候</li></ul>";
    Ajax.open ( "GET" , Url , true ) ;
    Ajax.onreadystatechange = function ( ) { if ( Ajax.readyState == 4 && Ajax.status == 200 ) ObjShow.innerHTML = Ajax.responseText ; }
    Ajax.send ( null ) ;
};

// -->



// JavaScript Document
/*
* created by hobo at 2007-6-26
*/
var MiniSite = new Object();

MiniSite.Browser = {
        ie: /msie/.test(window.navigator.userAgent.toLowerCase()),
        moz: /gecko/.test(window.navigator.userAgent.toLowerCase()),
        opera: /opera/.test(window.navigator.userAgent.toLowerCase())
};

MiniSite.$ = function(s)
{
        return (typeof s == 'object') ? s: document.getElementById(s);
};

MiniSite.JsLoader = {
        load: function(sUrl, fCallback)
        {
                var _script = document.createElement('script');
                _script.setAttribute('type', 'text/javascript');
                _script.setAttribute('src', sUrl);
                document.getElementsByTagName('head')[0].appendChild(_script);

                if (MiniSite.Browser.ie)
                {
                        _script.onreadystatechange = function()
                        {
                                if (this.readyState=='loaded' || this.readyState=='complete')
                                {
                                        fCallback();
                                }
                        };
                }
                else if (MiniSite.Browser.moz)
                {
                        _script.onload = function()
                        {
                                fCallback();
                        };
                }
                else
                {
                        fCallback();
                }
        }
};

MiniSite.Cookie = {
        set: function(name, value, expires, path, domain)
        {
                if (typeof expires == "undefined")
                {
                        expires = new Date(new Date().getTime() + 365*24*3600*100);
                }

                document.cookie = name + "=" + escape(value) +
                        ((expires) ? "; expires=" + expires.toGMTString() : "") +
                        ((path) ? "; path=" + path : "; path=/") +
                        ((domain) ? "; domain=" + domain : "");
        },

        get: function(name)
        {
                var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));

                if (arr != null)
                {
                        return unescape(arr[2]);
                
                }

                return null;
        },

        clear: function(name, path, domain)
        {
                if (this.get(name))
                {
                        document.cookie = name + "=" +
                                ((path) ? "; path=" + path : "; path=/") +
                                ((domain) ? "; domain=" + domain : "") +
                                ";expires=Fri, 02-Jan-1970 00:00:00 GMT";
                }
        }
};


//缩放图片
var flag=false;
function DrawImage(ImgD)
{
   var image=new Image();
   image.src=ImgD.src;
   if(image.width>0 && image.height>0)
	{
			flag=true;
			if(image.width/image.height>= 300/250)
			{
				if(image.width>300){  
					ImgD.width=300;
					ImgD.height=(image.height*300)/image.width;
				}
				else
				{
					ImgD.width=image.width;  
					ImgD.height=image.height;
				}
				//ImgD.alt=image.width+"&#215;"+image.height;
		 }
		else
		{
			 if(image.height>250)
			{  
				ImgD.height=250;
				ImgD.width=(image.width*250)/image.height;     
			}
			else
			{
				ImgD.width=image.width;  
				ImgD.height=image.height;
			}
		 //ImgD.alt=image.width+"&#215;"+image.height;
		 }
    }
} ;






var flag=false; 
function DrawImage(ImgD){ 
 var image=new Image(); 
 image.src=ImgD.src; 
 if(image.width>0 && image.height>0){ 
  flag=true; 
  if(image.width/image.height>= 470/300){ 
   if(image.width>470){
    ImgD.width=470; 
    ImgD.height=(image.height*470)/image.width; 
   }else{ 
    ImgD.width=image.width;
    ImgD.height=image.height; 
   } 
   ImgD.alt=image.width+"x"+image.height; 
  } 
  else{ 
   if(image.height>300){
    ImgD.height=300; 
    ImgD.width=(image.width*300)/image.height; 
   }else{ 
    ImgD.width=image.width;
    ImgD.height=image.height; 
   } 
   ImgD.alt=image.width+"x"+image.height; 
  } 
 }
};

//有效时间
function check_tdate(odate){ 
 var checkArray= new Array() ;
 //nowArray    = odate.split(" ");
 checkArray    = odate.split("-"); 
 checkDate   = new  Date(checkArray[0],checkArray[1],checkArray[2]);
 
 var nowTime   = new Date();// 现在时间
 var the_year  = nowTime.getYear(); 
 var the_month = nowTime.getMonth() + 1; 
 var the_day   = nowTime.getDate();
 nowTime    = new  Date(the_year,the_month,the_day); 
 
 var thesecond = 24 * 60 * 60 *1000 ; 
 var diffTime    = (nowTime - checkDate)/thesecond;//计算天数
 if (diffTime>0)
 {
 myreturn = '已过期'; //
 }
 else if (diffTime==0)
 {
 myreturn = '今天到期了啊';
 }
 else
  {
 diffTime=0-diffTime;
 myreturn = '还有'+diffTime+'天';
 }
 
 //alert(myreturn); 
document.write(''+myreturn+'')
};


<!--
document.body.oncopy = function () { setTimeout( function () { var text = clipboardData.getData("text"); if (text) { text = text + "本文章转自:工程大视界（http://www.7566.net）"; clipboardData.setData("text", text); } }, 100 ) }
//-->
