﻿function Delete()
{
    return confirm("是否删除?");
}  

function picresize(obj,MaxWidth,MaxHeight){
    obj.onload=null;
    img=new Image();
    img.src=obj.src;
    if (img.width>MaxWidth && img.height>MaxHeight){
        if (img.width/img.height>MaxWidth/MaxHeight) {
            obj.height=MaxWidth*img.height/img.width;
              obj.width=MaxWidth;
          }else {
              obj.width=MaxHeight*img.width/img.height;
            obj.height=MaxHeight;
        }
    }else if (img.width>MaxWidth) {
        obj.height=MaxWidth*img.height/img.width;
          obj.width=MaxWidth;
      }else if (img.height>MaxHeight) {
          obj.width=MaxHeight*img.width/img.height;
        obj.height=MaxHeight;
    }else{
        obj.width=img.width;
        obj.height=img.height;
    }
}

function FullDialog(fileName)
{
	return SizeDialog(fileName,screen.width,screen.height);
}
function SizeDialog(fileName,str_dialogWidth,str_dialogHeight)
{ 	
    return window.showModalDialog(fileName,"dialog",";dialogWidth:"+str_dialogWidth+"px;dialogHeight:"+str_dialogHeight+"px;center:1;scroll:0;help:0;status:0");
}

var cm=null; 
//document.onclick = new Function("show(null)");
function getPos(el,sProp)  
{
    var iPos = 0 
 　 while (el!=null)  
    {
        iPos+=el["offset" + sProp];
     　 el = el.offsetParent;
    } 
 　return iPos;
}  
 　　    

function show(el,m,arw)  
{
    el.style.background = "url(images/health_hz_003.gif) -5px 0px";
    //el.style.color = "#000";
    el.style.paddingTop = "2px";
    arw.style.background = "url(images/menu-arrow2.gif) no-repeat right";    
    
    if (m) 
    {
        m.style.display= ''; 
        m.style.pixelLeft = getPos(el,"Left") ;
        m.style.pixelTop = getPos(el,"Top") + el.offsetHeight;
    } 
 　if ((m!=cm) && (cm)) cm.style.display="none";
 　cm=m ; 　
}

function hide(m,el,arw)
{
    m.style.display="none";
    el.style.background = "url(images/health_hz_001.gif) -5px 0px";
    el.style.color = "#fff";
    el.style.paddingTop = "0px";
    arw.style.background = "url(images/menu-arrow2.gif) no-repeat right";
}

function PlayVideo(play_name)
{
    document.write('<object id="FLVPlayer" height="300" width="400" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">');
    document.write('<param name="movie" value="/GovSite/tools/FLVPlayer_Progressive.swf" />');
    document.write('<param name="salign" value="lt" />');
    document.write('<param name="quality" value="high" />');
    document.write('<param name="scale" value="noscale" />');
    document.write('<param name="wmode" value="transparent" />');
    document.write('<param name="FlashVars" value="MM_ComponentVersion=1&skinName=/GovSite/tools/Corona_Skin_3&streamName=/GovSite/UserFiles/PlayFiles/' + play_name + '&autoPlay=true&autoRewind=true" />');
    document.write('<embed name="FLVPlayer" wmode="transparent" height="300" width="400" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" salign="LT" scale="noscale" quality="high" flashvars="MM_ComponentVersion=1&skinName=/GovSite//tools/Corona_Skin_3&streamName=/GovSite//UserFiles/PlayFiles/' + play_name + '&autoPlay=true&autoRewind=true" src="/GovSite/tools/FLVPlayer_Progressive.swf"></embed>');
    document.write('</object>');
}

function ShowTab(tab, con, area, cObj)
{   
    var objs = document.getElementById(area).getElementsByTagName("div");
	var lth = objs.length;
	for(var i=0;i<lth;i++){document.getElementById(con+i).style.display="none";}
	for(var i=0;i<lth;i++){if (i==0) document.getElementById(tab+i).className="normal"; else document.getElementById(tab+i).className="normal2";}	
	if (cObj == "0")
	   document.getElementById(tab+cObj).className="mouseOver";	
	else	
	    document.getElementById(tab+cObj).className="mouseOver2";
	document.getElementById(con+cObj).style.display="block";
}
