var TableTrOnMouseOverClass="";
var TableTrCurrObject ;
function TableOnMouseOver(currTR)
{	TableTrCurrObject=currTR;
	TableTrOnMouseOverClass=currTR.className;
	currTR.className = "styleTr2";
	
	
}

function TableOnMouseOut(currTR,className)
{
	if(currTR!=null)
	{	if(className!=null)
		{
			currTR.className=className ;
		}
		else
		{
			currTR.className=TableTrOnMouseOverClass ;
		}
	}
	else
	{
		TableTrCurrObject.className=TableTrOnMouseOverClass ;
	}
	
	
}


var SourImgUrl="" ;
var SourImgObj ;
function ImgOnMouseOver(objimg,ShowImgFileName)
{ 	SourImgUrl =objimg.src ;
	SourImgObj =  objimg ;
	var overimg=ShowImgFileName ;
	if (overimg==null)
	{
		var s = SourImgUrl.lastIndexOf(".");
		overimg= SourImgUrl.substr(0,s)+"(up)"+SourImgUrl.substr(s) ;
	}
	objimg.src=overimg ;
}

function ImgOnMouseOut(objimg)
{
	if(objimg!=null)
	{
		objimg.src=SourImgUrl ;
	}
	else
	{
		SourImgObj.src=SourImgUrl ;
	}
}

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_swapImgRestore_peak(srcname) { //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;
			
			if (srcname != "top_02a"){
			top_02a.src = '/images/pp/top_02a.gif' ;
			bn_top_02.src = '/images/pp/bn_top_02.gif' ;
			}
			if (srcname != "top_03a"){
			top_03a.src = '/images/pp/top_03a.gif' ;
			bn_top_03.src = '/images/pp/bn_top_03.gif' ;
			}

			if (srcname != "top_04a"){
			top_04a.src = '/images/pp/top_04a.gif' ;
			bn_top_04.src = '/images/pp/bn_top_04.gif' ;
			}

			if (srcname != "top_05a"){
			top_05a.src = '/images/pp/top_05a.gif' ;
			bn_top_05.src = '/images/pp/bn_top_05.gif' ;
			}

			if (srcname != "top_06a"){
			top_06a.src = '/images/pp/top_06a.gif' ;
			bn_top_06.src = '/images/pp/bn_top_06.gif' ;
			}

			if (srcname != "top_07a"){
			top_07a.src = '/images/pp/top_07a.gif' ;
			bn_top_07.src = '/images/pp/bn_top_07.gif' ;
			}

			if (srcname != "top_08a"){
			top_08a.src = '/images/pp/top_08a.gif' ;
			bn_top_08.src = '/images/pp/bn_top_08.gif' ;
			}

			ss.src = ssimg ;
			//alert(ss);

	//}
		
}


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 UpLoad(url){
	//alert(url);
    window.open(url,'', 'width=500,height=300,resizable=1,scrollbars=auto');
}

function updateUpLoad(update,url){
	var sTemp = url;
		
	if (update.value != ''){
		sTemp = sTemp + "&updateFile=" + update.value;
	}
	//alert(sTemp);
    window.open(sTemp,'', 'width=500,height=300,resizable=1,scrollbars=auto');
}


function ViewImage(Option,Url){
	Url=Url.replace("\\","/") ;
	Url=Url.replace("//","/") ;
	
    var wTemp = window.open('','', 'width=600,height=400,resizable=1,scrollbars=1');
	var imgstr=Option.toLowerCase();
    var doc = wTemp.document;
    var str = '<HTML><HEAD><TITLE></TITLE></HEAE><BODY>';
	if (imgstr!="")
		{	
			if (imgstr.indexOf(".swf")>=0)
				{	
				str += '<object classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0>';
				str += '	  <param name=movie value=\'' + Url + Option + '\'>';
				str += '	  <param name=quality value=high>';
				str += '	  <embed src=\'' + Url + Option + '\'> quality=high pluginspage=http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash type=application/x-shockwave-flash>';
				str += '	  </embed>' ;
				str += '	</object>';
					
				}
			else if (imgstr.indexOf(".wmv")>=0 || imgstr.indexOf(".mov")>=0 || imgstr.indexOf(".mpg")>=0)
				{
				str += '<object  classid=clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95  width=450  height=300>';
				str += '	  <param name=Filename value=\'' + Url + '\'>';
				str += '	  <param name=AutoSize value=0>	  ';
				str += '	</object>';
				}
				
			else if (imgstr.indexOf(".zip")>=0 ||imgstr.indexOf(".rar")>=0 || imgstr.indexOf(".exe")>=0 )
				{
					str+='<script language=javascript>window.location=\"' + Url + Option + '\";</script>'
					
				}
			else
				{
							str += '<IMG src=\'' + Url + Option + '\'>';
				}
			}
		else
			{
			str +='<div align=center><font size=+1><b>Not Picture !</b></font></div>';
			
			}
		str +='<p><a href=JavaScript:window.close()><b>Window Close</b></a>';
		str += '</BODY></HTML>';
        doc.write(str);
        doc.close()
}

function SelectDate(fedName){ 
	var ReturnValue = window.showModalDialog("../inc/date.htm","","dialogWidth=300px;dialogHeight=285px;status=0");
	
	if (ReturnValue!=null && ReturnValue!=" " ) fedName.value = ReturnValue ;
	
	
} 
function show_window (win_file,win_width,win_height)
{
	var show_open = window.showModalDialog(win_file,"","dialogWidth=" + win_width + "px;dialogHeight=" + win_height + "px;status=0;resizable=1");
}


function pupup_window(theURL,winName,features)
 {
  window.open(theURL,winName,features);
}

//更改图片
function showimg(imgname,imgpath)
	{
	imgname.src=imgpath;
	}

function GoSubLink(url,titlevalue,tagvalue)	//前台菜单
	{
		if (url!="")
			{
			document.navigation .action =url;
			document.navigation .navi .value =titlevalue;
			document.navigation .tag .value =tagvalue;
			document.navigation.submit ();
			}
	}

function checkNumber(txt){
	if(isNaN(txt.value)){
		alert("Here must be a number");
		txt.select();
		txt.focus();
		return false
	}
	return true;
}


function regmem(gourl,actionvalue)
	{
	document.navigation.action= gourl;
	document.navigation.id.value=actionvalue;
	document.navigation.submit();
	}
