var globopObject;var opIndex=0;
var cleared=true;var direction=10;
function dynOpacity(opObject,stop)
{if (stop) {clearInterval(window.tm);cleared=true;
opIndex=10;return;}
globopObject=opObject;if (opIndex>110) direction=-10;if (opIndex<0) direction=4;
opIndex+=direction;globopObject.style.filter='alpha(opacity:' + opIndex + ')';
if (cleared)
{window.tm=setInterval("dynOpacity(globopObject,false);",1);cleared=false;}}
function handleevent()
{if (event.type=="mouseover")if(event.srcElement.tagName=="IMG")
if (event.srcElement.parentElement.tagName=="A")
{dynOpacity(event.srcElement,false);}
if (event.type=="mouseout")if(event.srcElement.tagName=="IMG") 
{event.srcElement.style.filter="";dynOpacity(event.srcElement,true); }}
document.onmouseover=handleevent;
document.onmouseout=handleevent;

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];}}
}

var flag=false;
function DrawImage(ImgD,iwidths,iheights){
    //参数(图片,允许的宽度,允许的高度)
    var image=new Image();
    image.src=ImgD.src;
   // if(image.width>0 && image.height>0)
	 if(image.width>image.height){

	 iwidth=iheights+20
	 iheight=iwidths+20
	 ImgD.style.top="-5px"
	 ImgD.style.left="-30px"
	 }
	 else{
	 iwidth=iwidths
	 iheight=iheights
	 ImgD.style.top="-10px"
	 ImgD.style.left="-10px"
	 }
	 
	 
	//{
    flag=true;
	
    if(image.width/image.height>= iwidth/iheight){
        if(image.width>iwidth){  
        ImgD.width=iwidth;
        ImgD.height=(image.height*iwidth)/image.width;
        }
		else
		{
        ImgD.width=image.width;  
        ImgD.height=image.height;
        }
        //ImgD.alt=image.width+"×"+image.height;
        }
    else{
        if(image.height>iheight)
		{  
        ImgD.height=iheight;
        ImgD.width=(image.width*iheight)/image.height;        
        }
		else
		{
        ImgD.width=image.width;  
        ImgD.height=image.height;
        }
        //ImgD.alt=image.width+"×"+image.height;
        }
    //}
} 


var LastItem=null
function MenuClick(obj,http,url){
 if (LastItem!=null){
  LastItem.className="menuA"
 }
 obj.className="menuB"
 LastItem=obj
 obj.blur()
if (http.length>0) document.getElementById("pic").src=http;
}

function onClickbox(y){document.getElementById(y).style.display ="";} 
function onMouseOutbox(z){document.getElementById(z).style.display ="none";} 
function onMouseOverbox(a){document.getElementById(a).style.display ="";} 

