﻿function KeyDown(){
 if ((event.ctrlKey)&&(event.keyCode==78))   //屏蔽 Ctrl+n
     event.returnValue=false;
  if ((event.shiftKey)&&(event.keyCode==121)) //屏蔽 shift+F10
     event.returnValue=false;
   if(event.shiftKey&&event.button==1)
  {
    alert("欢迎使用JYC网站访问统计分析系统！\n\n Welcome to www.adjyc.com");
  }
 /*if ((window.event.altKey)&&(window.event.keyCode==115)){ //屏蔽Alt+F4
      window.showModelessDialog("about:blank","","dialogWidth:1px;dialogheight:1px");
      return false;
	  }*/
		
  }
document.onkeydown = KeyDown;  // for all others 
document.onmousedown=KeyDown;
window.status='网络宣传效果尽在www.adjyc.com掌握！JYC统计，助您决策！';
var re = /<a\b[^>]*>([^<]*)<\/a>/gi;
//var re = /<\/?a[^>]*?>/ig;
function showMDialog(u,d) {
           var iWidth=800; //窗口宽度
           var iHeight=600;//窗口高度
           var iTop=(window.screen.height-iHeight)/2;
           var iLeft=(window.screen.width-iWidth)/2;
           window.open(u,d,"alwaysRaised=yes,z-look=yes;menubar=no,status=no,Scrollbars=yes,Toolbar=no,Location=no,Direction=no,Resizeable=yes,Width="+iWidth+" ,Height="+iHeight+",top="+iTop+",left="+iLeft);
}
function ShowDialog(u,d) {
           var iWidth=800; //窗口宽度
           var iHeight=600;//窗口高度
           var iTop=(window.screen.height-iHeight)/2;
           var iLeft=(window.screen.width-iWidth)/2;
           window.showModalDialog(u,d,"dialogWidth:"+iWidth+"px;dialogHeight:"+iHeight+"px;dialogTop:"+iTop+"px;dialogleft:"+iLeft+"px;help=no;status=no;center=yes;edge=sunken;resizable=yes;Minimize=yes;Maximize=yes");
}

function changedate()
{var start = document.search.start.value;
var finish = document.search.finish.value;
var s=start.replace("-","/");
var f=finish.replace("-","/");
var d1 = new Date(s);
var d2 = new Date(f);
if(Date.parse(d1) - Date.parse(d2)>0){
alert("起始时间不能大于终止时间！");
return false;
}
else{
document.search.submit();
}
}
function changedate1()
{var start = document.search1.start.value;
var finish = document.search1.finish.value;
var s=start.replace("-","/");
var f=finish.replace("-","/");
var d1 = new Date(s);
var d2 = new Date(f);
if(Date.parse(d1) - Date.parse(d2)>0){
alert("起始时间不能大于终止时间！");
return false;
}
else{
document.search1.submit();
}
}
