﻿function $g(o){ return document.getElementById(o);};

function CheckIp() {
    if (document.Look_Ip.word.value.length == "") {
        alert("对不起，请输入您要查询的IP或域名！");
        document.Look_Ip.word.focus();
        return false;
    }
    ii = 0;
    bString = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.";
    while (ii < document.Look_Ip.word.value.length) {
        if (bString.indexOf(document.Look_Ip.word.value.substring(ii, ii + 1)) == -1) {
            alert("对不起，只能输入数字、字母和.号！");
            document.Look_Ip.word.focus();
            return false;
        }
        ii = ii + 1;
    }

    return true;
} 
function mLeft(show_pic,marquePic1,marquePic2){
var speed=5,speediness=2000 ;
var thisSpeed=0;
  var MyMar;
	$g(marquePic2).innerHTML=$g(marquePic1).innerHTML ;  
	function Marquee(){ 
		if($g(marquePic2).offsetWidth-$g(show_pic).scrollLeft<=0) 
			$g(show_pic).scrollLeft-=$g(marquePic1).offsetWidth ;
		else{  
		    $g(show_pic).scrollLeft+=2;
		    if($g(show_pic).scrollLeft % 120==0){ thisSpeed =speediness; }else{thisSpeed =speed; }		    
		}  
		MyMar=setTimeout(Marquee,thisSpeed) ;
	};
	  
    MyMar=setTimeout(Marquee,thisSpeed) ;
	$g(show_pic).onmouseover=function() {clearInterval(MyMar);} ;
	$g(show_pic).onmouseout=function() {MyMar=setTimeout(Marquee,thisSpeed);} ;
	 
};
 
