function MM_checkPlugin(plgIn, theURL, altURL, autoGo) { //v4.0
  var ok=false; document.MM_returnValue = false;
  with (navigator) if (appName.indexOf('Microsoft')==-1 || (plugins && plugins.length)) {
    ok=(plugins && plugins[plgIn]);
  } else if (appVersion.indexOf('3.1')==-1) { //not Netscape or Win3.1
    if (plgIn.indexOf("Flash")!=-1 && window.MM_flash!=null) ok=window.MM_flash;
    else if (plgIn.indexOf("Director")!=-1 && window.MM_dir!=null) ok=window.MM_dir;
    else ok=autoGo; }
  if (!ok) theURL=altURL; if (theURL) window.location=theURL;
}


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];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}


function Search_Send()
{
  if (document.Search.Search_Key.value == "")
 {
   alert("提示：请在搜索框中输入关键字！");
   document.Search.Search_Key.focus();}
else
{
Search.submit();
	}
}


function addthis(){
window.external.AddFavorite('http://www.***.com/', '华南技术交易网');
}


//检查文件格式----------------
function check_file()
{

file=myform.file1.value;
Arr=file.split(".");

  var file=myform.file1.value;
    if  (file.length > 5)
    { picOK=false; i = file.length-1; ch = file.charAt(i);

      if ( ch == "r" || ch == "R" )
      { i = i-1; ch = file.charAt(i);
      if ( ch == "a" || ch == "A" )
      { i = i-1; ch = file.charAt(i);
      if ( ch == "r" || ch == "R" )
      { i = i-1; ch = file.charAt(i);

      if ( ch == ".")
      { picOK=true; }

    }  }  } 


    else
    {
    if ( ch == "p" || ch == "P" )
    { i = i-1; ch = file.charAt(i);
    if ( ch == "i" || ch == "I" )
    { i = i-1; ch = file.charAt(i);
    if ( ch == "z" || ch == "Z" )
    { i = i-1; ch = file.charAt(i);
    if ( ch == ".")
    { picOK=true; }

  } } }



	}

  }
  if (picOK==false)
  {
	  alert("提示：文件格式必须为[ RAR或ZIP ]，请重新选择！"); 
      return false;
  } 


}


//打开小窗口------------------------------------------------------>>
function openWIN(URL, w, h)
{
	var news=window.open(URL, 'OpenName', 'width='+w+', height='+h+', resizable="no",scrollbars=yes');
	news.focus();
}
//End----------------------------------------------------------->>


//显示和隐藏表格
function Show(tbName)
{
//alert(tbName);
	for(i=1; i<170000; i++)
	{
		tb="tb"+i+"";
		if(tb==tbName)
			document.all(tb).style.display="";
//		else
//	document.all(tb).style.display="none";
}
}
//隐藏
function Hide(tbName)
{
	for(i=1; i<170000; i++)
	{
		tb="tb"+i+"";
		if(tb==tbName)
			document.all(tb).style.display="none";
}
}
//End----------------------------------------------------------->>



//检查上传文件格式是否GIF或JPG，一齐检查5个上传文件------------------------------------------------------>>

function checkfile(theForm)
{
//------检查作者头像图文件格式是否JPG或者GIF------------------

file=myform.file1.value;
Arr=file.split(".");

  var file=theForm.file1.value;
    if  (file.length > 5)
    { picOK=false; i = file.length-1; ch = file.charAt(i);
      if ( ch == "g" || ch == "G" )
      { i = i-1; ch = file.charAt(i);
      if ( ch == "p" || ch == "P" )
      { i = i-1; ch = file.charAt(i);
      if ( ch == "j" || ch == "J" )
      { i = i-1; ch = file.charAt(i);
      if ( ch == ".")
      { picOK=true; }

    }  }  }
    else
    {
    if ( ch == "f" || ch == "F" )
    { i = i-1; ch = file.charAt(i);
    if ( ch == "i" || ch == "I" )
    { i = i-1; ch = file.charAt(i);
    if ( ch == "g" || ch == "G" )
    { i = i-1; ch = file.charAt(i);
    if ( ch == ".")
    { picOK=true; }

  } } }

  }
  if (picOK==false)
  { alert("对不起，文件格式必须为[ Jpg ]或[ Gif ]，请重新选择！"); return(false); } 
  
}

}
//提示确认框----------->>>
function AreYouOK(ms)
 {
  return confirm(ms)
 }


//图片变淡效果

nereidFadeObjects = new Object();
nereidFadeTimers = new Object();
function nereidFade(object, destOp, rate, delta)
{
	if (!document.all)
		return
  if (object != "[object]")
	{  
		setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0);
		return;
	}
	clearTimeout(nereidFadeTimers[object.sourceIndex]);
	diff = destOp-object.filters.alpha.opacity;
	direction = 1;
	if (object.filters.alpha.opacity > destOp)
	{
		direction = -1;
	}
	delta=Math.min(direction*diff,delta);
	object.filters.alpha.opacity+=direction*delta;
	if (object.filters.alpha.opacity != destOp)
	{
		nereidFadeObjects[object.sourceIndex]=object;
		nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
  }
}

