﻿onload=regLabelEvl;
var count=0;
 function regLabelEvl()
 {

 }

function getObj(id)
{
    return document.getElementById(id);
}
function DrawImage(ImgD,kw,kh)
{
 var image=new Image();
 image.src=ImgD.src;
  kh=280;
 if(image.height+200<image.width)//说明宽》高＝＝》以宽为标准
 {
       
		if(image.width>kw)
		{
	   ImgD.width=kw;
	   ImgD.height=(image.height*kw)/image.width;
		}
	 else
	  {
	   ImgD.width=image.width; 
	   ImgD.height=image.height;
	  }
 }
 else//以高为标准
 {
		if(image.height>kh)
		{
	   ImgD.height=kh;
	   ImgD.width=(image.width*kh)/image.height;
		}
	 else
	  {
	   ImgD.width=image.width; 
	   ImgD.height=image.height;
	  }
 } 
 setPhotoLoadState()
}
function setPhotoLoadState()
{	
    if(document.all)
    {
        
    }
    else
    {
        document.getElementById("imgload").innerHTML="";
        return;
    }
	var Obj11Div,Obj13Div,Obj13Div,loadState,imgCount,completeCount,msg;
	loadState=true;
	imgCount=0;
	completeCount=0;
	Obj11Div=document.getElementById("imgurl");
	Obj12Div=document.getElementById("img1");
	Obj13Div=document.getElementById("img2");
	if(Obj11Div!=null)imgCount++;
	if(Obj12Div!=null)imgCount++;
	if(Obj13Div!=null)imgCount++;
	if(imgCount<1)
	{
	    window.setTimeout("setPhotoLoadState()",800);
	    return;
	}	
	if(Obj11Div!=null && Obj11Div.readyState!="complete")
	{
	    loadState=false;
	    completeCount++;
	}
	if(Obj11Div!=null && Obj12Div.fileSize!=-1 && Obj12Div.readyState!="complete")
	{
	    loadState=false;
	    completeCount++;
	}
	if(Obj11Div!=null && Obj13Div.fileSize!=-1 && Obj13Div.readyState!="complete")
	{
	    loadState=false;
	    completeCount++;
	}
	completeCount=imgCount-completeCount;
	
	if(completeCount>0)
	{
	    msg=completeCount;
	    document.getElementById("imgload").innerHTML=msg;
	}
	
    if(loadState)
    {
	    document.getElementById("imgload").innerHTML="Complete!";	    
	    window.setTimeout("setimgload()",500);  
    }
    else
    {
        window.setTimeout("setPhotoLoadState()",800);   
    }
    
}
function mousemoveTd(obj)
{
    if(document.getElementById("td11")!=null)document.getElementById("td11").className ="mouseout" ; 
    if(document.getElementById("td12")!=null)document.getElementById("td12").className ="mouseout" ; 
    if(document.getElementById("td13")!=null)document.getElementById("td13").className ="mouseout" ; 
    document.getElementById("td11Div").className="LayerB";
    document.getElementById("td12Div").className="LayerB";
    document.getElementById("td13Div").className="LayerB";
    obj.className="mousemove";
    document.getElementById(obj.id+"Div").className="LayerA";
    setContentDiv()
}
function setimgload()
{
    document.getElementById("imgload").style.display="none";
}
