
function changeto(highlightcolor){
source=event.srcElement
if (source.tagName=="TR"||source.tagName=="TABLE")
return
while(source.tagName!="TD")
source=source.parentElement
if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
alert
source.style.backgroundColor=highlightcolor
}

function changeback(originalcolor){
if (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")
return
if (event.toElement!=source)
source.style.backgroundColor=originalcolor
}
function show()
{
var rng=document.body.createTextRange();
}

function topturnit(ss)
{
topcloseall();
ss.style.display="";
}
function topcloseall()
{
topcloseit(tmenu1); 
topcloseit(tmenu2);
topcloseit(tmenu3);
topcloseit(tmenu4);
topcloseit(tmenu5);
topcloseit(tmenu6);

}
function topcloseit(ss)
{
    ss.style.display="none";
}


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 lio()
 {
 var div1=document.getElementById("2");
 var div2=document.getElementById("3");
// var div3=document.getElementById("4");

 var hm;
 hm=div1.scrollHeight>div2.scrollHeight?div1.scrollHeight:div2.scrollHeight;
 if (hm<400)
   hm=400;
 div1.style.height=hm;
 div2.style.height=hm;
// div3.style.height=hm;

 }

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_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

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_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function sure2(obj){
   
   if(obj.keywords.value ==""){
	alert('Please input the keywords!');
	obj.keywords.focus();
	return false;
   } 

   obj.submit();
}

function sure(obj){
   if(obj.name.value ==""){
	alert('请输入名字!');
	obj.name.focus();
	return false;
   }
   if(obj.mail.value ==""){
	alert('请输入邮件!');
	obj.mail.focus();
	return false;
   }
   if(obj.dz.value ==""){
	alert('请输入地址!');
	obj.dz.focus();
	return false;
   }
    if(obj.yj.value ==""){
	alert('请写内容!');
	obj.yj.focus();
	return false;
   }
    obj.submit();
}

var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
//extra height in px to add to iframe in FireFox 1.0+ browsers
var FFextraHeight=getFFVersion>=0.1? 16 : 0 

function dyniframesize(iframename) {


  var pTar = null;
  if (document.getElementById){
    pTar = document.getElementById(iframename);
  }
  else{
    eval('pTar = ' + iframename + ';');
  }
  if (pTar && !window.opera){
    //begin resizing iframe
    pTar.style.display="block"
    
    if (pTar.contentDocument && pTar.contentDocument.body.offsetHeight){
      //ns6 syntax
      pTar.height = pTar.contentDocument.body.offsetHeight+FFextraHeight; 
    }
    else if (pTar.Document && pTar.Document.body.scrollHeight){
      //ie5+ syntax
      pTar.height = pTar.Document.body.scrollHeight;
    }
  }
}

function tick() { 
var hours, minutes, seconds, xfile; 
var intHours, intMinutes, intSeconds; 
var today, theday; 
var Clock=document.getElementById("Clock");
today = new Date(); 
function initArray(){ 
this.length=initArray.arguments.length 
for(var i=0;i<this.length;i++) 
this[i+1]=initArray.arguments[i] } 
var d=new initArray( 
"星期日", 
"星期一", 
"星期二", 
"星期三", 
"星期四", 
"星期五", 
"星期六"); 
theday = today.getYear()+"年" + [today.getMonth()+1]+"月" +today.getDate() + d[today.getDay()+1]; 
intHours = today.getHours(); 
intMinutes = today.getMinutes(); 
intSeconds = today.getSeconds(); 
if (intHours == 0) { 
hours = "12:"; 
xfile = "午夜"; 
} else if (intHours < 12) { 
hours = intHours+":"; 
xfile = "上午"; 
} else if (intHours == 12) { 
hours = "12:"; 
xfile = "正午"; 
} else if (intHours > 12&&intHours<18){ 
hours = intHours+":";
xfile = "下午"; 
} else{ 
intHours = intHours 
hours = intHours + ":"; 
xfile = "晚上"; 
} 

if (intMinutes < 10) { 
minutes = "0"+intMinutes+":"; 
} else { 
minutes = intMinutes+":"; 
} 
if (intSeconds < 10) { 
seconds = "0"+intSeconds+" "; 
} else { 
seconds = intSeconds+" "; 
} 
timeString ="今天是:"+theday+ xfile +hours+minutes+seconds; 
Clock.innerHTML = timeString; 
window.setTimeout("tick();", 100); 
} 

function expandIt(el) {

        obj = eval("list" + el);
       
        if (obj.style.display == "none") {
           // alert("1111");
			obj.style.display = "block";
		
        }
        else {
         // alert("dfdsf");
		  obj.style.display = "none";

        }
		var divCount2 = document.getElementById('all').getElementsByTagName("div");
		//divCount2 = document.all.tags("DIV");

		for (i=0;i<divCount2.length; i++) {
            obj2 = divCount2(i);
            if (obj2!=obj) 
			{obj2.style.display = "none";}
			          
            }
			
}
	
