/*

          - ¤╭⌒╮ ╭⌒╮欢迎光临新沂招考网！              
          ╱◥██◣ ╭╭⌒ www.xyzk.net                      
         ︱田︱田田| ╰-------- 有您的支持，我们会做得更好！  
          ╬╬╬╬╬╬╬╬╬╬                                
*/

//鼠标划过显示浮动菜单提示
//<!-- 
//***********默认设置定义.*********************
tPopWait=0;//停留tWait豪秒后显示提示。
tPopShow=5000;//显示tShow豪秒后关闭提示
showPopStep=20;
popOpacity=99;

//***************内部变量定义*****************
sPop=null;
curShow=null;
tFadeOut=null;
tFadeIn=null;
tFadeWaiting=null;

document.write("<style type='text/css'id='defaultPopStyle'>");
document.write(".cPopText {font:14px; background-image: url(images/bottom_img.gif); background-color:#ffffcc; color:#030303;border: 1px #cccccc solid; padding-right: 4px; padding-left: 4px; height: 20px; padding-top: 3px; padding-bottom: 1px; filter: Alpha(Opacity=0)}");
document.write("</style>");
document.write("<div id='dypopLayer' style='position:absolute;z-index:1000;' class='cPopText'></div>");
document.onmouseover=showPopupText;

function showPopupText(){
var o=event.srcElement;
	MouseX=event.x;
	MouseY=event.y;
	if(o.alt!=null && o.alt!=""){o.dypop=o.alt;o.alt=""};
        if(o.title!=null && o.title!=""){o.dypop=o.title;o.title=""};
	if(o.dypop!=sPop) {
			sPop=o.dypop;
			clearTimeout(curShow);
			clearTimeout(tFadeOut);
			clearTimeout(tFadeIn);
			clearTimeout(tFadeWaiting);	
			if(sPop==null || sPop=="") {
				dypopLayer.innerHTML="";
				dypopLayer.style.filter="Alpha()";
				dypopLayer.filters.Alpha.opacity=0;	
				}
			else {
				if(o.dyclass!=null) popStyle=o.dyclass 
					else popStyle="cPopText";
				curShow=setTimeout("showIt()",tPopWait);
			}
	}
}

function showIt(){
		dypopLayer.className=popStyle;
		dypopLayer.innerHTML=sPop;
		popWidth=dypopLayer.clientWidth;
		popHeight=dypopLayer.clientHeight;
		if(MouseX+12+popWidth>document.body.clientWidth) popLeftAdjust=-popWidth-24
			else popLeftAdjust=0;
		if(MouseY+12+popHeight>document.body.clientHeight) popTopAdjust=-popHeight-24
			else popTopAdjust=0;
		dypopLayer.style.left=MouseX+12+document.body.scrollLeft+popLeftAdjust;
		dypopLayer.style.top=MouseY+12+document.body.scrollTop+popTopAdjust;
		dypopLayer.style.filter="Alpha(Opacity=0)";
		fadeOut();
}

function fadeOut(){
	if(dypopLayer.filters.Alpha.opacity<popOpacity) {
		dypopLayer.filters.Alpha.opacity+=showPopStep;
		tFadeOut=setTimeout("fadeOut()",1);
		}
		else {
			dypopLayer.filters.Alpha.opacity=popOpacity;
			tFadeWaiting=setTimeout("fadeIn()",tPopShow);
			}
}

function fadeIn(){
	if(dypopLayer.filters.Alpha.opacity>0) {
		dypopLayer.filters.Alpha.opacity-=1;
		tFadeIn=setTimeout("fadeIn()",1);
		}
}
// -->

//写入Flash
function WriteFlash(flash,_width,_height) {
	document.writeln("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab\" width=\"" + _width + "\" height=\"" + _height + "\">");
	document.writeln("  <param name=\"movie\" value=\"" + flash + "\" />");
	document.writeln("  <param name=\"quality\" value=\"high\" />");
	document.writeln("  <param name=\"wmode\" value=\"transparent\" />");
	document.writeln("  <embed src=\"" + flash + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + _width + "\" height=\"" + _height + "\"></embed>");
	document.writeln("</object>");
}

//防止被人frame
if (top.location !=self.location)
{
	top.location=self.location;
}

//双击自动滚屏
var currentpos,timer; 

function initialize() 
{ 
	timer=setInterval("scrollwindow()",16); 
} 
function sc(){ 
	clearInterval(timer); 
} 
function scrollwindow() 
{ 
	currentpos=document.body.scrollTop; 
	window.scroll(0,++currentpos); 
	if (currentpos != document.body.scrollTop) 
	sc(); 
}

document.onmousedown=sc 
document.ondblclick=initialize


function ShowNews(ID)//弹出非模式窗口
{
	var Win = window.open("ShowNews.aspx?ID="+ID,"_blank",'width="760px",height="600px",resizable=1,scrollbars=yes,menubar=yes,status=yes Raised=center' );
	//var winopen=window.showModelessDialog("ShowNews.aspx?ID="+ID,"_blank","dialogHeight: 600px; dialogWidth: 760px; edge: Raised; center: Yes; help: Yes; resizable: No; status: No;");
}


function ShowModelessDialog(Url,Height,Width)//弹出模式窗口
{
	var winOpen=window.showModelessDialog(Url,"_blank","dialogHeight: " + Height + "px; dialogWidth: " + Width + "px; edge: Raised; center: Yes; help: Yes; resizable: No; status: No;");
}
function SchoolOpen(ID)//学校登录栏目弹出窗口
{
	//var Win = window.open(url,"_blank",'width=640,height=480,resizable=1,scrollbars=yes,menubar=yes,status=yes Raised=center' );
	var winopen=window.showModalDialog("ShowNews.aspx?School=School&ID="+ID,"_blank","dialogHeight: 600px; dialogWidth: 800px; edge: Raised; center: Yes; help: Yes; resizable: No; menubar: Yes; status: No;");
}

function AutoOpen(url)//首页自动弹出窗口
{
	var AutoOpen=window.showModelessDialog(url,"_blank","dialogHeight: 500px; dialogWidth: 550px; edge: Raised; center: Yes; help: Yes; resizable: No; status: No;");
}

function AutoSizeCenter()//窗体自动调整大小并居中

{
	var x=648;
	var y=460;
	
	if (window.screen.width>=800){
		x=800;
		y=580;
	}
	if (window.screen.width>=1024){
		x=1024;
		y=748;
	}

	var xx=(window.screen.width-x)/2;
	var yy=(window.screen.height-y)/2;

	window.resizeTo(x,y);
	window.moveTo(xx,0);
	//setTimeout("AutoSizeCenter()",50)
}

function switchStyle(turnon)    //设置字体大小
{
	  switch(turnon){
		 case 'small':
			  content.style.fontSize='12px';
			  content.style.lineHeight='20px';	
			  Caption.style.fontSize='16px';
			  break;
		 case 'medium':
			  content.style.fontSize='14px';
			  content.style.lineHeight='22px';			 
			  Caption.style.fontSize='18px';
			  break;
		 case 'large':
			  content.style.fontSize='18px';
			  content.style.lineHeight='25px';		 
			  Caption.style.fontSize='22px';
			  break;
	  }
	}
//导航栏
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_nbGroup(event, grpName) { //v6.0
var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
    } }
  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])?args[i+1] : img.MM_up);
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.MM_nbOver.length; i++) { img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
  } else if (event == "down") {
    nbArr = document[grpName];
    if (nbArr) for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
      nbArr[nbArr.length] = img;
  } }
}

function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
