var theURL;

//?r???Y??
function zoomIn(x) {
	oZoom=new Array();
	newZoom=new Array();
    for(i=0;i<x;i++){
    k1=new String("oZoom");
	k2=new String(i);
    oZoom[i]=k1 + k2;
	newZoom[i]= parseInt(document.getElementById(oZoom[i]).style.zoom)+10+'%';
    document.getElementById(oZoom[i]).style.zoom =newZoom[i];
	}
  } 
function zoomOut(x) {
	oZoom=new Array();
	newZoom=new Array();
    for(i=0;i<x;i++){
    k1=new String("oZoom");
	k2=new String(i);
    oZoom[i]=k1 + k2;
	newZoom[i]= parseInt(document.getElementById(oZoom[i]).style.zoom)-10+'%';
    document.getElementById(oZoom[i]).style.zoom =newZoom[i];
	}
  } 
function zoomInit(x) {
	oZoom=new Array();
	newZoom=new Array();
    for(i=0;i<x;i++){
    k1=new String("oZoom");
	k2=new String(i);
    oZoom[i]=k1 + k2;
	document.getElementById(oZoom[i]).style.zoom='100%';
	}
  } 
//???d???r?r??
function countwd(n,t){
str=document.getElementById('txteditor'+n).value.length;
document.getElementById('texts'+n).innerText=str;
if(str >= t){alert("?w?F???????r???I");
 return false;}
}

//--?M?????????e
function resetall(k,t) {
if(!k && !t){
	for (var i=0;i<document.forms[0].elements.length;i++)
	{a=document.forms[0].elements[i].defaultValue;
	 b=document.forms[0].elements[i].defaultChecked;
	 c=document.forms[0].elements[i].defaultSelected;
	 document.forms[0].elements[i].value=a;document.forms[0].elements[i].checked=b;document.forms[0].elements[i].selectedindex=c;}
}
else{
	var a=document.getElementById(k).defaultValue;
	var b=document.getElementById(k).defaultChecked;
	var c=document.getElementById(k).defaultSelected;
	if(t=1){document.getElementById(k).value=a;}
	else if(t=2){document.getElementById(k).checked=b}
	else{document.getElementById(k).selectedindex=c;}
	}
}
//--?P?\???????????????\??
function SelectAll() { 
if (document.getElementById('c0').checked==true){
   for (var i=0;i<document.forms[0].elements.length;i++){ 
      var e=document.forms[0].elements[i]; 
	  if(e.disabled==true){e.checked=false;} 
	  else{e.checked=true;}
	  }
}
else{
   for (var i=0;i<document.forms[0].elements.length;i++){ 
      var e=document.forms[0].elements[i]; 
	  e.checked=false;}
}
}

//--?P?\???????????????\????
function SelectAllB(obj,Tname){
	var e=document.getElementById(Tname).getElementsByTagName('input').length;
	var t=document.getElementById(Tname).getElementsByTagName('input');
     if(obj.checked==true){
	     for (var i=0;i<e;i++){t[i].checked=true;}
		  }
	else{
		for (var i=0;i<e;i++){t[i].checked=false;}
	      }
}
//--?W?h?\???????????????\????
function UnSelectAllB(obj,Fname,Gname){
	var f=document.getElementById(Fname);
	var g=document.getElementById(Gname);
     if(obj.checked==false){
	   if(f!=null){f.checked=false;}
	   if(g!=null){g.checked=false;}
		  }
}


//????????
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_changeProp(objName,x,theProp,theValue) { //v6.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
    if (theValue == true || theValue == false)
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  }
}

function MM_popupMsg(msg) { //v1.0
  alert(msg);
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function gotosite(site){if (site != ""){opener.document.location=site}}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
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_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];}
}

//--???????J
function autoFill(obj,str){obj.value=str;}

//--???????I??
function switchrow(obj,x,y){
	if(x==1){obj.className='memindexFA'+y;}
	else{obj.className='memindexFB'+y;}
}
function chrow(obj,x){
	if(x==1){obj.className='chrow';}
	else{obj.className='';}
}
function colorswitch(obj,x){
	var k=obj.className;
	if(k==x){obj.className='';}
	else{obj.className=x;}
}

//?????????P?_
function checktoday(){
var now = new Date(); 
var y = now.getFullYear(); var mo = now.getMonth(); var d = now.getDate();
var dayNames = new Array("??","?@","?G","?T","?|","??","??");
document.getElementById('time1').innerText=y;
document.getElementById('time2').innerText=mo+1;
document.getElementById('time3').innerText=d;
document.getElementById('time4').innerText=dayNames[now.getDay()];
}

//???????s????
function updateshow(){
var LastModDate = new Date(document.lastModified);
document.getElementById('finaldate').innerText= LastModDate.getFullYear() + "/" + (LastModDate.getMonth()+1) + "/" + LastModDate.getDate() + ", " + LastModDate.getHours() + ":" + LastModDate.getMinutes() + ":" + LastModDate.getSeconds();
} 

//???d??
function checkclock(){
var enabled = 0; 
var now = new Date(); 
var y = now.getFullYear(); var mo = now.getMonth(); var d = now.getDate();                       
var h = now.getHours(); var m = now.getMinutes(); var s = now.getSeconds();
var dayNames = new Array("??","?@","?G","?T","?|","??","??");
var k=h-12;
document.getElementById('time1').innerText=y;
document.getElementById('time2').innerText=mo+1;
document.getElementById('time3').innerText=d;
document.getElementById('time4').innerText=dayNames[now.getDay()];
 
if (h<12){
document.getElementById('time5').innerText="?W?? ";}
else{
document.getElementById('time5').innerText="?U?? ";}

if (h<10){
document.getElementById('time6').innerText="0"+h+"?G";}                  
else if (h>=10 && h<=12){
document.getElementById('time6').innerText=h+"?G";}                    
else{
   if(k<10){document.getElementById('time6').innerText="0"+k+"?G";}
   else{document.getElementById('time6').innerText=k+"?G";}}
                      
if (m<10){
document.getElementById('time7').innerText="0"+m+"?G"; }
else{                      
document.getElementById('time7').innerText=m+"?G";}
                
if (s<10){                       
document.getElementById('time8').innerText="0"+s+"";}
else{                                        
document.getElementById('time8').innerText=s+"";}
                        
setTimeout("checkclock()",1000);
}

//????--?????????P?]?w
var bannerAD=new Array();
var bannerADlink=new Array();
var bannerTitle=new Array();
var bannerTime=new Array();
var adNum=0;
var lock = true;
var preloadedimages=new Array()
   for (i=0;i<bannerAD.length;i++){
     preloadedimages[i]=new Image();
     preloadedimages[i].src=bannerAD[i];
   }
function changeTrans(k){
 if(k==1){
	theTimer=setTimeout("changeTrans(1)", 2000);
 }
 else if(k==2){
	bannerADrotator.filters[0].GradientSize = 0.5;
	bannerADrotator.filters[0].Motion ="forward";
	bannerADrotator.filters[0].WipeStyle = 0;
	theTimer=setTimeout("changeTrans(2)", 2000);
 }
  else if(k==3){
	bannerADrotator.filters[0].StretchStyle = "PUSH";
	theTimer=setTimeout("changeTrans(3)", 2000);
}
 else if(k==4){
	bannerADrotator.filters[0].overlap = 1.0;
	theTimer=setTimeout("changeTrans(4)", 2000);
	}
	bannerADrotator.filters[0].Apply();		
	if(adNum<bannerAD.length-1)adNum++;
    else adNum=0;
	document.images.bannerADrotator.src=bannerAD[adNum];
    document.images.bannerADrotator.alt=bannerTitle[adNum];
    document.getElementById('cmlname').innerText=bannerTitle[adNum]; 
	bannerADrotator.filters[0].Play(); 
}
function setTransition(){
   if (document.all)
      bannerADrotator.filters.revealTrans.Transition=Math.floor(Math.random()*23);
	  bannerADrotator.filters.revealTrans.stop(); 
	  bannerADrotator.filters.revealTrans.apply();
}
function playTransition(){
   if (document.all)
      bannerADrotator.filters.revealTrans.play();
}
function stopTransition(){
   if (document.all)
      bannerADrotator.filters.revealTrans.stop();
}
function autoAd(n){
if(n==1){
   if(adNum<bannerAD.length-1)adNum++;
      else adNum=0;
   setTransition();
   document.images.bannerADrotator.src=bannerAD[adNum];
   document.getElementById('cmlname').innerText=bannerTitle[adNum];
   document.images.bannerADrotator.alt=bannerTitle[adNum];
   <!--document.getElementById('cmltime').innerText=bannerTime[adNum];-->
   playTransition();
   theTimer=setTimeout("autoAd(1)", 2000);
   }
else if(n==2){
	  if(adNum<bannerAD.length-1)adNum++;
      else adNum=0;
   setTransition();
   document.images.bannerADrotator.src=bannerAD[adNum];
   document.images.bannerADrotator.alt=bannerTitle[adNum];
   <!--document.getElementById('cmlname').innerText=bannerTitle[adNum];-->
   playTransition();
   theTimer=setTimeout("autoAd(2)", 2000);
	}
}
function jump2url(){
   jumpUrl=bannerADlink[adNum];
   jumpTarget='_self';
   if (jumpUrl != ''){
      if (jumpTarget != '')window.open(jumpUrl,jumpTarget);
      else location.href=jumpUrl;
   }
}
function displayBannerMsg(n) {
if(n==1){
   document.getElementById('cmlname').innerText=bannerTitle[adNum];
   <!--document.getElementById('cmltime').innerText=bannerTime[adNum];-->
   document.returnValue = true;
  }
else if(n==2){
   document.getElementById('cmlname').innerText=bannerTitle[adNum];
   document.getElementById('bannerADrotator').alt=bannerTitle[adNum];
   document.returnValue = true;
  }
}
function displayStatusMsg() { 
   window.status='?s??'+bannerTitle[adNum];
   document.returnValue = true;
}
//????--?????????l?\??
function backward(n){
if(n==1){
  if (adNum>0)adNum--;
  else adNum=bannerAD.length-1;
  setTransition();
  document.images.bannerADrotator.src=bannerAD[adNum];
  playTransition();
  displayBannerMsg(1);
  displayStatusMsg();
  }
  else if(n==2){
  if (adNum>0)adNum--;
  else adNum=bannerAD.length-1;
  setTransition();
  document.images.bannerADrotator.src=bannerAD[adNum];
  playTransition();
  displayBannerMsg(2);
  }
  else if(n==3){
  if (adNum>0)adNum--;
  else adNum=bannerAD.length-1;
  bannerADrotator.filters[0].Apply();
  document.images.bannerADrotator.src=bannerAD[adNum];
  bannerADrotator.filters[0].Play();
  displayBannerMsg(2);
  }
}
function forward(n){
if(n==1){
  if (adNum<bannerAD.length-1){adNum++;}
  else if(adNum=bannerAD.length-1) {adNum=0;}
  setTransition();
  document.images.bannerADrotator.src=bannerAD[adNum];
  playTransition();
  displayBannerMsg(1);
  displayStatusMsg();
  }
else if(n==2){
  if (adNum<bannerAD.length-1){adNum++;}
  else if(adNum=bannerAD.length-1) {adNum=0;}
  setTransition();
  document.images.bannerADrotator.src=bannerAD[adNum];
  playTransition();
  displayBannerMsg(2);
  }
else if(n==3){
  if (adNum<bannerAD.length-1){adNum++;}
  else if(adNum=bannerAD.length-1) {adNum=0;}
  bannerADrotator.filters[0].Apply();
  document.images.bannerADrotator.src=bannerAD[adNum];
  bannerADrotator.filters[0].Play();
  displayBannerMsg(2);
  }
}
function ssplay(){
	document.images.splay.src="images/but_playon.gif";
	document.images.spause.src="images/but_pauseoff.gif";
	document.images.sstop.src="images/but_stopoff.gif";
	}
function adpause(n){
if(n==1){
        if (lock == true) {
        lock = false;
        clearTimeout(theTimer);
        stopTransition();
        document.images.sildemanu.src="images/sildemanu2.jpg";
        document.images.sildemanu.alt="?}?l????????";
		document.getElementById('pauselink').alt="?}?l????????";
		document.getElementById('pauselink').title="?}?l????????";
        }
        else if (lock == false) {
        lock = true;
        document.images.sildemanu.src="images/sildemanu.jpg";
        document.images.sildemanu.alt="????????????";
		document.getElementById('pauselink').alt="????????????";
		document.getElementById('pauselink').title="????????????";
        theTimer=setTimeout("autoAd(2)", 3000);
        if (adNum<bannerAD.length-1){adNum++;}
        else if(adNum=bannerAD.length-1) {adNum=0;}
        setTransition();
        document.images.bannerADrotator.src=bannerAD[adNum];
        playTransition();
        displayBannerMsg(1);
        displayStatusMsg();
        }
	}
else if(n==2){
	    clearTimeout(theTimer);
        stopTransition();
      	document.images.splay.src="images/but_playoff.gif";
	    document.images.spause.src="images/but_pauseon.gif";
	    document.images.sstop.src="images/but_stopoff.gif";
    }
else if(n==3){
	    clearTimeout(theTimer);
         bannerADrotator.filters[0].stop();
      	document.images.splay.src="images/but_playoff.gif";
	    document.images.spause.src="images/but_pauseon.gif";
	    document.images.sstop.src="images/but_stopoff.gif";
    }
}
function adstop(n){
if(n==2){
	clearTimeout(theTimer);
    stopTransition();
	document.images.bannerADrotator.src=bannerAD[1];
    document.getElementById('cmlname').innerText=bannerTitle[1];
    document.getElementById('bannerADrotator').alt=bannerTitle[1];
	document.images.splay.src="images/but_playoff.gif";
	document.images.spause.src="images/but_pauseoff.gif";
	document.images.sstop.src="images/but_stopon.gif";
	}
else if(n==3){
	clearTimeout(theTimer);
    bannerADrotator.filters[0].stop();
	document.images.bannerADrotator.src=bannerAD[1];
    document.getElementById('cmlname').innerText=bannerTitle[1];
    document.getElementById('bannerADrotator').alt=bannerTitle[1];
	document.images.splay.src="images/but_playoff.gif";
	document.images.spause.src="images/but_pauseoff.gif";
	document.images.sstop.src="images/but_stopon.gif";
	}
}
function adswitch(t){
if(t != ""){
	document.images.bannerADrotator.src=bannerAD[t];
    document.getElementById('cmlname').innerText=bannerTitle[t];
    document.getElementById('bannerADrotator').alt=bannerTitle[t];
	this.className='picon';
	location.href="#slidertop";
    }
else if(t==0){
	document.images.bannerADrotator.src=bannerAD[0];
    document.getElementById('cmlname').innerText=bannerTitle[0];
    document.getElementById('bannerADrotator').alt=bannerTitle[0];
	this.className='picon';
	location.href="#slidertop";
	}
	}

//?g?p?????V?????\??
var weektheme=new Array();
var weekthemelink=new Array();
var weekthemeTitle=new Array();
var weekthemeNum=0;

function initweek(n){
document.getElementById('weekimg'+n).src=weektheme[n-1];
document.getElementById('weekimg'+n).alt=weekthemeTitle[n-1];
document.getElementById('weekurl'+n).href=weekthemelink[n-1];
}
function weekchange(n){
if(n==1){
	weekimg1.filters[0].Duration = 0.1;
	weekimg2.filters[0].Duration = 0.2;
	weekimg3.filters[0].Duration = 0.5;}
else {
	weekimg1.filters[0].Duration = 0.5;
	weekimg2.filters[0].Duration = 0.2;
	weekimg3.filters[0].Duration = 0.1;}
	weekimg1.filters[0].Apply();
	weekimg1.filters[0].SlideStyle = "PUSH";
	weekimg1.filters[0].Play();
	weekimg2.filters[0].Apply();
	weekimg2.filters[0].SlideStyle = "PUSH";
	weekimg2.filters[0].Play();
	weekimg3.filters[0].Apply();
	weekimg3.filters[0].SlideStyle = "PUSH";
	weekimg3.filters[0].Play();
}
function weekback(){
 if (weekthemeNum<=weektheme.length-3 && weekthemeNum>=2) {
    weekthemeNum--;
	document.images.weekimg1.src=weektheme[weekthemeNum];
	document.images.weekimg1.alt=weekthemeTitle[weekthemeNum];
	document.getElementById('weekurl1').href=weekthemelink[weekthemeNum];
	document.images.weekimg2.src=weektheme[weekthemeNum+1];
	document.images.weekimg2.alt=weekthemeTitle[weekthemeNum+1];
	document.getElementById('weekurl2').href=weekthemelink[weekthemeNum+1];
	document.images.weekimg3.src=weektheme[weekthemeNum+2];
	document.images.weekimg3.alt=weekthemeTitle[weekthemeNum+2];
	document.getElementById('weekurl3').href=weekthemelink[weekthemeNum+2];
    weekchange(2);}
   else if (document.images.weekimg3.src=weektheme[2]) {
   weekthemeNum=0;
	document.images.weekimg1.src=weektheme[0];
	document.images.weekimg1.alt=weekthemeTitle[0];
	document.getElementById('weekurl1').href=weekthemelink[0];
	document.images.weekimg2.src=weektheme[1];
	document.images.weekimg2.alt=weekthemeTitle[1];
	document.getElementById('weekurl2').href=weekthemelink[1];
	document.images.weekimg3.src=weektheme[2];
	document.images.weekimg3.alt=weekthemeTitle[2];
	document.getElementById('weekurl3').href=weekthemelink[2];
    MM_popupMsg('?w????1???????F?@?I');}
}
function weekfore(){
  if (weekthemeNum<weektheme.length-3){
    weekthemeNum++;
	document.images.weekimg1.src=weektheme[weekthemeNum];
	document.images.weekimg1.alt=weekthemeTitle[weekthemeNum];
	document.getElementById('weekurl1').href=weekthemelink[weekthemeNum];
	document.images.weekimg2.src=weektheme[weekthemeNum+1];
	document.images.weekimg2.alt=weekthemeTitle[weekthemeNum+1];
	document.getElementById('weekurl2').href=weekthemelink[weekthemeNum+1];
	document.images.weekimg3.src=weektheme[weekthemeNum+2];
	document.images.weekimg3.alt=weekthemeTitle[weekthemeNum+2];
	document.getElementById('weekurl3').href=weekthemelink[weekthemeNum+2];
    weekchange(1);}
  else if(document.images.weekimg3.src=weektheme[weektheme.length-1]) {
   weekthemeNum=weektheme.length-3;
	document.images.weekimg1.src=weektheme[weektheme.length-3];
	document.images.weekimg1.alt=weekthemeTitle[weektheme.length-3];
	document.getElementById('weekurl1').href=weekthemelink[weekthemeNum-3];
	document.images.weekimg2.src=weektheme[weektheme.length-2];
	document.images.weekimg2.alt=weekthemeTitle[weektheme.length-2];
	document.getElementById('weekurl2').href=weekthemelink[weekthemeNum-2];
    document.images.weekimg3.src=weektheme[weektheme.length-1];
    document.images.weekimg3.alt=weekthemeTitle[weektheme.length-1];
	document.getElementById('weekurl3').href=weekthemelink[weekthemeNum-1];
    MM_popupMsg('?w?O????1???????F?@?I');}
}

//?a???????\??
function submap(imgobject,imgurl){
	imgobject.filters[0].Apply();
	imgobject.src = imgurl;
	imgobject.filters[0].Play();
}
// ?|???????D?D????(Outlook Like)
function MFXinitMenu(){
IE = document.all ? 1:0;
NN = document.layers ? 1:0;
HIDDEN = (NN) ? 'hide' : 'hidden';
VISIBLE = (NN) ? 'show' : 'visible';
myLayer=new Array();
mySpeed=10;
subLeft=0;
closes=true;
myLayer[0]=(NN) ? document.MFX0 : document.all.MFX0.style;
myLayer[1]=(NN) ? document.MFX1 : document.all.MFX1.style;
myLayer[2]=(NN) ? document.MFX2 : document.all.MFX2.style;
myLayer[3]=(NN) ? document.MFX3 : document.all.MFX3.style;
myLayer[4]=(NN) ? document.MFX4 : document.all.MFX4.style;
myLayer[5]=(NN) ? document.MFX5 : document.all.MFX5.style;
running=false;
whichOpen=-1;
lastMain=myLayer.length-2;
MFXmain=new Array();
for(i=0; i<myLayer.length; i++){
mainORsub= i % 2;
MFXmain[i] = mainORsub ? 0:1;
}
myTop=new Array();
myLeft=new Array();
myHeight=new Array();
myWidth=new Array();
mySlide=new Array();
for(i=0; i<myLayer.length; i++){
if(NN&&MFXmain[i]){
if(i==0){
myTop[i]=myLayer[i].top;
myLeft[i]=myLayer[i].left;}
else{
myLeft[i]=myLeft[i-2];
myTop[i]=myTop[i-2]+myHeight[i-2];}
myHeight[i]=myLayer[i].clip.height;
myWidth[i]=myLayer[i].clip.width;
myLayer[i].left=myLeft[i];
myLayer[i].top=myTop[i];
myLayer[i].visibility=VISIBLE;}
if(NN&&!MFXmain[i]){
myTop[i]=myTop[i-1]+myHeight[i-1];
myLeft[i]=myLeft[i-1];
myHeight[i]=myLayer[i].clip.height;
myWidth[i]=myLayer[i].clip.width;
mySlide[i]=myTop[i]+myHeight[i];
myLayer[i].left=myLeft[i]+subLeft;
myLayer[i].top=myTop[i];}
if(IE&&MFXmain[i]){
if(i==0){
myLeft[i]=myLayer[i].pixelLeft;
myTop[i]=myLayer[i].pixelTop;}
else{
myLeft[i]=myLeft[i-2];
myTop[i]=myTop[i-2]+myHeight[i-2];}
myHeight[i]=myLayer[i].pixelHeight;
myWidth[i]=myLayer[i].pixelWidth;
myLayer[i].left=myLeft[i];
myLayer[i].top=myTop[i];
myLayer[i].visibility=VISIBLE;}
if(IE&&!MFXmain[i]){
myTop[i]=myTop[i-1]+myHeight[i-1];
myLeft[i]=myLeft[i-1];
myHeight[i]=myLayer[i].pixelHeight;
myWidth[i]=myLayer[i].pixelWidth;
myLayer[i].pixelLeft=myLeft[i]+subLeft;
myLayer[i].pixelTop=myTop[i];
mySlide[i]=myTop[i]+myHeight[i];
}
}
}
function MFXrunMenu(myName,newspeed){
ieStep=0;
thereS=false;
thereC=false;
if(newspeed>0){mySpeed=newspeed;}
first=myName;
if(whichOpen==-1&&!running&&MFXmain[myName]&&!(whichOpen==myName)){
running=true;
if(NN){
myLayer[myName+1].clip.height=0;
myLayer[myName+1].visibility=VISIBLE;
}
if(IE){
myLayer[myName+1].clip= "rect(" + ("auto") +" "+ ("auto") +" "+ (0) +" "+ ("auto") +")";
myLayer[myName+1].visibility=VISIBLE;
}
MFXopenMenuS(myName);
MFXopenMenuC(myName);
}
if(whichOpen>=0&&!running&&!(whichOpen==myName)){
running=true;
second=whichOpen;
ieStep1=myHeight[second+1];
thereCS=false;
thereCC=false;
MFXcloseMenuS(second);
MFXcloseMenuC(second);
}
if(whichOpen>=0&&!running&&whichOpen==myName&&closes){
running=true;
second=whichOpen;
ieStep1=myHeight[second+1];
thereCS=false;
thereCC=false;
MFXcloseMenuS(second);
MFXcloseMenuC(second);
	}
}
function MFXstopCloseS(myName){
running=false;
thereCS=true;
if(closes&&first==whichOpen){whichOpen=-1;}
else{whichOpen=-1;
MFXrunMenu(first);
}
}
function MFXstopOpenS(myName){
running=false;
thereS=true;
if(IE){myLayer[myName+1].clip= "rect(" + ("auto") +" "+ ("auto") +" "+ ("auto") +" "+ ("auto") +")";}
whichOpen=myName;
}
function MFXopenMenuS(myName){
myStep=mySpeed;
if(NN&&!thereS&&!(first==lastMain)){
if(myLayer[first+2].top+myStep>mySlide[first+1]){
myStep=mySlide[first+1]-myLayer[first+2].top;
}
for(i=first+2; i<myLayer.length; i+=2){
myLayer[i].top+=myStep;
}
if(myLayer[first+2].top==mySlide[first+1]){
MFXstopOpenS(first)
}
if(running)setTimeout('MFXopenMenuS(first)',10);
}
if(IE&&!thereS&&!(first==lastMain)){
if(myLayer[first+2].pixelTop+myStep>mySlide[first+1]){
myStep=mySlide[first+1]-myLayer[first+2].pixelTop;
}
for(i=first+2; i<myLayer.length; i+=2){

myLayer[i].pixelTop+=myStep;
}
if(myLayer[first+2].pixelTop==mySlide[first+1]){
MFXstopOpenS(first)
}
if(running)setTimeout('MFXopenMenuS(first)',10);
}
}
function MFXopenMenuC(myName){
myStep=mySpeed;
if(NN&&!thereC){
if ((myLayer[first+1].clip.height+myStep)>myHeight[first+1]){
myLayer[first+1].clip.height=myHeight[first+1]
}
if(myLayer[first+1].clip.height==myHeight[first+1]){
thereC=true;
whichOpen=first;
MFXstopOpenS(first)

}else{
myLayer[first+1].clip.height+=myStep;

}
if(running)setTimeout('MFXopenMenuC(first)',10);
}
if(IE&&!thereC){
ieStep+=myStep;
myLayer[myName+1].clip= "rect(" + ("auto") +" "+ ("auto") +" "+ (ieStep) +" "+ ("auto") +")";

if(ieStep>=myHeight[first+1]){
thereC=true;
whichOpen=first;
MFXstopOpenS(first)
}
if(running)setTimeout('MFXopenMenuC(first)',10);
}
}
function MFXcloseMenuS(myName){
myStep=mySpeed;
if(NN&&!thereCS&&!(second==lastMain)){
if(myLayer[second+2].top-myStep<myTop[second+2]){
myStep=myLayer[second+2].top-myTop[second+2];
}
for(i=second+2; i<myLayer.length; i+=2){
myLayer[i].top-=myStep;

}
if(myLayer[second+2].top==myTop[second+2]){
MFXstopCloseS(second);
}
if(running)setTimeout('MFXcloseMenuS(second)',10);
}
if(IE&&!thereCS&&!(second==lastMain)){
if(myLayer[second+2].pixelTop-myStep<myTop[second+2]){
myStep=myLayer[second+2].pixelTop-myTop[second+2];
}
for(i=second+2; i<myLayer.length; i+=2){
myLayer[i].pixelTop-=myStep;

}
if(myLayer[second+2].pixelTop==myTop[second+2]){
MFXstopCloseS(second);
}
if(running)setTimeout('MFXcloseMenuS(second)',10);
}
}
function MFXcloseMenuC(myName){
myStep=-mySpeed;
ieStep1-=mySpeed;
if(NN&&!thereCC){
if ((myLayer[second+1].clip.bottom+myStep)<0){
myLayer[second+1].clip.bottom=0;
}
if(myLayer[second+1].clip.bottom==0){
thereCC=true;

if(second==lastMain)MFXstopCloseS(second);
}else{
myLayer[second+1].clip.bottom+=myStep;

}
if(running)setTimeout('MFXcloseMenuC(second)',10);
}
if(IE&&!thereCC){
if(ieStep1<=0){
myLayer[myName+1].clip= "rect(" + ("auto") +" "+ ("auto") +" "+ (0) +" "+ ("auto") +")";
thereCC=true;
if(second==lastMain)MFXstopCloseS(second);
}else{
myLayer[myName+1].clip= "rect(" + ("auto") +" "+ ("auto") +" "+ (ieStep1) +" "+ ("auto") +")";

}
if(running)setTimeout('MFXcloseMenuC(second)',10);
}
}

//????
function initswitch(){
	document.getElementById('recover').value=1;
	document.getElementById('imgselect1').className='picon';
}

function imgswitch(n){
	var k=document.getElementById('recover').value;
	var iurl=window.event.srcElement.src;
	var itext=window.event.srcElement.alt;
	document.getElementById('imgselect'+k).className='';
	document.getElementById('changeimg').src=iurl;
	document.getElementById('changetext').innerText=itext;
	window.event.srcElement.className='picon';
	document.getElementById('recover').value=n;
}

//?????h?h????
function CloseClicked()
	{window.returnValue = '';
	window.close()	}
	
var dropShow=false;
var currentID;
function dropdown(el){
if(dropShow){
dropFadeOut()
}else{
currentID=el
el.style.visibility="visible"
dropFadeIn()
}
}
function dropFadeIn(){
if(currentID.filters.alpha.opacity<100){
currentID.filters.alpha.opacity+=20
fadeTimer=setTimeout("dropFadeIn()",50)
}else{
dropShow=true
clearTimeout(fadeTimer)
}
}
function dropFadeOut(){
if(currentID.filters.alpha.opacity>0){
clearTimeout(fadeTimer)
currentID.filters.alpha.opacity-=20
fadeTimer=setTimeout("dropFadeOut()",50)
}else{
dropShow=false
currentID.style.visibility="hidden"
}
}
function dropdownHide(){
if(dropShow){
dropFadeOut()
dropShow=false
}
}
function hiLight(el){
if(dropShow){
for(i=0;i<el.parentElement.childNodes.length;i++){
el.parentElement.childNodes(i).className="link_record0"
}
el.className="link_record1"
}
}
function mainLight(el,x){
if(x==1){el.className="link_record1";}
else el.className="link_record0";
}
function subLight(el,x){
if(x==1){el.className="link_subrecord1";}
else el.className="link_subrecord0";
}
function CheckMe(el){
el.parentElement.parentElement.childNodes(0).childNodes(0).childNodes(0).childNodes(0).childNodes(0).childNodes(0).innerHTML=el.innerHTML
}
document.onclick=dropdownHide;

//?s?D?H????
function showbox(d,N){
	var menu=document.all.boxContainer;
	var newX = window.event.x-200*N + document.body.scrollLeft;
	var newY = window.event.y-200+ document.body.scrollTop;
  if (menu.style.display == "")  {menu.style.display = "none" }
  else {menu.style.display = "";menu.style.pixelLeft = newX;menu.style.pixelTop = newY;}
  document.getElementById("detail").innerHTML='<img src='+d+' >';
  boxContainer.style.display="";
}

function closed1() {
document.all.boxContainer.style.display="none"
}

//calendar ?_???????P?_
function sbar(st) {
st.style.backgroundColor = '#F2FAFB';
}
			
function cbar(st) {
st.style.backgroundColor = '';
}

function YY_checkform() { 
  var args = YY_checkform.arguments; var myDot=true; var myV=''; var myErr='';var addErr=false;var myReq;
  if(form1.date1.value!=''&&form1.date2.value!=''){
  var dstr=document.form1.date1.value;
  var dstr2=document.form1.date2.value;
  spstr=dstr.split("/");
  spstr2=dstr2.split("/");
  var date1 = new Date(spstr[0], spstr[1], spstr[2]);
  var date2 = new Date(spstr2[0], spstr2[1], spstr2[2]);
  if(date1>date2){
  myErr+='* ???????????j???_?l????\n';
  }
  }
  for (var i=1; i<args.length;i=i+4){
    if (args[i+1].charAt(0)=='#'){myReq=true; args[i+1]=args[i+1].substring(1);}else{myReq=false}
    var myObj = MM_findObj(args[i].replace(/\[\d+\]/ig,""));
    myV=myObj.value;
    if (myObj.type=='text'||myObj.type=='password'||myObj.type=='hidden'){
      if (myReq&&myObj.value.length==0){addErr=true}
      if ((myV.length>0)&&(args[i+2]==1)){ //fromto
        var myMa=args[i+1].split('_');if(isNaN(myV)||myV<myMa[0]/1||myV > myMa[1]/1){addErr=true}
      } else if ((myV.length>0)&&(args[i+2]==2)){
          var rx=new RegExp("^[\\w\.=-]+@[\\w\\.-]+\\.[a-z]{2,4}$");if(!rx.test(myV))addErr=true;
      } else if ((myV.length>0)&&(args[i+2]==3)){ // date
        var myMa=args[i+1].split("#"); var myAt=myV.match(myMa[0]);
        if(myAt){
          var myD=(myAt[myMa[1]])?myAt[myMa[1]]:1; var myM=myAt[myMa[2]]-1; var myY=myAt[myMa[3]];
          var myDate=new Date(myY,myM,myD);
          if(myDate.getFullYear()!=myY||myDate.getDate()!=myD||myDate.getMonth()!=myM){addErr=true};
        }else{addErr=true}
      } else if ((myV.length>0)&&(args[i+2]==4)){ // time
        var myMa=args[i+1].split("#"); var myAt=myV.match(myMa[0]);if(!myAt){addErr=true}
      } else if (myV.length>0&&args[i+2]==5){ // check this 2
            var myObj1 = MM_findObj(args[i+1].replace(/\[\d+\]/ig,""));
            if(myObj1.length)myObj1=myObj1[args[i+1].replace(/(.*\[)|(\].*)/ig,"")];
            if(!myObj1.checked){addErr=true}
      } else if (myV.length>0&&args[i+2]==6){ // the same
            var myObj1 = MM_findObj(args[i+1]);
            if(myV!=myObj1.value){addErr=true}
      }
    } else
    if (!myObj.type&&myObj.length>0&&myObj[0].type=='radio'){
          var myTest = args[i].match(/(.*)\[(\d+)\].*/i);
          var myObj1=(myObj.length>1)?myObj[myTest[2]]:myObj;
      if (args[i+2]==1&&myObj1&&myObj1.checked&&MM_findObj(args[i+1]).value.length/1==0){addErr=true}
      if (args[i+2]==2){
        var myDot=false;
        for(var j=0;j<myObj.length;j++){myDot=myDot||myObj[j].checked}
        if(!myDot){myErr+='* ' +args[i+3]+'\n'}
      }
    } else if (myObj.type=='checkbox'){
      if(args[i+2]==1&&myObj.checked==false){addErr=true}
      if(args[i+2]==2&&myObj.checked&&MM_findObj(args[i+1]).value.length/1==0){addErr=true}
    } else if (myObj.type=='select-one'||myObj.type=='select-multiple'){
      if(args[i+2]==1&&myObj.selectedIndex/1==0){addErr=true}
    }else if (myObj.type=='textarea'){
      if(myV.length<args[i+1]){addErr=true}
    }
    if (addErr){myErr+='* '+args[i+3]+'\n'; addErr=false}
  }
  if (myErr!=''){alert('?????_?????~:\t\t\t\t\t\n\n'+myErr)}
  document.MM_returnValue = (myErr=='');
}


//?I??????????
var imgDB=new Array();
var imgNum=new Array("0","0","0","0");
var preloadedimages=new Array();
for (i=0;i<imgDB.length;i++){
     preloadedimages[i]=new Image();
     preloadedimages[i].src=imgDB[i];
}

function onswitch(obj,n){
 k=imgNum[n];
 if(k<imgDB.length-1) {k++;imgNum[n]=k;}
 else if(k=imgDB.length-1) {k=0;imgNum[n]=0;}
 obj.src=imgDB[k];
 obj.filters[0].Apply();
 obj.filters[0].Duration = 0.5;
 obj.filters[0].SlideStyle = "HIDE";
 obj.filters[0].Play();
 }
 
//???????b
<!--
ns = (document.layers) ? 1:0;
var loop, timer
function makeObj(obj,nest){
  nest = (!nest) ? '':'document.'+nest+'.';
  this.el = ns ? eval(nest+'document.'+obj):document.all[obj];
  this.css = ns ? eval(nest+'document.'+obj):document.all[obj].style;
  this.scrollHeight = ns ? this.css.document.height:this.el.offsetHeight;
  this.scrollWidth = ns ? this.css.document.width:this.el.offsetWidth;
  this.clipHeight = ns ? this.css.clip.height:this.el.offsetHeight;
  this.clipWidth = ns ? this.css.clip.width:this.el.offsetWidth;
  this.up = goUp;
  this.down = goDown;
  this.left = goLeft;
  this.right = goRight;
  this.moveIt = moveIt;
  this.x;
  this.y;
  this.obj = obj + "Object";
  eval(this.obj + "=this");
  return this;
}
function moveIt(x,y){
  this.x = x;
  this.y = y;
  this.css.left = this.x;
  this.css.top = this.y;
}
function goDown(move){
  if (this.y>-this.scrollHeight+oCont.clipHeight){
    this.moveIt(0,this.y-move);
    if (loop) setTimeout(this.obj+".down("+move+")",50);
  }
}
function goUp(move){
  if (this.y<0){
    this.moveIt(0,this.y-move);
    if (loop) setTimeout(this.obj+".up("+move+")",50);
  }
}
function goLeft(move){
	//document.getElementById('xx').innerHTML='x:'+this.x+'  >> '+this.scrollWidth+'oCont.clipWidth'+oCont.clipWidth;
	
  if (this.x>-this.scrollWidth+oCont.clipWidth){
    this.moveIt(this.x-move,0);
    if (loop) setTimeout(this.obj+".left("+move+")",50);
  }
}
function goRight(move){
  if (this.x<0){
    this.moveIt(this.x-move,0);
    if (loop) setTimeout(this.obj+".right("+move+")",50);
  }
}
function scroll(speed){
  if (loaded){
    loop = true;
    if (speed>0) oScroll.down(speed);
    else oScroll.up(speed);
  }
}
function acrossScroll(speed){
  if (loaded){
    loop = true;
    if (speed>0) oScroll.left(speed);
    else oScroll.right(speed);
  }
}

function noScroll(){
  loop = false;
  if (timer) clearTimeout(timer);
}
var loaded;
function scrollInit(){
  oCont = new makeObj('divCont');
  oScroll = new makeObj('divText','divCont');
  oScroll.moveIt(0,0);
  loaded = true;
}
// -->

//???????b
function PhotoCheck(){
var isLoaded=true
for(i=0;i<PhotoPreload.length;i++){
if(PhotoPreload[i].readyState!="complete")
isLoaded=false
}
if(isLoaded){
BuildSlider()
}else{
LoadingDots.innerHTML=(LoadingDots.innerHTML=="....")?"":LoadingDots.innerHTML+"."
setTimeout("PhotoCheck()",100)
}
}

function BuildSlider(){
var PHTML="<table border=\"0\" cellspacing=\""+PhotoSpac+"\" cellpadding=\"0\"><tr>"
for(i=0;i<PhotoAlbum.length;i++){
PHTML+="<td valign=\"top\" id=\"c_"+i+"\" class=\"item_out\" hidefocus=\"true\" onmouseover=\"PhotoHilight('c_"+i+"','item_over');top.status='"+PhotoAlbum[i][0]+"';return true\" onmouseout=\"PhotoHilight('c_"+i+"','item_out');top.status=''\"><div style=\"Z-INDEX:3; position:relative; width:130px; height:117px; visibility:visible; top:0px; left:0px\"><img src=\""+PhotoPreload[i].src+"\" border=\"0\" class=\"imgclip\" onMouseOver=\"this.className='imgclip imgray'\" onMouseOut=\"this.className='imgclip'\" onMouseDown=\"this.className='imgclip picon'\" onMouseUp=\"adswitch("+[i]+")\" style=\"cursor:hand\"></div><div style=\"margin-left:1px\" align=\"left\">"+PhotoAlbum[i][0]+"</div></td>"
}
for(i=0;i<PhotoAlbum.length;i++){
PHTML+="<td valign=\"top\" id=\"m_"+i+"\" class=\"item_out\" hidefocus=\"true\" onmouseover=\"PhotoHilight('m_"+i+"','item_over');top.status='"+PhotoAlbum[i][0]+"';return true\" onmouseout=\"PhotoHilight('m_"+i+"','item_out');top.status=''\"><div style=\"Z-INDEX:3; position:relative; width:130px; height:117px; visibility:visible; top:0px; left:0px\"><img src=\""+PhotoPreload[i].src+"\" border=\"0\" class=\"imgclip\" onMouseOver=\"this.className='imgclip imgray'\" onMouseOut=\"this.className='imgclip'\" onMouseDown=\"this.className='imgclip picon'\" onMouseUp=\"adswitch("+[i]+")\" style=\"cursor:hand\"></div><div style=\"margin-left:1px\" align=\"left\">"+PhotoAlbum[i][0]+"</div></td>"
}
PHTML+="</tr></table>"

SlideObj.innerHTML=PHTML
//SlideEnd=-(SlideObj.offsetWidth/2)+PhotoSpac
SlideBox.style.height=SlideObj.offsetHeight
SlideBox.style.width=SlideBar.clientWidth
SlideBox.style.clip="rect(0 "+SlideBar.clientWidth+" "+SlideObj.offsetHeight+" 0)"
setInterval("ScrollObject()",1)
}
function PhotoHilight(el,s){
eval(el).className=s
}
function ScrollObject(){
SlideEnd=-(SlideObj.offsetWidth/2)+PhotoSpac
SlideObj.style.posLeft-=SlideMode
SlideObj.style.posLeft=SlideObj.style.posLeft<=SlideEnd?0:SlideObj.style.posLeft>0?SlideEnd:SlideObj.style.posLeft
}
function ManuScroll(n){
clearInterval("ScrollObject()",1);AdjSpeed();SlideMode=n;setInterval("ScrollObject()",1)
}

function AdjSpeed(){
MousePos=event.clientX-SlideBar.offsetLeft
if(MousePos<parseInt(SlideBox.offsetWidth*0.04)){SlideMode=-4}
if(MousePos>parseInt(SlideBox.offsetWidth*0.04)&&MousePos<parseInt(SlideBox.offsetWidth*0.11)){SlideMode=-3}
if(MousePos>parseInt(SlideBox.offsetWidth*0.11)&&MousePos<parseInt(SlideBox.offsetWidth*0.21)){SlideMode=-2}
if(MousePos>parseInt(SlideBox.offsetWidth*0.21)&&MousePos<parseInt(SlideBox.offsetWidth*0.37)){SlideMode=-1}
if(MousePos>parseInt(SlideBox.offsetWidth*0.37)&&MousePos<parseInt(SlideBox.offsetWidth*0.63)){SlideMode=0}
if(MousePos>parseInt(SlideBox.offsetWidth*0.63)&&MousePos<parseInt(SlideBox.offsetWidth*0.79)){SlideMode=1}
if(MousePos>parseInt(SlideBox.offsetWidth*0.79)&&MousePos<parseInt(SlideBox.offsetWidth*0.89)){SlideMode=2}
if(MousePos>parseInt(SlideBox.offsetWidth*0.89)&&MousePos<parseInt(SlideBox.offsetWidth*0.96)){SlideMode=3}
if(MousePos>parseInt(SlideBox.offsetWidth*0.96)){SlideMode=4}
}

function redirectEditArticleURL(contextPath, blogURL, articleId){
	var url = contextPath+"/blog/"+blogURL+"/myArticleAction.do?method=doEditMyBlogArticle&articleId="+articleId;
	window.location = url;
}

function redirectDeleteArticleURL(contextPath, blogURL, articleId){
	var url = contextPath+"/blog/"+blogURL+"/myArticleAction.do?method=doDeleteMyBlogArticle&articleId="+articleId;
	window.location = url;
}

function redirectManageBlogURL(contextPath){
	var url = contextPath+"/frontsite/blog_admin/blogInfoEditAction.do?method=doEditBlogInfo&blogMenuId=2";
	window.location = url;
}

function redirectVoteBlogURL(contextPath, account, myBlogInfoId){
    return contextPath+"/frontsite/blog/blogVoteAction.do?method=doBlogVote&account="+account+"&blog_blogInfoId="+myBlogInfoId;
}
	
function redirectBlogJudgeVoteURL(contextPath, account, myBlogInfoId){
    return contextPath+"/frontsite/blog/blogVoteAction.do?method=doBlogJudgeVote&account="+account+"&blog_blogInfoId="+myBlogInfoId;
}
