function flashplay(url,w,h){
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="main" align="middle" width="'+w+'" height="'+h+'">') ;
document.write('<param name="allowScriptAccess" value="always">');
document.write('<param name="movie" value="' + url + '">');
document.write('<param name="quality" value="high">');
document.write('<param name="wmode" value="transparent">');
document.write('<embed src="' + url + '" quality="high" wmode="transparent" name="main" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" align="middle" width="'+w+'" height="'+h+'">');
document.write('</object>');
}

function nTabs(thisObj,Num){
if(thisObj.className == "active")return;
var tabObj = thisObj.parentNode.id;
var tabList = document.getElementById(tabObj).getElementsByTagName("li");
for(i=0; i <tabList.length; i++)
{
  if (i == Num)
  {
   thisObj.className = "active"; 
      document.getElementById(tabObj+"_Content"+i).style.display = "block";
  }else{
   tabList[i].className = "normal"; 
   document.getElementById(tabObj+"_Content"+i).style.display = "none";
  }
} 
}

function showFocus(num)
{
 for(var id = 1;id<=4;id++)
 {
  var fpid="focusPic"+id;
  var fcid="focusContent"+id;
  var fnid="focusnav"+id;
  if(id==num){
  	try{document.getElementById(fpid).style.display="block"}catch(e){};
	try{document.getElementById(fcid).style.display="block"}catch(e){};
	try{document.getElementById(fnid).className="active"}catch(e){};
  }else{
	try{document.getElementById(fpid).style.display="none"}catch(e){};
	try{document.getElementById(fcid).style.display="none"}catch(e){};
	try{document.getElementById(fnid).className=""}catch(e){};
  }
 }  
}

function UrlDecode(str){ 
  var ret=""; 
  for(var i=0;i<str.length;i++){ 
   var chr = str.charAt(i); 
    if(chr == "+"){ 
      ret+=" "; 
    }else if(chr=="%"){ 
     var asc = str.substring(i+1,i+3); 
     if(parseInt("0x"+asc)>0x7f){ 
      ret+=asc2str(parseInt("0x"+asc+str.substring(i+4,i+6))); 
      i+=5; 
     }else{ 
      ret+=asc2str(parseInt("0x"+asc)); 
      i+=2; 
     } 
    }else{ 
      ret+= chr; 
    } 
  } 
  return ret; 
} 

function onpagekeydown()
{
	if (window.event)
	{
		if(window.event.keyCode == 13)
		{
			//ongoto();
			//直接用ongoto()时，在线列表分页的文本框中输入页数后回车会在新窗口中打开
			var page = document.getElementById("gotopage").value;
	if (isNaN(page))
	{
		page = "1";
	}

	if(arguments.length==1&&arguments[0]!='_self'&&arguments[0]!='_target'&&arguments[0]!='_parent'&&arguments[0]!='_top')
	{
		var w = eval(arguments[0]);
		w.location.href = setPage(originUrl, page);
	}else 
	{
		location.href = setPage(originUrl, page);
	}
			event.returnValue = false;
		}
	}
}
var originUrl
function setPage(s, i)
{
	return s.replace('{p}', i.toString());
}

function getCookie(name){
		if(document.cookie.length > 0){
			var begin = document.cookie.indexOf(name + '=');
			if(begin != -1){
				begin += name.length + 1;
				end = document.cookie.indexOf(';', begin);
				if(end == -1) end = document.cookie.length;
				return document.cookie.substring(begin, end);
			}else{
				return '';
			}
		}
		
		return '';
	
}
