// ---------------------------------------------------------------------------------- 
//  系统获取
// ---------------------------------------------------------------------------------- 
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
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_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_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 JGetDateDemo(){
   var d, day, x, s ="";
   var x = new Array("星期日", "星期一", "星期二");
   var x = x.concat("星期三","星期四", "星期五");
   var x = x.concat("星期六");
   d = new Date();
   day = d.getDay();
   return(s += x[day]);
}

// ---------------------------------------------------------------------------------- 
//  本函数用于获取系统的当前日期(日期格式是"YYYY-MM-DD") 
// ---------------------------------------------------------------------------------- 
function JGetCurrentDate() 
{ 
var iYear,iMonth,iDate,Today,sDate ; 
Today = new Date() ; 
iYear = Today.getYear() ; 
iMonth = Today.getMonth() + 1 ; 
iDate = Today.getDate() ; 
sDate = String(iYear) ; 
if (iMonth < 10)  
{ 
sDate = sDate + "-0" + String(iMonth) ; 
}  
else 
{ 
sDate = sDate + "-" + String(iMonth) ; 
} 
if (iDate < 10)  
{ 
sDate = sDate + "-0" + String(iDate) ; 
}  
else 
{ 
sDate = sDate + "-" + String(iDate) ; 
} 
return sDate ; 
} 
// ---------------------------------------------------------------------------------- 
//  本函数用于获取系统的当前日期(日期格式是"YYYY年MM月DD日") 
// ---------------------------------------------------------------------------------- 
function JGetCurrentCnDate() 
{ 
var iYear,iMonth,iDate,Today,sDate ; 
Today = new Date() ; 
iYear = Today.getYear() ; 
iMonth = Today.getMonth() + 1 ; 
iDate = Today.getDate() ; 
sDate = String(iYear) ; 
if (iMonth < 10)  
{ 
sDate = sDate + "年0" + String(iMonth) ; 
}  
else 
{ 
sDate = sDate + "年" + String(iMonth) ; 
} 
if (iDate < 10)  
{ 
sDate = sDate + "月0" + String(iDate) ; 
}  
else 
{ 
sDate = sDate + "月" + String(iDate) ; 
} 
sDate = sDate + "日" ; 
return sDate ; 
} 
// ---------------------------------------------------------------------------------- 
//  本函数用于获取系统的当前时间(时间格式是"HH:MM:SS") 
// ---------------------------------------------------------------------------------- 
function JGetCurrentTime() 
{ 
var iHour,iMin,iSecond,Today,sTime ; 
Today = new Date() ; 
iHour = Today.getHours() ; 
iMin = Today.getMinutes() ; 
iSecond = Today.getSeconds() ; 
sTime = "" ; 
if (iHour < 10) 
{ sTime = "0" + String(iHour) ; } 
else 
{ sTime = String(iHour) ; } 
if (iMin < 10)  
{ sTime = sTime + ":0" + String(iMin) ; }  
else 
{ sTime = sTime + ":" + String(iMin) ; } 
if (iSecond < 10)  
{ sTime = sTime + ":0" + String(iSecond) ; }  
else 
{ sTime = sTime + ":" + String(iSecond) ; } 
return sTime ; 
} 
// ---------------------------------------------------------------------------------- 
//  本函数用于输出Flash不会出现Flash激活框
// ---------------------------------------------------------------------------------- 
function FlashOut(ur,w,h){
        document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+w+'" height="'+h+'"> ');
        document.write('<param name="movie" value="' + ur + '">');
        document.write('<param name="quality" value="high"> ');
        document.write('<param name="wmode" value="transparent"> ');
        document.write('<param name="menu" value="false"> ');
        document.write('<embed src="' + ur + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'"></embed> ');
        document.write('</object> ');
}
// ---------------------------------------------------------------------------------- 
//  本函数用于图片的等比例缩小
// ---------------------------------------------------------------------------------- 
function ReSizeimg(ImgD,iwidth,iheight) { 
     var image=new Image(); 
     image.src=ImgD.src; 
     if(image.width>0 && image.height>0){ 
        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; 
                } 
        } 
        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.style.cursor= "pointer"; //改变鼠标指针 

    } 
}