function MM_openBrWindow(theURL,winName,features) { 
  window.open(theURL,winName,features);
}
function fontsize(size){
  document.getElementById('textflag').style.fontSize=size+'px'
}
function helpor_net()
{
 //if (event.button==2)
    //alert(" ")
}
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 MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function glowit(which){

if (document.all.glowtext[which].filters[0].strength==2)

document.all.glowtext[which].filters[0].strength=1

else

document.all.glowtext[which].filters[0].strength=2

}



function glowit2(which){

if (document.all.glowtext.filters[0].strength==2)

document.all.glowtext.filters[0].strength=1

else

document.all.glowtext.filters[0].strength=2

}



function startglowing(){

if (document.all.glowtext&&glowtext.length){

for (i=0;i<glowtext.length;i++)

eval('setInterval("glowit('+i+')",150)')

}

else if (glowtext)

setInterval("glowit2(0)",150)

}



if (document.all)

//window.onload=startglowing


function   fixSizeFlash(Flash1){   
  var   w   =   Flash1.GetVariable("Stage.width");   
  //var   h   =   Flash1.GetVariable("Stage.height");   
  Flash1.width     =   w;   
  //alert (w);
  Flash1.height   =   w*0.43;   
  }   



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_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_initTimelines() { //v4.0
    //MM_initTimelines() Copyright 1997 Macromedia, Inc. All rights reserved.
    var ns = navigator.appName == "Netscape";
    var ns4 = (ns && parseInt(navigator.appVersion) == 4);
    var ns5 = (ns && parseInt(navigator.appVersion) > 4);
    var macIE5 = (navigator.platform ? (navigator.platform == "MacPPC") : false) && (navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4);
    document.MM_Time = new Array(1);
    document.MM_Time[0] = new Array(1);
    document.MM_Time["Timeline1"] = document.MM_Time[0];
    document.MM_Time[0].MM_Name = "Timeline1";
    document.MM_Time[0].fps = 15;
    document.MM_Time[0][0] = new String("behavior");
    document.MM_Time[0][0].frame = 60;
    document.MM_Time[0][0].value = "MM_showHideLayers('Layer1','','hide')";
    document.MM_Time[0].lastFrame = 60;
    for (i=0; i<document.MM_Time.length; i++) {
        document.MM_Time[i].ID = null;
        document.MM_Time[i].curFrame = 0;
        document.MM_Time[i].delay = 1000/document.MM_Time[i].fps;
    }
}
////////////////////////////////////////////公告部分
function addCount()
{
	if(time>0)
	{
		time--;
		h = h+5;
	}
	else
	{
		return;
	}
	if(h>520)  //高度
	{
		return;
	}
	document.getElementById("ads").style.display = "";
	document.getElementById("ads").style.height = h+"px";
	setTimeout("addCount()",30); 
}
    function noneAds()
    {
        if(T>0)
        {
            T--;
            N = N-5;
        }
        else
        {
            return;
        }
        if(N<0)
        {
            document.getElementById("ads").style.display = "none";
            return;
        }
        
        document.getElementById("ads").style.height = N+"px";
        setTimeout("noneAds()",30); 
    }
////////////////////////////////////////////公告部分

////////////////////////////////////////////飘动广告
function changePos(boj){
	var img = document.getElementById(boj);
	width = document.body.clientWidth;
	height = document.body.clientHeight;
	Hoffset = img.offsetHeight;
	Woffset = img.offsetWidth;
	img.style.left = xPos + document.body.scrollLeft;
	img.style.top = yPos + document.body.scrollTop;

	if (yon) {
	yPos = yPos + step;
	
	}else {
	yPos = yPos - step;
	}
	if (yPos < 0) {
	yon = 1;
	yPos = 0;
	}
	if (yPos >= (height - Hoffset)) {
	yon = 0;
	yPos = (height - Hoffset);
	}
	if (xon) {
	xPos = xPos + step;
	}
	else {
	xPos = xPos - step;
	}
	if (xPos < 0) {
	xon = 1;
	xPos = 0;
	}
	if (xPos >= (width - Woffset)) {
	xon = 0;
	xPos = (width - Woffset);
	}
}

function start() {
	var img = document.getElementById('imgx');
	img.style.top = 0;
	img.visibility = 'visible';
	interval = setInterval("changePos('imgx')", delay);
}

function startx() {
	interval = setInterval("changePos('imgx')", delay);
}

function mystop(boj)
{
   //var img = document.getElementById(boj);
   clearInterval(interval);
   interval=0;
}
function unloadme(boj){
   var img = document.getElementById(boj);
   img.style.display="none"
}
////////////////////////////////////////////飘动广告


  function   DrawImage(ImgD){   
        var   image=new   Image();   
        var   iwidth   =   480;     //定义允许图片宽度   
        var   iheight   =   640;     //定义允许图片高度   
        image.src=ImgD.src;   
        if(image.width>0   &&   image.height>0){   
          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 if(image.height<450){   
            ImgD.width=337;       
            ImgD.height=450;   
            }else{
            ImgD.width=image.width;       
            ImgD.height=image.height;   
			}   
            ImgD.alt=image.width+"×"+image.height;   
            }   
          }   
  }     
